Skip to content

Commit fc004c9

Browse files
committed
Improve the @typescript-eslint/no-unused-vars rule config
1 parent ead8152 commit fc004c9

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,19 @@ module.exports = {
133133
],
134134
'@typescript-eslint/no-triple-slash-reference': 'error',
135135
'@typescript-eslint/no-type-alias': 'error',
136-
'@typescript-eslint/no-unused-vars': 'error',
136+
'no-unused-vars': 'off',
137+
'@typescript-eslint/no-unused-vars': [
138+
'error',
139+
{
140+
vars: 'all',
141+
varsIgnorePattern: '^React$',
142+
args: 'after-used',
143+
ignoreRestSiblings: true,
144+
argsIgnorePattern: '^_$',
145+
caughtErrors: 'all',
146+
caughtErrorsIgnorePattern: '^_$'
147+
}
148+
],
137149
'@typescript-eslint/no-var-requires': 'error',
138150
'@typescript-eslint/prefer-interface': 'error',
139151
'@typescript-eslint/prefer-namespace-keyword': 'error',

0 commit comments

Comments
 (0)