sveltejs / eslint-plugin-svelte

ESLint plugin for Svelte using AST
https://sveltejs.github.io/eslint-plugin-svelte/
MIT License
308 stars 37 forks source link

New Rule: `no-store` #813

Open baseballyama opened 5 months ago

baseballyama commented 5 months ago

Motivation

Svelte 5 allows state management using runes. On the other hand, we can also manage state using store. This rule prohibits the use of store, thereby restricting state management to runes only.

Description

DO not use store. Please use runes instead.

Examples

<!-- ✓ GOOD -->
let count = $state(0);

/* ✗ BAD */
import { writable, readable, derived } from 'svelte/store';

Additional comments

No response