Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/smart-brooms-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-svelte': patch
---

chore: do not run `infinite-reactive-loop` rule on Svelte 5 with runes
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
description:
"Svelte runtime prevents calling the same reactive statement twice in a microtask. But between different microtask, it doesn't prevent.",
category: 'Possible Errors',
// TODO Switch to recommended in the major version.

Check warning on line 372 in packages/eslint-plugin-svelte/src/rules/infinite-reactive-loop.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected 'todo' comment: 'TODO Switch to recommended in the major...'
recommended: false
},
schema: [],
Expand All @@ -378,7 +378,17 @@
unexpectedCall:
'Possibly it may occur an infinite reactive loop because this function may update `{{variableName}}`.'
},
type: 'suggestion'
type: 'suggestion',
// Do not run this rule on Svelte 5 with runes.
conditions: [
{
svelteVersions: ['3/4']
},
{
svelteVersions: ['5'],
runes: [false, 'undetermined']
}
]
},
create(context) {
return {
Expand Down
Loading