-
Notifications
You must be signed in to change notification settings - Fork 50.4k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
react-scripts version: 3.4.1
Steps To Reproduce
- Created project with CRA typescript
- Added
.eslintrc.js:
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint', 'jest', 'react', 'react-hooks', 'sonarjs'],
extends: [
'standard-with-typescript',
'plugin:jest/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:sonarjs/recommended',
],
settings: {
react: {
version: 'detect',
},
},
}
- Added lints not included with
react-scriptstodevDependencies:
"eslint-config-standard-with-typescript": "^15.0.1",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-node": "11",
"eslint-plugin-promise": "4",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-standard": "4"
- Run with
npx eslint --fix --ext .js,.jsx,.ts,.tsx .
Worked around adding rules individually:
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
balazsorban44, chriz-hoepfner, ersinakinci, AlexandrKoliukh, glebmikulko and 7 more
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug