Skip to content

Commit

Permalink
chore: do not run infinite-reactive-loop rule on Svelte 5 with runes (
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballyama authored Jan 14, 2025
1 parent 91999e3 commit 5fd91ba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
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 @@ -378,7 +378,17 @@ export default createRule('infinite-reactive-loop', {
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

0 comments on commit 5fd91ba

Please sign in to comment.