Skip to content

Commit 0022607

Browse files
authored
Fix no-useless-constructor rule in TypeScript (#6862)
1 parent c38aecf commit 0022607

File tree

1 file changed

+6
-7
lines changed
  • packages/eslint-config-react-app

1 file changed

+6
-7
lines changed

Diff for: packages/eslint-config-react-app/index.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,23 @@ module.exports = {
6666
warnOnUnsupportedTypeScriptVersion: true,
6767
},
6868
plugins: ['@typescript-eslint'],
69+
// If adding a typescript-eslint version of an existing ESLint rule,
70+
// make sure to disable the ESLint rule here.
6971
rules: {
70-
// These ESLint rules are known to cause issues with typescript-eslint
71-
// See https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.json
72-
camelcase: 'off',
73-
indent: 'off',
74-
'no-array-constructor': 'off',
75-
'no-unused-vars': 'off',
76-
7772
'@typescript-eslint/no-angle-bracket-type-assertion': 'warn',
73+
'no-array-constructor': 'off',
7874
'@typescript-eslint/no-array-constructor': 'warn',
7975
'@typescript-eslint/no-namespace': 'error',
76+
'no-unused-vars': 'off',
8077
'@typescript-eslint/no-unused-vars': [
8178
'warn',
8279
{
8380
args: 'none',
8481
ignoreRestSiblings: true,
8582
},
8683
],
84+
'no-useless-constructor': 'off',
85+
'@typescript-eslint/no-useless-constructor': 'warn',
8786
},
8887
},
8988

0 commit comments

Comments
 (0)