-
-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
classnames and similar allow:
- objects where the keys are classes and values are boolean representing whether the class is enabled
- arbitrarily nested arrays to group classes organizationally or with conditionals
For example:
classnames(
["asdf foo"],
myFlag && [
"bar",
someBoolean ? ["baz"] : { "qwerty": someOtherFlag },
]
);no-custom-classname does not identify invalid classes within arrays and objects passed to a callee.
To Reproduce
Steps to reproduce the behavior:
- Ensure
classnamesis configured as a callee - Paste the above code block
Expected behavior
All five classes (asdf, foo, bar, baz, qwerty) are identified as invalid
Environment (please complete the following information):
- OS: macOS
- Softwares + version used:
- node 16.3.0
- yarn 1.22.10
- eslint 7.32.0
- eslint-plugin-tailwindcss 3.2.0
- tailwindcss v3.0.15
Additional context
I'd be happy to make a PR if this change makes sense.
leo
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working