[BUG] tailwindcss/no-custom-classname
marks valid classes as invalid if they are only used once with a prefix
#291
Labels
bug
Something isn't working
Describe the bug
The
tailwindcss/no-custom-classname
marks valid classes as invalid if they are only used once with a prefix.Example:
Let's say in our config
md
is a valid height value (16px).The class
h-md
should be valid. However, it is not used on the project, so it is not included in the compiled CSS.But let's say we do have the class
first:h-md
. This class is included on the build and works fine on the browser. But the linter marks it as invalid.If I only have
h-md
and build, it is valid, no error displayed.If I add both
h-md
andfirst:h-md
classes and build again, the error is gone, so none of the classes are marked as invalid.The problem occurs when a valid class does not exist on its own, but exists only prefixed (it can be a screen, custom selector, pseudo-state, etc...).
To Reproduce
Follow the example scenario and constraints on any environment with the linter active.
Expected behavior
There should be no error.
Screenshots
We can see that the intellisense understands the rule.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: