nursery/useSvelteRequireEachKey
nursery · since 2.5.0
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"useSvelteRequireEachKey": "error"
}
}
}
}{#each items as item}
<div>{item}</div>
{/each}{#each items as item (item.id)}
<div>{item}</div>
{/each}Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/useSvelteRequireEachKey
nursery · since 2.5.0
{
"linter": {
"rules": {
"nursery": {
"useSvelteRequireEachKey": "error"
}
}
}
}Require the reactive classes from svelte/reactivity instead of built-in objects that are modified.
Enforce the shorthand syntax for Svelte bind:, class:, and style: directives.
Require importing SvelteKit's app state from $app/state instead of $app/stores.
Enforce the shorthand syntax for CSS variables in Tailwind CSS classes.
Require internal navigation in SvelteKit apps to use paths built with resolve().
Require query keys to include every value that the query function uses.