Skip to content

Commit

Permalink
chore: do not run no-reactive-reassign 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 763cf7a commit 74373ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
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 @@ -27,7 +27,16 @@ export default createRule('no-reactive-reassign', {
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

0 comments on commit 74373ec

Please sign in to comment.