|
1 | | -{ |
| 1 | +module.exports = { |
2 | 2 | // tells eslint to use the TypeScript parser |
3 | 3 | "parser": "@typescript-eslint/parser", |
4 | 4 | // tell the TypeScript parser that we want to use JSX syntax |
|
12 | 12 | }, |
13 | 13 | // we want to use the recommended rules provided from the typescript plugin |
14 | 14 | "extends": [ |
| 15 | + "@redhat-cloud-services/eslint-config-redhat-cloud-services", |
15 | 16 | "eslint:recommended", |
16 | 17 | "plugin:react/recommended", |
17 | 18 | "plugin:@typescript-eslint/recommended" |
|
23 | 24 | "expect": "readonly", |
24 | 25 | "it": "readonly", |
25 | 26 | "process": "readonly", |
26 | | - "document": "readonly" |
| 27 | + "document": "readonly", |
| 28 | + "insights": "readonly", |
| 29 | + "shallow": "readonly", |
| 30 | + "render": "readonly", |
| 31 | + "mount": "readonly" |
27 | 32 | }, |
| 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 | + ], |
28 | 45 | "settings": { |
29 | 46 | "react": { |
30 | 47 | "version": "^16.11.0" |
|
37 | 54 | "eslint-plugin-react-hooks" |
38 | 55 | ], |
39 | 56 | "rules": { |
| 57 | + "sort-imports": [ |
| 58 | + "error", |
| 59 | + { |
| 60 | + "ignoreDeclarationSort": true |
| 61 | + } |
| 62 | + ], |
40 | 63 | "@typescript-eslint/explicit-function-return-type": "off", |
41 | 64 | "react-hooks/rules-of-hooks": "error", |
42 | 65 | "react-hooks/exhaustive-deps": "warn", |
|
0 commit comments