no-hardcoded-tailwind-color
Hardcoded Tailwind color classes should use design tokens.
| Severity | Dimension | Files |
|---|---|---|
| Warning | Token adoption | .tsx .jsx |
What it flags
A line like this:
Last updated
is reported as:
Hardcoded Tailwind color "text-gray-500" — use a semantic class instead
How to fix it
Replace with semantic classes (e.g., bg-muted, text-foreground).
preset AI suggests a fix: Replace hardcoded Tailwind color with semantic class. "text-gray-500" is a hardcoded color class. Use semantic classes that adapt to light/dark mode.
Before:
Last updated
After:
Last updated
Related
- All rules: every built-in rule, by dimension.
- Set up enforcement: connect an AI tool and make validation required.
Last reviewed by @jschuyler