github schoero/eslint-plugin-better-tailwindcss v3.0.0

latest releases: v4.3.2, v4.3.1, v4.3.0...
10 months ago

compare changes

This version adds 3 new correctness rules to the plugin. To better reflect the new scope of the plugin it was renamed from eslint-plugin-readable-tailwind to eslint-plugin-better-tailwindcss. #86 (comment)

The predefined configs also have been renamed to better reflect their scope.

Features

⚠️ Breaking changes

  • Plugin renamed to eslint-plugin-better-tailwindcss

  • Deprecate Regex matchers to simplify the configuration. (#98)
    Regex matchers were an early attempt to make the plugin more flexible. However, they were quickly replaced with Matchers which work on the Abstract Syntax Tree and are far more powerful. Support for Regex matchers will be removed in the next major version.

  • warning and error configs have been removed. Use recommended-warn or recommended-error instead. (#99)

Migration

  1. Replace eslint-plugin-readable-tailwind with eslint-plugin-better-tailwindcss:
npm uninstall eslint-plugin-readable-tailwind
npm i -D eslint-plugin-better-tailwindcss
  1. Update the imports in your config:
- import eslintPluginReadableTailwind from "eslint-plugin-readable-tailwind"; 
+ import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
  1. Migrate to the new configs
rules: {
     // enable all recommended rules to warn
-    ...eslintPluginReadableTailwind.configs.warning.rules,
+   ...eslintPluginBetterTailwindcss.configs["recommended-warn"].rules,
     // enable all recommended rules to error
-    ...eslintPluginReadableTailwind.configs.error.rules,
+    ...eslintPluginBetterTailwindcss.configs["recommended-error"].rules,

    // or configure rules individually
-    "readable-tailwind/multiline": ["warn", { printWidth: 100 }]
+    "better-tailwindcss/multiline": ["warn", { printWidth: 100 }] 
  }

Don't miss a new eslint-plugin-better-tailwindcss release

NewReleases is sending notifications on new releases.