Skip to content

Commit 6364308

Browse files
authored
ESLint: Exclude _ prefix from no-unused-vars rule (#12574)
1 parent 08820cb commit 6364308

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

svelte/eslint.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ export default defineConfig(
2828
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
2929
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
3030
'no-undef': 'off',
31+
32+
'@typescript-eslint/no-unused-vars': [
33+
'error',
34+
{
35+
argsIgnorePattern: '^_',
36+
caughtErrorsIgnorePattern: '^_',
37+
destructuredArrayIgnorePattern: '^_',
38+
varsIgnorePattern: '^_',
39+
},
40+
],
3141
},
3242
},
3343
{

0 commit comments

Comments
 (0)