Skip to content

Commit 08c2fdd

Browse files
committed
improve
1 parent 65808ba commit 08c2fdd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/eslint-plugin-svelte/src/rule-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ type SveltePreferClassDirective = []|[{
570570
}]
571571
// ----- svelte/prefer-const -----
572572
type SveltePreferConst = []|[{
573+
destructuring?: ("any" | "all")
574+
ignoreReadBeforeAssign?: boolean
573575
excludedRunes?: string[]
574576
[k: string]: unknown | undefined
575577
}]

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,16 @@ export default createRule('prefer-const', {
5959
{
6060
type: 'object',
6161
properties: {
62+
destructuring: { enum: ['any', 'all'] },
63+
ignoreReadBeforeAssign: { type: 'boolean' },
6264
excludedRunes: {
6365
type: 'array',
6466
items: {
6567
type: 'string'
6668
}
6769
}
6870
},
69-
// allow ESLint core rule's properties
71+
// Allow ESLint core rule properties in case new options are added in the future.
7072
additionalProperties: true
7173
}
7274
]

0 commit comments

Comments
 (0)