Skip to content

Commit 5fd91ba

Browse files
authored
chore: do not run infinite-reactive-loop rule on Svelte 5 with runes (#1006)
1 parent 91999e3 commit 5fd91ba

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.changeset/smart-brooms-relax.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 `infinite-reactive-loop` rule on Svelte 5 with runes

packages/eslint-plugin-svelte/src/rules/infinite-reactive-loop.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,17 @@ export default createRule('infinite-reactive-loop', {
378378
unexpectedCall:
379379
'Possibly it may occur an infinite reactive loop because this function may update `{{variableName}}`.'
380380
},
381-
type: 'suggestion'
381+
type: 'suggestion',
382+
// Do not run this rule on Svelte 5 with runes.
383+
conditions: [
384+
{
385+
svelteVersions: ['3/4']
386+
},
387+
{
388+
svelteVersions: ['5'],
389+
runes: [false, 'undetermined']
390+
}
391+
]
382392
},
383393
create(context) {
384394
return {

0 commit comments

Comments
 (0)