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/perfect-mirrors-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-svelte': patch
---

chore: do not run `no-reactive-reassign` rule on Svelte 5 with runes
11 changes: 10 additions & 1 deletion packages/eslint-plugin-svelte/src/rules/no-reactive-reassign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
docs: {
description: 'disallow reassigning reactive values',
category: 'Possible Errors',
// TODO Switch to recommended in the major version.

Check warning on line 12 in packages/eslint-plugin-svelte/src/rules/no-reactive-reassign.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 @@ -27,7 +27,16 @@
assignmentToReactiveValue: "Assignment to reactive value '{{name}}'.",
assignmentToReactiveValueProp: "Assignment to property of reactive value '{{name}}'."
},
type: 'problem'
type: 'problem',
conditions: [
{
svelteVersions: ['3/4']
},
{
svelteVersions: ['5'],
runes: [false, 'undetermined']
}
]
},
create(context) {
const props = context.options[0]?.props !== false; // default true
Expand Down
Loading