Skip to content

Commit c805316

Browse files
committed
Disable the @typescript-eslint/no-unused-vars rule
1 parent 1194382 commit c805316

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

index.js

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -394,18 +394,20 @@ module.exports = {
394394

395395
'no-unused-expressions': 'off',
396396
'@typescript-eslint/no-unused-expressions': 'error',
397+
398+
// Disabled as the `@typescript-eslint/no-unused-vars` rule is buggy and marks arguments in overloads as unused... For example: https://github.com/sindresorhus/pageres/blob/6785f65efb354da364da858dba4c192891629971/source/index.ts#L109
397399
'no-unused-vars': 'off',
398-
'@typescript-eslint/no-unused-vars': [
399-
'error',
400-
{
401-
vars: 'all',
402-
args: 'after-used',
403-
ignoreRestSiblings: true,
404-
argsIgnorePattern: /^_/.source,
405-
caughtErrors: 'all',
406-
caughtErrorsIgnorePattern: /^_$/.source
407-
}
408-
],
400+
// '@typescript-eslint/no-unused-vars': [
401+
// 'error',
402+
// {
403+
// vars: 'all',
404+
// args: 'after-used',
405+
// ignoreRestSiblings: true,
406+
// argsIgnorePattern: /^_/.source,
407+
// caughtErrors: 'all',
408+
// caughtErrorsIgnorePattern: /^_$/.source
409+
// }
410+
// ],
409411

410412
// Disabled for now as it's marked as experimental.
411413
// '@typescript-eslint/no-unused-vars-experimental': 'error',
@@ -520,5 +522,15 @@ module.exports = {
520522

521523
// Disabled because of https://github.com/typescript-eslint/typescript-eslint/issues/60
522524
'no-redeclare': 'off'
523-
}
525+
},
526+
overrides: [
527+
{
528+
files: [
529+
'**/*.d.ts'
530+
],
531+
rules: {
532+
'@typescript-eslint/no-unused-vars': 'off'
533+
}
534+
}
535+
]
524536
};

0 commit comments

Comments
 (0)