|
1 | 1 | const aliases = require("./build/aliases.js");
|
2 | 2 | const aliasList = Object.entries(aliases).reduce(
|
3 |
| - (arr, [key, val]) => [...arr, [key, val]], |
4 |
| - [] |
| 3 | + (arr, [key, val]) => [...arr, [key, val]], |
| 4 | + [] |
5 | 5 | );
|
6 | 6 |
|
7 | 7 | module.exports = {
|
8 |
| - env: { |
9 |
| - browser: true, |
10 |
| - es2021: true, |
11 |
| - node: true, |
12 |
| - "jest/globals": true, |
13 |
| - }, |
14 |
| - extends: [ |
15 |
| - "eslint:recommended", |
16 |
| - "plugin:react/recommended", |
17 |
| - "plugin:react/jsx-runtime", |
18 |
| - "plugin:import/recommended", |
19 |
| - "plugin:@typescript-eslint/recommended", |
20 |
| - ], |
21 |
| - parser: "@typescript-eslint/parser", |
22 |
| - parserOptions: { |
23 |
| - ecmaFeatures: { |
24 |
| - jsx: true, |
| 8 | + env: { |
| 9 | + "browser": true, |
| 10 | + "es2021": true, |
| 11 | + "node": true, |
| 12 | + "jest/globals": true, |
25 | 13 | },
|
26 |
| - ecmaVersion: 12, |
27 |
| - sourceType: "module", |
28 |
| - }, |
29 |
| - plugins: ["react", "jest", "jest-extended"], |
30 |
| - rules: { |
31 |
| - "linebreak-style": ["error", "windows"], |
32 |
| - quotes: ["error", "double"], |
33 |
| - "no-extra-semi": ["error"], |
34 |
| - "no-console": ["warn", { allow: ["error"] }], |
35 |
| - "react/display-name": 0, |
36 |
| - "react/prop-types": 0, |
37 |
| - "no-empty": ["error", { allowEmptyCatch: true }], |
38 |
| - "import/no-duplicates": 0, |
39 |
| - "import/no-unresolved": 0, |
40 |
| - "import/namespace": 0, |
41 |
| - "import/named": 0, |
42 |
| - "no-unused-vars": "off", |
43 |
| - "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], |
44 |
| - "no-empty-function": "off", |
45 |
| - "@typescript-eslint/no-empty-function": "off", |
46 |
| - "@typescript-eslint/ban-ts-comment": "off", |
47 |
| - "@typescript-eslint/no-explicit-any": "off", |
48 |
| - "@typescript-eslint/no-empty-interface": "off", |
49 |
| - "@typescript-eslint/no-var-requires": "off", |
50 |
| - "@typescript-eslint/no-non-null-assertion": "off", |
51 |
| - }, |
52 |
| - globals: { |
53 |
| - __static: true, |
54 |
| - }, |
55 |
| - settings: { |
56 |
| - react: { |
57 |
| - pragma: "React", |
58 |
| - fragment: "Fragment", |
59 |
| - version: "18.0.0", |
| 14 | + extends: [ |
| 15 | + "eslint:recommended", |
| 16 | + "plugin:react/recommended", |
| 17 | + "plugin:react/jsx-runtime", |
| 18 | + "plugin:import/recommended", |
| 19 | + "plugin:@typescript-eslint/recommended", |
| 20 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 21 | + "plugin:@typescript-eslint/strict", |
| 22 | + "prettier", |
| 23 | + ], |
| 24 | + parser: "@typescript-eslint/parser", |
| 25 | + parserOptions: { |
| 26 | + ecmaFeatures: { |
| 27 | + jsx: true, |
| 28 | + }, |
| 29 | + ecmaVersion: 12, |
| 30 | + sourceType: "module", |
| 31 | + tsconfigRootDir: __dirname, |
| 32 | + project: ["./tsconfig.json"], |
| 33 | + debugLevel: true, |
60 | 34 | },
|
61 |
| - "import/resolver": { |
62 |
| - alias: { |
63 |
| - map: [...aliasList, ["common", "./src/common"]], |
64 |
| - extensions: [".js", ".jsx", ".ts", ".tsx"], |
65 |
| - }, |
| 35 | + plugins: ["react", "jest", "jest-extended", "jsx-a11y"], |
| 36 | + rules: { |
| 37 | + "quotes": ["error", "double"], |
| 38 | + "no-extra-semi": ["error"], |
| 39 | + "no-console": ["warn", { allow: ["error"] }], |
| 40 | + "liebreak-style": 0, |
| 41 | + "no-empty": ["error", { allowEmptyCatch: true }], |
| 42 | + "no-unused-vars": "off", |
| 43 | + "no-empty-function": "off", |
| 44 | + "object-curly-spacing": ["error", "always"], |
| 45 | + "space-in-parens": ["error", "always", { exceptions: ["empty"] }], |
| 46 | + "computed-property-spacing": ["error", "never"], |
| 47 | + "object-curly-newline": [ |
| 48 | + "error", |
| 49 | + { |
| 50 | + multiline: true, |
| 51 | + consistent: true, |
| 52 | + }, |
| 53 | + ], |
| 54 | + "padded-blocks": [ "error", "never", { allowSingleLineBlocks: true }], |
| 55 | + |
| 56 | + "react/display-name": 0, |
| 57 | + "react/prop-types": 0, |
| 58 | + |
| 59 | + "import/no-duplicates": 0, |
| 60 | + "import/no-unresolved": 0, |
| 61 | + "import/namespace": 0, |
| 62 | + "import/named": 0, |
| 63 | + "import/default": 0, |
| 64 | + "import/no-named-as-default-member": 0, |
| 65 | + |
| 66 | + "@typescript-eslint/no-unused-vars": [ |
| 67 | + "error", |
| 68 | + { argsIgnorePattern: "^_" }, |
| 69 | + ], |
| 70 | + "@typescript-eslint/no-empty-function": "off", |
| 71 | + "@typescript-eslint/ban-ts-comment": "off", |
| 72 | + "@typescript-eslint/no-explicit-any": "off", |
| 73 | + "@typescript-eslint/no-empty-interface": "off", |
| 74 | + "@typescript-eslint/no-var-requires": "off", |
| 75 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 76 | + |
| 77 | + "@typescript-eslint/no-misused-promises": "off", |
| 78 | + "@typescript-eslint/no-floating-promises": "off", |
| 79 | + }, |
| 80 | + globals: { |
| 81 | + __static: true, |
| 82 | + }, |
| 83 | + settings: { |
| 84 | + "react": { |
| 85 | + pragma: "React", |
| 86 | + fragment: "Fragment", |
| 87 | + version: "18.0.0", |
| 88 | + }, |
| 89 | + "import/resolver": { |
| 90 | + alias: { |
| 91 | + map: [...aliasList, ["common", "./src/common"]], |
| 92 | + extensions: [".js", ".jsx", ".ts", ".tsx"], |
| 93 | + }, |
| 94 | + }, |
| 95 | + "import/ignore": [".worker.js"], |
66 | 96 | },
|
67 |
| - "import/ignore": [".worker.js"], |
68 |
| - }, |
69 | 97 | };
|
0 commit comments