Releases: francoismassart/eslint-plugin-tailwindcss
Release list
v4.2.0
🚀 Features
New rule important-modifier-suffix: Makes sure the ! important modifier is at the end of the class names. The former ! location (between the modifiers and the class name is deprecated).
v4.1.0
v4.1.0
🚀 Features
no-unnecessary-arbitrary-value: Expanded checks to catch and replace redundant arbitrary values (resolves #366).
💡 What's new: Prior to v4.1.0, this rule only flagged exact string matches between an arbitrary value and a preset. The rule is now smart enough to resolve unit conversions and spacing configurations.
The plugin will now suggest cleaner native alternatives for:
- Native presets: Replaces
inset-[1px]withinset-px(previously ignored becausepxpreset is not declared in the config, yet it exists). - Unitless values: Replaces
z-[123]withz-123. - Spacing-based values: Replaces
m-[8px]withm-2by intelligently parsing your Tailwind v4's configuration (--spacing: 0.25rem; /* 4px */).
🐞 Fixes
- fix: respect the optional
!important modifiers in the fixers
v4.0.6
- fix: false positives with
borderanddividebyno-contradicting-classnamerule #461
v4.0.5
v4.0.4
- minor: add shadcn ui's
cninsidefunctionsdefault values of the settings - fix:
peer&peer/...are now considered valid classnames
Tailwind CSS v4
Made for Tailwind CSS v4
Version 4 of the eslint-plugin-tailwindcss is:
- re-written from scratch
- using TypeScript
- Based as much as possible on internal assets of Tailwind CSS:
- via the
prettier-plugin-tailwindcssplugin - via
tailwind-api-utils
- via the
- only compatible with:
- Tailwind CSS v4.x.x
- ESLint flat config format
- Node >= 20.19.0
This version has been made possible thanks to the work of hyoban and his project tailwind-api-utils.
The pre-release versions were tested on our Nx monorepo which uses Next.js, react and offcourse Tailwind CSS 4.
v4.0.0-alpha.5
Implement caching and other enhancements aiming for better performances:
classnames-orderenforces-negative-arbitrary-valuesenforces-shorthandno-arbitrary-valueno-contradicting-classnameno-custom-classnameno-unnecessary-arbitrary-value
v4.0.0-alpha.3
no-contradicting-classnameenforces-shorthandenforces-negative-arbitrary-valuesno-arbitrary-valueno-unnecessary-arbitrary-value- Highlight enhancements
v4.0.0-alpha.1
- feat(typings): native support without using
definitly typedproject usingunbuild - feat(rule):
classnames-order - feat(rule):
no-custom-classname - feat(config): add
recommendedflat config - fix(rule): underline specific classname instead of the entire node for
no-custom-classname - feat(suggestion): primitive suggestion for rule
no-custom-classname
docs: sponsors list
Updating the list of sponsors of the README.
Make sure to play with the alpha version of v4.