|
1 | 1 | module.exports = {
|
2 |
| - "env": { |
3 |
| - "es6": true, |
4 |
| - "jasmine": true, |
5 |
| - "node": true, |
6 |
| - "worker": true, |
| 2 | + env: { |
| 3 | + es6: true, |
| 4 | + jasmine: true, |
| 5 | + node: true, |
| 6 | + worker: true, |
7 | 7 | },
|
8 |
| - "parser": "@typescript-eslint/parser", |
9 |
| - "parserOptions": { |
10 |
| - "ecmaVersion": 2018, |
11 |
| - "project": "./tsconfig.eslint.json", |
| 8 | + parser: "@typescript-eslint/parser", |
| 9 | + parserOptions: { |
| 10 | + ecmaVersion: 2020, |
| 11 | + project: "../tsconfig.eslint.json", |
12 | 12 | },
|
13 |
| - "plugins": ["@typescript-eslint", "prettier", "simple-import-sort", "import"], |
14 |
| - "extends": [ |
| 13 | + plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"], |
| 14 | + extends: [ |
15 | 15 | "eslint:recommended",
|
16 | 16 | "plugin:@typescript-eslint/recommended",
|
17 | 17 | "prettier",
|
18 | 18 | "plugin:prettier/recommended",
|
19 | 19 | "plugin:import/typescript",
|
20 | 20 | ],
|
21 |
| - "rules": { |
22 |
| - "curly": ["warn", "multi-line", "consistent"], |
| 21 | + rules: { |
| 22 | + curly: ["warn", "multi-line", "consistent"], |
23 | 23 | "no-bitwise": "warn",
|
24 |
| - "no-console": ["warn", { "allow": ["error", "info", "table", "warn"] }], |
| 24 | + "no-console": ["warn", { allow: ["error", "info", "table", "warn"] }], |
25 | 25 | "no-param-reassign": "warn",
|
26 | 26 | "no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
27 | 27 | "no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
28 | 28 | "prefer-const": "warn",
|
29 |
| - "radix": ["warn", "always"], |
30 |
| - "spaced-comment": ["warn", "always", { "line": { "markers": ["/ <reference"] } }], |
| 29 | + radix: ["warn", "always"], |
| 30 | + "spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }], |
31 | 31 | "import/no-cycle": "warn",
|
32 | 32 | "simple-import-sort/imports": "warn",
|
33 |
| - "@typescript-eslint/array-type": ["warn", { "default": "array-simple" }], |
| 33 | + "@typescript-eslint/array-type": ["warn", { default: "array-simple" }], |
34 | 34 | "@typescript-eslint/await-thenable": "warn",
|
35 | 35 | "@typescript-eslint/ban-types": "warn",
|
36 |
| - "@typescript-eslint/explicit-function-return-type": ["warn", { "allowExpressions": true }], |
| 36 | + "@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }], |
37 | 37 | "@typescript-eslint/explicit-member-accessibility": "warn",
|
38 |
| - "@typescript-eslint/naming-convention": [ |
39 |
| - "warn", |
40 |
| - { |
41 |
| - "selector": "default", |
42 |
| - "format": ["strictCamelCase"], |
43 |
| - }, |
44 |
| - { |
45 |
| - "selector": "typeLike", |
46 |
| - "format": ["StrictPascalCase"], |
47 |
| - }, |
48 |
| - { |
49 |
| - "selector": "enumMember", |
50 |
| - "format": ["StrictPascalCase"], |
51 |
| - }, |
52 |
| - { |
53 |
| - "selector": "variable", |
54 |
| - "format": ["strictCamelCase"], |
55 |
| - "leadingUnderscore": "allow", |
56 |
| - }, |
57 |
| - { |
58 |
| - "selector": "parameter", |
59 |
| - "format": ["strictCamelCase"], |
60 |
| - "leadingUnderscore": "allow", |
61 |
| - }, |
62 |
| - ], |
| 38 | + // "@typescript-eslint/naming-convention": [ |
| 39 | + // "warn", |
| 40 | + // { |
| 41 | + // selector: "default", |
| 42 | + // format: ["strictCamelCase"], |
| 43 | + // }, |
| 44 | + // { |
| 45 | + // selector: "typeLike", |
| 46 | + // format: ["StrictPascalCase"], |
| 47 | + // }, |
| 48 | + // { |
| 49 | + // selector: "enumMember", |
| 50 | + // format: ["StrictPascalCase"], |
| 51 | + // }, |
| 52 | + // { |
| 53 | + // selector: "variable", |
| 54 | + // format: ["strictCamelCase"], |
| 55 | + // leadingUnderscore: "allow", |
| 56 | + // }, |
| 57 | + // { |
| 58 | + // selector: "parameter", |
| 59 | + // format: ["strictCamelCase"], |
| 60 | + // leadingUnderscore: "allow", |
| 61 | + // }, |
| 62 | + // ], |
63 | 63 | "@typescript-eslint/no-dynamic-delete": "warn",
|
64 | 64 | "@typescript-eslint/no-empty-function": "off",
|
65 | 65 | "@typescript-eslint/no-empty-interface": "off",
|
66 | 66 | "@typescript-eslint/no-explicit-any": "off",
|
67 | 67 | "@typescript-eslint/no-floating-promises": "warn",
|
68 | 68 | "@typescript-eslint/no-parameter-properties": "warn",
|
69 | 69 | "@typescript-eslint/no-shadow": "warn",
|
70 |
| - "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }], |
| 70 | + "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }], |
71 | 71 | "@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
72 | 72 | "@typescript-eslint/no-use-before-define": "warn",
|
73 | 73 | "@typescript-eslint/prefer-readonly": "warn",
|
74 | 74 | },
|
75 |
| - "overrides": [ |
| 75 | + overrides: [ |
76 | 76 | {
|
77 |
| - "files": "**/*.js", |
78 |
| - "rules": { |
| 77 | + files: "**/*.js", |
| 78 | + rules: { |
79 | 79 | "@typescript-eslint/no-var-requires": "off",
|
80 | 80 | "@typescript-eslint/explicit-function-return-type": "off",
|
81 | 81 | "@typescript-eslint/explicit-member-accessibility": "off",
|
82 | 82 | },
|
83 | 83 | },
|
84 | 84 | {
|
85 |
| - "files": "**/*.spec.ts", |
86 |
| - "rules": { |
| 85 | + files: "**/*.spec.ts", |
| 86 | + rules: { |
87 | 87 | "@typescript-eslint/no-non-null-assertion": "off",
|
88 | 88 | },
|
89 | 89 | },
|
90 | 90 | ],
|
91 |
| -} |
| 91 | +}; |
0 commit comments