Skip to content

Commit 13c4adb

Browse files
committed
fix(prefer-const): allow ESLint core rule's properties
1 parent d8e0724 commit 13c4adb

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

.changeset/good-carrots-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'eslint-plugin-svelte': patch
3+
---
4+
5+
fix(prefer-const): allow ESLint core rule's properties

packages/eslint-plugin-svelte/src/rules/prefer-const.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,15 @@ export default createRule('prefer-const', {
5959
{
6060
type: 'object',
6161
properties: {
62-
destructuring: { enum: ['any', 'all'] },
63-
ignoreReadBeforeAssign: { type: 'boolean' },
6462
excludedRunes: {
6563
type: 'array',
6664
items: {
6765
type: 'string'
6866
}
6967
}
7068
},
71-
additionalProperties: false
69+
// allow ESLint core rule's properties
70+
additionalProperties: true
7271
}
7372
]
7473
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"options": [
3+
{
4+
"destructuring": "all",
5+
"ignoreReadonly": true
6+
}
7+
]
8+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
123

0 commit comments

Comments
 (0)