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

[Feature request] Ban specific value type in no-arbitrary-values

Open wyozi opened this issue 1 year ago • 0 comments

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. the bg- class.

Describe alternatives you've considered

Additional context My problem would be partially solved by #175, but this feature is much easier to implement

wyozi avatar May 26 '23 11:05 wyozi