ESLint: Merge .js and .ts configs to one file
Since our code base is now mostly TypeScript, we can merge the configs and have a unified one. `@typescript-eslint/no-var-requires` was temporarily disabled in webpack configs. These files will be replaced by fec.config.ts in the foreseeable future together with their ESLint override.
This commit is contained in:
parent
06daa65904
commit
5b56f09e27
5 changed files with 14 additions and 18 deletions
|
|
@ -1,13 +0,0 @@
|
|||
extends: [
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
]
|
||||
|
||||
rules:
|
||||
"@typescript-eslint/ban-ts-comment":
|
||||
- error
|
||||
- ts-expect-error: "allow-with-description"
|
||||
ts-ignore: "allow-with-description"
|
||||
ts-nocheck: true
|
||||
ts-check: true
|
||||
minimumDescriptionLength: 5
|
||||
"@typescript-eslint/ban-types": off
|
||||
|
|
@ -4,6 +4,7 @@ extends: [
|
|||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:testing-library/react",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react-redux/recommended"
|
||||
]
|
||||
globals:
|
||||
|
|
@ -11,6 +12,7 @@ globals:
|
|||
shallow: readonly
|
||||
render: 'readonly'
|
||||
mount: 'readonly'
|
||||
parser: "@typescript-eslint/parser"
|
||||
plugins:
|
||||
- import
|
||||
rules:
|
||||
|
|
@ -36,13 +38,17 @@ rules:
|
|||
prefer-const:
|
||||
- error
|
||||
- destructuring: any
|
||||
no-console: 1
|
||||
no-console: error
|
||||
eqeqeq: error
|
||||
array-callback-return: warn
|
||||
"@typescript-eslint/ban-ts-comment":
|
||||
- error
|
||||
- ts-expect-error: "allow-with-description"
|
||||
ts-ignore: "allow-with-description"
|
||||
ts-nocheck: true
|
||||
ts-check: true
|
||||
minimumDescriptionLength: 5
|
||||
"@typescript-eslint/ban-types": off
|
||||
# Temporarily disabled
|
||||
jsx-a11y/no-autofocus: off
|
||||
rulesdir/forbid-pf-relative-imports: off
|
||||
overrides:
|
||||
- files: "**/*.ts?(x)"
|
||||
parser: "@typescript-eslint/parser"
|
||||
extends: ".eslintrc-typescript.yml"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { resolve } = require('path');
|
||||
|
||||
const config = require('@redhat-cloud-services/frontend-components-config');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { resolve } = require('path');
|
||||
|
||||
const config = require('@redhat-cloud-services/frontend-components-config');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { resolve } = require('path');
|
||||
|
||||
const config = require('@redhat-cloud-services/frontend-components-config');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue