Skip to content

Commit 6e898a3

Browse files
committed
update eslint
1 parent 17d6354 commit 6e898a3

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.eslintrc renamed to .eslintrc.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
module.exports = {
22
// tells eslint to use the TypeScript parser
33
"parser": "@typescript-eslint/parser",
44
// tell the TypeScript parser that we want to use JSX syntax
@@ -12,6 +12,7 @@
1212
},
1313
// we want to use the recommended rules provided from the typescript plugin
1414
"extends": [
15+
"@redhat-cloud-services/eslint-config-redhat-cloud-services",
1516
"eslint:recommended",
1617
"plugin:react/recommended",
1718
"plugin:@typescript-eslint/recommended"
@@ -23,8 +24,24 @@
2324
"expect": "readonly",
2425
"it": "readonly",
2526
"process": "readonly",
26-
"document": "readonly"
27+
"document": "readonly",
28+
"insights": "readonly",
29+
"shallow": "readonly",
30+
"render": "readonly",
31+
"mount": "readonly"
2732
},
33+
"overrides": [
34+
{
35+
"files": ["src/**/*.ts", "src/**/*.tsx"],
36+
"parser": "@typescript-eslint/parser",
37+
"plugins": ["@typescript-eslint"],
38+
"extends": ["plugin:@typescript-eslint/recommended"],
39+
"rules": {
40+
"react/prop-types": "off",
41+
"@typescript-eslint/no-unused-vars": "error"
42+
},
43+
},
44+
],
2845
"settings": {
2946
"react": {
3047
"version": "^16.11.0"
@@ -37,6 +54,12 @@
3754
"eslint-plugin-react-hooks"
3855
],
3956
"rules": {
57+
"sort-imports": [
58+
"error",
59+
{
60+
"ignoreDeclarationSort": true
61+
}
62+
],
4063
"@typescript-eslint/explicit-function-return-type": "off",
4164
"react-hooks/rules-of-hooks": "error",
4265
"react-hooks/exhaustive-deps": "warn",

0 commit comments

Comments
 (0)