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
- no-unregistered-classes: Report classes not registered with tailwindcss. (#89)
- no-conflicting-classes: Report classes that produce conflicting styles. (#90)
- no-restricted-classes: Disallow restricted classes. (#92)
⚠️ 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. -
warninganderrorconfigs have been removed. Userecommended-warnorrecommended-errorinstead. (#99)
Migration
- Replace
eslint-plugin-readable-tailwindwitheslint-plugin-better-tailwindcss:
npm uninstall eslint-plugin-readable-tailwindnpm i -D eslint-plugin-better-tailwindcss- Update the imports in your config:
- import eslintPluginReadableTailwind from "eslint-plugin-readable-tailwind";
+ import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";- 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 }]
}