nursery/noTailwindRawColors
nursery · since 2.5.15
{
"linter": {
"rules": {
"nursery": {
"noTailwindRawColors": "error"
}
}
}
}Disallow Tailwind CSS utility classes that use raw palette colors.
<div className="bg-pink-500" />;<div className="hover:text-red-500/80" />;<div className="bg-primary hover:text-muted-foreground" />;<div className="bg-white text-black border-transparent fill-current stroke-inherit" />;Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/noTailwindRawColors
nursery · since 2.5.15
{
"linter": {
"rules": {
"nursery": {
"noTailwindRawColors": "error"
}
}
}
}Disallow arbitrary values in Tailwind CSS utility classes.
Disallow Tailwind CSS classes and variants that your project doesn't allow.
Disallow Tailwind utilities that override the appearance of components.
Disallow ignoring the function returned by a store's subscribe() method.
Reports CSS class names in JSX className or class attributes that are not defined in any imported CSS file.