|
1 | 1 | { |
2 | | - "plugins": ["jest", "@typescript-eslint", "github"], |
3 | | - "extends": ["plugin:github/recommended"], |
| 2 | + "plugins": ["jest", "@typescript-eslint"], |
| 3 | + "extends": [ |
| 4 | + "eslint:recommended", |
| 5 | + "plugin:@typescript-eslint/recommended", |
| 6 | + "plugin:prettier/recommended" |
| 7 | + ], |
4 | 8 | "parser": "@typescript-eslint/parser", |
5 | 9 | "parserOptions": { |
6 | 10 | "ecmaVersion": 9, |
|
10 | 14 | "globals": { |
11 | 15 | "fetch": true |
12 | 16 | }, |
| 17 | + "env": { |
| 18 | + "node": true, |
| 19 | + "es6": true, |
| 20 | + "jest/globals": true |
| 21 | + }, |
13 | 22 | "rules": { |
14 | | - "eslint-comments/no-use": "off", |
15 | | - "import/no-namespace": "off", |
16 | | - "no-unused-vars": "off", |
17 | | - "@typescript-eslint/no-unused-vars": "error", |
18 | | - "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], |
19 | | - "@typescript-eslint/no-require-imports": "error", |
20 | | - "@typescript-eslint/array-type": "error", |
21 | | - "@typescript-eslint/await-thenable": "error", |
22 | | - "@typescript-eslint/ban-ts-comment": "error", |
23 | | - "camelcase": "off", |
24 | | - "@typescript-eslint/naming-convention": [ |
| 23 | + "@typescript-eslint/ban-types": [ |
25 | 24 | "error", |
26 | 25 | { |
27 | | - "selector": "default", |
28 | | - "format": ["camelCase", "UPPER_CASE", "StrictPascalCase"] |
| 26 | + "types": { |
| 27 | + "Number": { |
| 28 | + "message": "Use number instead", |
| 29 | + "fixWith": "number" |
| 30 | + }, |
| 31 | + "String": { |
| 32 | + "message": "Use string instead", |
| 33 | + "fixWith": "string" |
| 34 | + }, |
| 35 | + "Boolean": { |
| 36 | + "message": "Use boolean instead", |
| 37 | + "fixWith": "boolean" |
| 38 | + }, |
| 39 | + "Object": { |
| 40 | + "message": "Use object instead", |
| 41 | + "fixWith": "object" |
| 42 | + }, |
| 43 | + "{}": { |
| 44 | + "message": "Use object instead", |
| 45 | + "fixWith": "object" |
| 46 | + }, |
| 47 | + "Symbol": { |
| 48 | + "message": "Use symbol instead", |
| 49 | + "fixWith": "symbol" |
| 50 | + } |
| 51 | + } |
29 | 52 | } |
30 | 53 | ], |
31 | | - "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], |
32 | | - "@typescript-eslint/func-call-spacing": ["error", "never"], |
33 | | - "@typescript-eslint/no-array-constructor": "error", |
34 | | - "@typescript-eslint/no-empty-interface": "error", |
35 | | - "@typescript-eslint/no-explicit-any": "off", |
36 | | - "@typescript-eslint/no-extraneous-class": "error", |
37 | | - "@typescript-eslint/no-for-in-array": "error", |
38 | | - "@typescript-eslint/no-inferrable-types": "error", |
39 | | - "@typescript-eslint/no-misused-new": "error", |
40 | | - "@typescript-eslint/no-namespace": "error", |
41 | | - "@typescript-eslint/no-non-null-assertion": "warn", |
42 | | - "@typescript-eslint/no-unnecessary-qualifier": "error", |
43 | | - "@typescript-eslint/no-unnecessary-type-assertion": "error", |
44 | | - "@typescript-eslint/no-useless-constructor": "error", |
45 | | - "@typescript-eslint/no-var-requires": "error", |
46 | | - "@typescript-eslint/prefer-for-of": "warn", |
47 | | - "@typescript-eslint/prefer-function-type": "warn", |
48 | | - "@typescript-eslint/prefer-includes": "error", |
49 | | - "@typescript-eslint/prefer-string-starts-ends-with": "error", |
50 | | - "@typescript-eslint/promise-function-async": "error", |
51 | | - "@typescript-eslint/require-array-sort-compare": "error", |
52 | | - "@typescript-eslint/restrict-plus-operands": "error", |
53 | | - "semi": "off", |
54 | | - "@typescript-eslint/semi": ["error", "never"], |
55 | | - "@typescript-eslint/type-annotation-spacing": "error", |
56 | | - "@typescript-eslint/unbound-method": "error", |
57 | | - "no-console": "off", |
58 | | - "no-shadow": "off", // replaced by ts-eslint rule below |
59 | | - "@typescript-eslint/no-shadow": "error" |
| 54 | + "@typescript-eslint/array-type": ["error", {"default": "array"}], |
| 55 | + "@typescript-eslint/explicit-module-boundary-types": "error", |
| 56 | + "@typescript-eslint/no-explicit-any": "error", |
| 57 | + "@typescript-eslint/no-unused-vars": "error", |
| 58 | + "@typescript-eslint/explicit-function-return-type": "error", |
| 59 | + "object-shorthand": ["error", "always"], |
| 60 | + "prefer-destructuring": [ |
| 61 | + "error", |
| 62 | + { |
| 63 | + "array": false, |
| 64 | + "object": true |
60 | 65 | }, |
61 | | - "env": { |
62 | | - "node": true, |
63 | | - "es6": true, |
64 | | - "jest/globals": true |
| 66 | + { |
| 67 | + "enforceForRenamedProperties": false |
| 68 | + } |
| 69 | + ], |
| 70 | + "no-console": ["error", {"allow": ["warn", "error"]}], |
| 71 | + "no-alert": "error", |
| 72 | + "no-debugger": "error" |
65 | 73 | } |
66 | 74 | } |
0 commit comments