nursery/noSvelteUnnecessaryStateWrap
nursery · since 2.5.2
Unsafe autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"noSvelteUnnecessaryStateWrap": "error"
}
}
}
}Disallow unnecessary $state wrapping of reactive classes.
<script>
import { SvelteMap } from "svelte/reactivity";
const map = $state(new SvelteMap());
</script><script>
import { SvelteMap } from "svelte/reactivity";
const map = new SvelteMap();
</script>Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/noSvelteUnnecessaryStateWrap
nursery · since 2.5.2
{
"linter": {
"rules": {
"nursery": {
"noSvelteUnnecessaryStateWrap": "error"
}
}
}
}Disallow objects, arrays, functions, and classes in Svelte text mustaches.
Disallow $derived.by() when $derived() is sufficient.
Enforces the usage of the title element for the svg element.
Disallow Tailwind CSS classes that set the same CSS properties on an element.