# noSvelteAsyncStore

Rule `biome/noSvelteAsyncStore`. Disallow passing async functions to Svelte stores.

- Source: biome
- Technologies: Svelte
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #545 by reach, #180 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noSvelteAsyncStore` | yes | no | group nursery, since 2.6.7 | [docs](https://biomejs.dev/linter/rules/no-svelte-async-store/) |

## Code examples

### Incorrect: the rule reports this

```js
import { writable } from "svelte/store";
const user = writable(null, async (set) => {
    set(await fetchUser());
});
```

```js
import { readable } from "svelte/store";
const time = readable(new Date(), async function (set) {
    set(await fetchTime());
});
```

```js
import { derived } from "svelte/store";
const profile = derived(user, async ($user) => await fetchProfile($user));
```

### Correct: the rule accepts this

```js
import { derived, writable } from "svelte/store";
const user = writable(null, (set) => {
    fetchUser().then(set);
});
const profile = derived(user, ($user, set) => {
    fetchProfile($user).then(set);
});
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noSvelteAddEventListener](https://lintradar.dev/rules/biome/noSvelteAddEventListener.md): Disallow `addEventListener` in Svelte files.
- [biome/noSvelteAtDebugTags](https://lintradar.dev/rules/biome/noSvelteAtDebugTags.md): Disallow the use of Svelte's `{@debug}` tag.
- [biome/noSuspiciousSemicolonInJsx](https://lintradar.dev/rules/biome/noSuspiciousSemicolonInJsx.md): It detects possible "wrong" semicolons inside JSX elements.
- [biome/noSvelteAtHtmlTags](https://lintradar.dev/rules/biome/noSvelteAtHtmlTags.md): Disallow the use of Svelte's `{@html}` tag.
- [biome/noStringCaseMismatch](https://lintradar.dev/rules/biome/noStringCaseMismatch.md): Disallow comparison of expressions modifying the string case with non-compliant value.
- [biome/noSvelteBindValueOnCheckableInputs](https://lintradar.dev/rules/biome/noSvelteBindValueOnCheckableInputs.md): Disallow `bind:value` on checkbox and radio inputs.

---

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