nursery/useSvelteShorthandDirective
nursery · since 2.6.0
Safe autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"useSvelteShorthandDirective": "error"
}
}
}
}Enforce the shorthand syntax for Svelte bind:, class:, and style: directives.
<input bind:value={value} /><div class:active={active}></div><div style:color={color}></div><input bind:value />
<input bind:value={name} />
<div class:active></div>
<div class:active={isActive}></div>
<div style:color></div>
<div style:color="red"></div>Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/useSvelteShorthandDirective
nursery · since 2.6.0
{
"linter": {
"rules": {
"nursery": {
"useSvelteShorthandDirective": "error"
}
}
}
}Require keyed {#each} blocks in Svelte templates.
Enforce the shorthand syntax for CSS variables in Tailwind CSS classes.
Require the reactive classes from svelte/reactivity instead of built-in objects that are modified.
Require query keys to include every value that the query function uses.
Require importing SvelteKit's app state from $app/state instead of $app/stores.
Enforce a consistent property order in the options of TanStack Query infinite query functions.