From 002260708fc8ce7702f6289cd0c63c3dcabb877f Mon Sep 17 00:00:00 2001 From: Ian Schmitz Date: Wed, 24 Apr 2019 07:35:51 -0700 Subject: [PATCH] Fix no-useless-constructor rule in TypeScript (#6862) --- packages/eslint-config-react-app/index.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 4026a82f427..01b99e65351 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -66,17 +66,14 @@ module.exports = { warnOnUnsupportedTypeScriptVersion: true, }, plugins: ['@typescript-eslint'], + // If adding a typescript-eslint version of an existing ESLint rule, + // make sure to disable the ESLint rule here. rules: { - // These ESLint rules are known to cause issues with typescript-eslint - // See https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.json - camelcase: 'off', - indent: 'off', - 'no-array-constructor': 'off', - 'no-unused-vars': 'off', - '@typescript-eslint/no-angle-bracket-type-assertion': 'warn', + 'no-array-constructor': 'off', '@typescript-eslint/no-array-constructor': 'warn', '@typescript-eslint/no-namespace': 'error', + 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': [ 'warn', { @@ -84,6 +81,8 @@ module.exports = { ignoreRestSiblings: true, }, ], + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'warn', }, },