nursery/noSvelteIgnoredUnsubscribe
nursery · since 2.6.6
No autofix
biome.json
{
"linter": {
"rules": {
"nursery": {
"noSvelteIgnoredUnsubscribe": "error"
}
}
}
}Disallow ignoring the function returned by a store's subscribe() method.
<script>
import { count } from "./stores.js";
count.subscribe((value) => {
console.log(value);
});
</script><script>
import { onDestroy } from "svelte";
import { count } from "./stores.js";
const unsubscribe = count.subscribe((value) => {
console.log(value);
});
onDestroy(unsubscribe);
</script>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/noSvelteIgnoredUnsubscribe
nursery · since 2.6.6
{
"linter": {
"rules": {
"nursery": {
"noSvelteIgnoredUnsubscribe": "error"
}
}
}
}Disallow destructuring props inside JSX components in Solid projects.
Disallow animation and transition times that are shorter than a configured minimum.
Disallow arbitrary values in Tailwind CSS utility classes.
Disallow nesting a cascade layer inside a layer with the same name.
Disallow Tailwind CSS utility classes that use raw palette colors.