eslint-plugin-tailwindcss
eslint-plugin-tailwindcss copied to clipboard
[Feature request] Ban specific value type in no-arbitrary-values
Is your feature request related to a problem? Please describe. I would like to ban certain types of arbitrary values, namely colors (#hexhex or rgb(1,2,3)).
Describe the solution you'd like Few ways I could think of:
- Allow providing a regex for the banned values
- Allow providing a category of banned values. This would read the name of the used class (e.g.
bg-[#ffffff]
->bg-
), map it into a category (e.g.bg-
->color
) and allow specifying the name of the category in banned list. Might be a bit more uncomfortable to implement and also unreliable, since you can pass other things than colors to e.g. thebg-
class.
Describe alternatives you've considered
Additional context My problem would be partially solved by #175, but this feature is much easier to implement