|
6 | 6 | }, |
7 | 7 | "extends": "eslint:recommended", |
8 | 8 | "parserOptions": { |
9 | | - "sourceType": "module" |
| 9 | + "sourceType": "module", |
| 10 | + "ecmaVersion": 2015 |
10 | 11 | }, |
11 | 12 | "rules": { |
12 | 13 | "array-bracket-spacing": [2, "always"], |
|
22 | 23 | "strict": 0, |
23 | 24 | "space-before-blocks": [2, "always"], |
24 | 25 | "space-before-function-paren": [2, {"anonymous":"always","named":"never"}] |
25 | | - } |
| 26 | + }, |
| 27 | + "overrides": [ |
| 28 | + { |
| 29 | + "parser": "@typescript-eslint/parser", |
| 30 | + "files": ["**/*.ts", "**/*.tsx"], |
| 31 | + "parserOptions": { |
| 32 | + "ecmaVersion": 2020, |
| 33 | + "sourceType": "module" |
| 34 | + }, |
| 35 | + "env": { "jest": true }, |
| 36 | + "extends": [ |
| 37 | + "eslint:recommended", |
| 38 | + "plugin:@typescript-eslint/eslint-recommended", |
| 39 | + "plugin:@typescript-eslint/recommended" |
| 40 | + ], |
| 41 | + "rules": { |
| 42 | + "@typescript-eslint/ban-ts-comment": "off", |
| 43 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 44 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 45 | + "@typescript-eslint/no-explicit-any": "off", |
| 46 | + "@typescript-eslint/no-unused-vars": "off", |
| 47 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 48 | + "@typescript-eslint/no-shadow": ["error"], |
| 49 | + "@typescript-eslint/no-use-before-define": ["error"], |
| 50 | + "@typescript-eslint/ban-types": "off", |
| 51 | + "prefer-rest-params": "off", |
| 52 | + "prefer-rest": "off", |
| 53 | + "prefer-spread": "off" |
| 54 | + } |
| 55 | + }, |
| 56 | + { |
| 57 | + "files": ["**/test/**/*.ts"], |
| 58 | + "rules": { |
| 59 | + "consistent-return": "off", |
| 60 | + "max-lines": "off", |
| 61 | + "@typescript-eslint/ban-ts-comment": "off", |
| 62 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 63 | + "@typescript-eslint/no-empty-function": "off", |
| 64 | + "@typescript-eslint/no-explicit-any": "off", |
| 65 | + "@typescript-eslint/no-floating-promises": "off", |
| 66 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 67 | + "@typescript-eslint/no-unused-vars": "off", |
| 68 | + "@typescript-eslint/camelcase": "off", |
| 69 | + "import/max-dependencies": "off", |
| 70 | + "sonarjs/no-duplicate-string": "off" |
| 71 | + } |
| 72 | + } |
| 73 | + ] |
26 | 74 | } |
0 commit comments