eslint-plugin-tailwindcss icon indicating copy to clipboard operation
eslint-plugin-tailwindcss copied to clipboard

[BUG]/[Feature request] No validation for tailwind group variants

Open acewf opened this issue 2 years ago • 2 comments

Describe the bug Missing validation for tailwind variants leads to unused classes declared on the dom.

To Reproduce Steps to reproduce the behavior:

  1. declare invalid variant like mf:mx-2
  2. When running lint see there is no warning/error of the invalid variant mf

Expected behavior When declaring unrecognised variants, should get a warning regarding not supported variant.

eslint config file or live demo https://github.com/acewf/eslint-taiwlind-invalid-variant/blob/main/.eslintrc.json // invalid variant example https://github.com/acewf/eslint-taiwlind-invalid-variant/blob/main/src/app/page.tsx#L11

acewf avatar Jan 26 '23 12:01 acewf

@francoismassart i realised after creating this bug, we have on the "Upcoming Rules" section the validate-modifiers seems is the same thing. So probably should close this one.

Want to help sort out this feature, so tag me and let me know if i can help out delivering this. (Not sure your idea how to implement this, but was looking to mimic the "no-custom-classname")

acewf avatar Jan 26 '23 14:01 acewf

We're running into issues with this, is there any plan to implement this? I dug around in TW and I don't see any way to get the variants in use

pm0u avatar May 16 '23 14:05 pm0u