nursery/useTailwindVariablesShorthand
nursery · since 2.6.5
Safe autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"useTailwindVariablesShorthand": "error"
}
}
}
}Enforce the shorthand syntax for CSS variables in Tailwind CSS classes.
<div className="bg-[var(--brand)]" />;<div className="hover:bg-red-500/[var(--opacity)]" />;<div className="bg-(--brand) hover:bg-red-500/(--opacity)" />;
<div className="w-[calc(var(--width)+1rem)] [color:var(--brand)]" />;Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/useTailwindVariablesShorthand
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"useTailwindVariablesShorthand": "error"
}
}
}
}Enforce the shorthand syntax for Svelte bind:, class:, and style: directives.
Require query keys to include every value that the query function uses.
Require keyed {#each} blocks in Svelte templates.
Enforce a consistent property order in the options of TanStack Query infinite query functions.
Require the reactive classes from svelte/reactivity instead of built-in objects that are modified.
Enforce that onMutate comes before onError and onSettled in the options of TanStack Query mutations.