Skip to content

Commit e50d2d4

Browse files
authored
chore: do not run no-reactive-literals rule on Svelte 5 with runes (#1031)
1 parent 85c9630 commit e50d2d4

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.changeset/stale-bobcats-laugh.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 `no-reactive-literals` rule on Svelte 5 with runes

packages/eslint-plugin-svelte/src/rules/no-reactive-literals.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ export default createRule('no-reactive-literals', {
1515
noReactiveLiterals: `Do not assign literal values inside reactive statements unless absolutely necessary.`,
1616
fixReactiveLiteral: `Move the literal out of the reactive statement into an assignment`
1717
},
18-
type: 'suggestion'
18+
type: 'suggestion',
19+
conditions: [
20+
{
21+
svelteVersions: ['3/4']
22+
},
23+
{
24+
svelteVersions: ['5'],
25+
runes: [false, 'undetermined']
26+
}
27+
]
1928
},
2029
create(context) {
2130
return {

0 commit comments

Comments
 (0)