ESLint: Update rules after removing eslint-config-react-app
This updates rules for linting both JS and TS files in a way that is consistent with previous linting. Some rules for linting TS files were turned off or switched to warnings for now.
This commit is contained in:
parent
1f6f14caec
commit
2687312f16
3 changed files with 16 additions and 6 deletions
|
|
@ -1,4 +1,10 @@
|
|||
rules:
|
||||
"@typescript-eslint/no-unused-vars": "error"
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off"
|
||||
extends: [
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
]
|
||||
|
||||
rules:
|
||||
"@typescript-eslint/ban-ts-comment": off
|
||||
"@typescript-eslint/ban-types": off
|
||||
"@typescript-eslint/no-explicit-any": warn
|
||||
"@typescript-eslint/no-unused-vars": warn
|
||||
explicit-module-boundary-types: off
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
extends: [
|
||||
"@redhat-cloud-services/eslint-config-redhat-cloud-services",
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:testing-library/react"
|
||||
]
|
||||
globals:
|
||||
insights: 'readonly'
|
||||
|
|
@ -12,6 +13,7 @@ plugins:
|
|||
- import
|
||||
rules:
|
||||
rulesdir/forbid-pf-relative-imports: off
|
||||
no-unused-vars: warn
|
||||
import/order:
|
||||
- error
|
||||
- groups:
|
||||
|
|
@ -36,6 +38,7 @@ rules:
|
|||
- destructuring: any
|
||||
no-console: 2
|
||||
eqeqeq: error
|
||||
array-callback-return: warn
|
||||
overrides:
|
||||
- files: "**/*.ts?(x)"
|
||||
parser: "@typescript-eslint/parser"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
],
|
||||
"rules": {
|
||||
"react/display-name": "off",
|
||||
"react/prop-types": "off"
|
||||
"react/prop-types": "off",
|
||||
"testing-library/await-async-events": "off"
|
||||
},
|
||||
"extends": [
|
||||
"plugin:testing-library/react",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue