|
13 | 13 | "plugin:import/warnings", |
14 | 14 | "plugin:storybook/recommended" |
15 | 15 | ], |
16 | | - "plugins": [ |
17 | | - "@typescript-eslint", |
18 | | - "react", |
19 | | - "prettier", |
20 | | - "react-hooks", |
21 | | - "import" |
22 | | - ], |
| 16 | + "plugins": ["@typescript-eslint", "react", "prettier", "react-hooks", "import"], |
23 | 17 | "parser": "@typescript-eslint/parser", |
24 | 18 | "parserOptions": { |
25 | 19 | "ecmaVersion": 2018, |
|
28 | 22 | "jsx": true |
29 | 23 | }, |
30 | 24 | "rules": { |
31 | | - "curly": [ |
32 | | - "warn", |
33 | | - "multi-line", |
34 | | - "consistent" |
35 | | - ], |
| 25 | + "curly": ["warn", "multi-line", "consistent"], |
36 | 26 | "no-console": "off", |
37 | 27 | "no-empty-pattern": "warn", |
38 | 28 | "no-duplicate-imports": "error", |
39 | | - "import/no-unresolved": [ |
40 | | - "error", |
41 | | - { |
42 | | - "commonjs": true, |
43 | | - "amd": true |
44 | | - } |
45 | | - ], |
| 29 | + "import/no-unresolved": ["error", { "commonjs": true, "amd": true }], |
46 | 30 | "import/export": "error", |
| 31 | + // https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#eslint-plugin-import |
| 32 | + // We recommend you do not use the following import/* rules, as TypeScript provides the same checks as part of standard type checking: |
47 | 33 | "import/named": "off", |
48 | 34 | "import/namespace": "off", |
49 | 35 | "import/default": "off", |
50 | 36 | "@typescript-eslint/explicit-module-boundary-types": "off", |
51 | | - "no-unused-vars": [ |
52 | | - "warn", |
53 | | - { |
54 | | - "argsIgnorePattern": "^_", |
55 | | - "varsIgnorePattern": "^_" |
56 | | - } |
57 | | - ], |
58 | | - "@typescript-eslint/no-unused-vars": [ |
59 | | - "warn", |
60 | | - { |
61 | | - "argsIgnorePattern": "^_", |
62 | | - "varsIgnorePattern": "^_" |
63 | | - } |
64 | | - ], |
| 37 | + "no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }], |
| 38 | + "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }], |
65 | 39 | "@typescript-eslint/no-use-before-define": "off", |
66 | 40 | "@typescript-eslint/no-empty-function": "off", |
67 | 41 | "@typescript-eslint/no-empty-interface": "off", |
|
72 | 46 | "react": { |
73 | 47 | "version": "detect" |
74 | 48 | }, |
75 | | - "import/extensions": [ |
76 | | - ".js", |
77 | | - ".jsx", |
78 | | - ".ts", |
79 | | - ".tsx" |
80 | | - ], |
| 49 | + "import/extensions": [".js", ".jsx", ".ts", ".tsx"], |
81 | 50 | "import/parsers": { |
82 | | - "@typescript-eslint/parser": [ |
83 | | - ".js", |
84 | | - ".jsx", |
85 | | - ".ts", |
86 | | - ".tsx" |
87 | | - ] |
| 51 | + "@typescript-eslint/parser": [".js", ".jsx", ".ts", ".tsx"] |
88 | 52 | }, |
89 | 53 | "import/resolver": { |
90 | 54 | "node": { |
91 | | - "extensions": [ |
92 | | - ".js", |
93 | | - ".jsx", |
94 | | - ".ts", |
95 | | - ".tsx", |
96 | | - ".json" |
97 | | - ], |
98 | | - "paths": [ |
99 | | - "src" |
100 | | - ] |
| 55 | + "extensions": [".js", ".jsx", ".ts", ".tsx", ".json"], |
| 56 | + "paths": ["src"] |
101 | 57 | }, |
102 | 58 | "alias": { |
103 | | - "extensions": [ |
104 | | - ".js", |
105 | | - ".jsx", |
106 | | - ".ts", |
107 | | - ".tsx", |
108 | | - ".json" |
109 | | - ], |
110 | | - "map": [ |
111 | | - [ |
112 | | - "@react-three/postprocessing", |
113 | | - "./src/index.tsx" |
114 | | - ] |
115 | | - ] |
| 59 | + "extensions": [".js", ".jsx", ".ts", ".tsx", ".json"], |
| 60 | + "map": [["@react-three/postprocessing", "./src/index.tsx"]] |
116 | 61 | } |
117 | 62 | } |
118 | 63 | }, |
119 | 64 | "overrides": [ |
120 | 65 | { |
121 | | - "files": [ |
122 | | - "src" |
123 | | - ], |
| 66 | + "files": ["src"], |
124 | 67 | "parserOptions": { |
125 | 68 | "project": "./tsconfig.json" |
126 | 69 | } |
|
0 commit comments