nursery/useTailwindStaticClassStrings
nursery · since 2.6.0
{
"linter": {
"rules": {
"nursery": {
"useTailwindStaticClassStrings": "error"
}
}
}
}Require complete, statically written class names.
<div className={`bg-${color}`} />;<div className={"text-" + color} />;clsx(`bg-${color}`);<div className={active ? "bg-red-500" : "bg-blue-500"} />;
<div className="p-4 text-white" />;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/useTailwindStaticClassStrings
nursery · since 2.6.0
{
"linter": {
"rules": {
"nursery": {
"useTailwindStaticClassStrings": "error"
}
}
}
}Enforce using fewer Tailwind utilities instead of multiple utilities that are functionally the same.
Disallow static id values on elements outside SVG contexts.
Require Svelte stores to be created with an initial value.
Enforce using Solid's <For /> component for mapping an array to JSX elements.
Enforces naming conventions for React createContext, useId, and useRef.