no-unnecessary-arbitrary-value
overwrites intentional arbitrary values with design system classes
#375
Labels
bug
Something isn't working
Describe the bug
The
no-unnecessary-arbitrary-value
rule incorrectly flags custom utility classes defined in the Tailwind config as unnecessary arbitrary values, suggesting they be replaced with arbitrary values likeh-[48px]
. This happens even though the custom classes are properly defined in the Tailwind preset/config.To Reproduce
Expected behavior
The rule may allow arbitrary values when they are intentionally different from our design system values, or when we explicitly want to use pixel values instead of semantic names.
Environment
eslint-plugin-tailwindcss: 3.17.4
Additional context
While generally it's good practice to use design system tokens, there are valid cases where we want to use arbitrary values. The current behavior of the rule makes it difficult to use arbitrary values even in legitimate cases.
Workaround
The text was updated successfully, but these errors were encountered: