Skip to content

Commit 1c850cb

Browse files
committed
feat(svelte): update no-unused-vars rule options
1 parent 1d0b42f commit 1c850cb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

scripts/typegen.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ let dts = await flatConfigsToRulesDTS(configs, {
5555
includeAugmentation: false,
5656
})
5757

58-
dts = `
59-
type ConfigNames = ${configNames.map(i => `'${i}'`).join(' | ')}
60-
${dts}`
58+
dts += `
59+
// Names of all the configs
60+
export type ConfigNames = ${configNames.map(i => `'${i}'`).join(' | ')}
61+
`
6162

6263
await fs.writeFile('src/types/typegen.d.ts', dts)

src/configs/svelte.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function svelte(
5151
caughtErrors: 'none',
5252
ignoreRestSiblings: true,
5353
vars: 'all',
54-
varsIgnorePattern: '^\\$\\$Props$',
54+
varsIgnorePattern: '^(\\$\\$Props$|\\$\\$Events$|\\$\\$Slots$)',
5555
},
5656
],
5757

@@ -83,7 +83,7 @@ export async function svelte(
8383
args: 'after-used',
8484
argsIgnorePattern: '^_',
8585
vars: 'all',
86-
varsIgnorePattern: '^(_|\\$\\$Props$)',
86+
varsIgnorePattern: '^(_|\\$\\$Props$|\\$\\$Events$|\\$\\$Slots$)',
8787
},
8888
],
8989

0 commit comments

Comments
 (0)