Skip to content

Commit a2781c0

Browse files
fix: disabled no-unused-vars
According to [`typescript/no-unused-vars` docs](https://github.com/bradzacher/eslint-plugin-typescript/blob/master/docs/rules/no-unused-vars.md#options), the core `no-unused-vars` rule should be disabled for it can report incorrect errors.
1 parent 15ddca4 commit a2781c0

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

  • packages/eslint-config-typescript

packages/eslint-config-typescript/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ module.exports = {
5151
// blows up anyway during compilation when it encouters an undefined variable.
5252
'no-undef': 'off',
5353

54+
// Disabled because it conflicts with typescript/no-unused-vars and does not support
55+
// typescript specific declarations properly.
56+
'no-unused-vars': 'off',
57+
5458
// Require that member overloads be consecutive
5559
// Grouping overloaded members together can improve readability of the code.
5660
'@typescript-eslint/adjacent-overload-signatures': 'warn',
@@ -135,10 +139,9 @@ module.exports = {
135139
// Triple-slash reference directive comments should not be used anymore. Use import instead.
136140
'@typescript-eslint/no-triple-slash-reference': 'error',
137141

138-
// Prevent TypeScript-specific constructs from being erroneously flagged as unused
139-
// This rule only has an effect when the no-unused-vars core rule is enabled. It ensures that
140-
// TypeScript-specific constructs, such as implemented interfaces, are not erroneously flagged
141-
// as unused.
142+
// Variables that are declared and not used anywhere in the code are most likely an error due
143+
// to incomplete refactoring. Such variables take up space in the code and can lead to
144+
// confusion by readers.
142145
'@typescript-eslint/no-unused-vars': 'error',
143146

144147
// Disallow the use of variables before they are defined

0 commit comments

Comments
 (0)