Skip to content

Commit 2b69410

Browse files
committed
update docs
1 parent baa64fe commit 2b69410

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

.changeset/cyan-experts-arrive.md

-5
This file was deleted.

docs/rules/prefer-destructured-store-props.md

+3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ An example of the improvements can be see in this [REPL](https://svelte.dev/repl
2424
<script>
2525
/* eslint svelte/prefer-destructured-store-props: "error" */
2626
import store from './store.js';
27+
// Svelte3/4
2728
$: ({ foo } = $store);
29+
// Svelte5 with Runes
30+
let foo = $derived($store.foo);
2831
</script>
2932
3033
<!-- ✓ GOOD -->

packages/eslint-plugin-svelte/src/rules/prefer-destructured-store-props.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,7 @@ export default createRule('prefer-destructured-store-props', {
2626
fixUseDestructuring: `Using destructuring like $: ({ {{property}} } = {{store}}); will run faster`,
2727
fixUseVariable: `Using the predefined reactive variable {{variable}}`
2828
},
29-
type: 'suggestion',
30-
conditions: [
31-
{
32-
svelteVersions: ['3/4']
33-
},
34-
{
35-
svelteVersions: ['5'],
36-
runes: [false, 'undetermined']
37-
}
38-
]
29+
type: 'suggestion'
3930
},
4031
create(context) {
4132
let mainScript: AST.SvelteScriptElement | null = null;

0 commit comments

Comments
 (0)