# noSvelteIgnoredUnsubscribe

Rule `biome/noSvelteIgnoredUnsubscribe`. Disallow ignoring the function returned by a store's `subscribe()` method.

- Source: biome
- Technologies: Svelte
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1940 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noSvelteIgnoredUnsubscribe` | no | no | group nursery, since 2.6.6 | [docs](https://biomejs.dev/linter/rules/no-svelte-ignored-unsubscribe/) |

## Code examples

### Incorrect: the rule reports this

```svelte
<script>
import { count } from "./stores.js";

count.subscribe((value) => {
    console.log(value);
});
</script>
```

### Correct: the rule accepts this

```svelte
<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.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noSvelteIgnoredUnsubscribe": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noSolidDestructuredProps](https://lintradar.dev/rules/biome/noSolidDestructuredProps.md): Disallow destructuring props inside JSX components in Solid projects.
- [biome/noSvelteLegacyConst](https://lintradar.dev/rules/biome/noSvelteLegacyConst.md): Disallow legacy Svelte `{@const}` tags.
- [biome/noShortTimeValues](https://lintradar.dev/rules/biome/noShortTimeValues.md): Disallow animation and transition times that are shorter than a configured minimum.
- [biome/noTailwindArbitraryValue](https://lintradar.dev/rules/biome/noTailwindArbitraryValue.md): Disallow arbitrary values in Tailwind CSS utility classes.
- [biome/noSelfNestedLayer](https://lintradar.dev/rules/biome/noSelfNestedLayer.md): Disallow nesting a cascade layer inside a layer with the same name.
- [biome/noTailwindRawColors](https://lintradar.dev/rules/biome/noTailwindRawColors.md): Disallow Tailwind CSS utility classes that use raw palette colors.

---

Web page: https://lintradar.dev/rules/biome/noSvelteIgnoredUnsubscribe. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
