Skip to content

Commit baa64fe

Browse files
committed
chore: do not run prefer-destructured-store-props rule on Svelte 5 with runes
1 parent 7596287 commit baa64fe

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.changeset/cyan-experts-arrive.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'eslint-plugin-svelte': patch
3+
---
4+
5+
chore: do not run `prefer-destructured-store-props` rule on Svelte 5 with runes

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ 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'
29+
type: 'suggestion',
30+
conditions: [
31+
{
32+
svelteVersions: ['3/4']
33+
},
34+
{
35+
svelteVersions: ['5'],
36+
runes: [false, 'undetermined']
37+
}
38+
]
3039
},
3140
create(context) {
3241
let mainScript: AST.SvelteScriptElement | null = null;

0 commit comments

Comments
 (0)