diff options
Diffstat (limited to '.eslintrc.json')
-rw-r--r-- | .eslintrc.json | 71 |
1 files changed, 57 insertions, 14 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index c0512ef..82f5d58 100644 --- a/.eslintrc.json +++ b/.eslintrc.json | |||
@@ -1,15 +1,14 @@ | |||
1 | { | 1 | { |
2 | "root": true, | 2 | "root": true, |
3 | "env": { | 3 | "env": { |
4 | "node": true, | ||
4 | "browser": true, | 5 | "browser": true, |
5 | "es2021": true | 6 | "es2021": true |
6 | }, | 7 | }, |
7 | "extends": [ | 8 | "extends": [ |
8 | "eslint:recommended", | 9 | "eslint-config-airbnb-typescript", |
9 | "plugin:react/recommended", | ||
10 | "plugin:import/recommended", | 10 | "plugin:import/recommended", |
11 | "plugin:import/typescript", | 11 | "plugin:import/typescript" |
12 | "airbnb-typescript" | ||
13 | ], | 12 | ], |
14 | "parser": "@typescript-eslint/parser", | 13 | "parser": "@typescript-eslint/parser", |
15 | "parserOptions": { | 14 | "parserOptions": { |
@@ -32,17 +31,43 @@ | |||
32 | } | 31 | } |
33 | ], | 32 | ], |
34 | "quotes": [ | 33 | "quotes": [ |
35 | 2, | 34 | "error", |
36 | "single" | 35 | "single" |
37 | ], | 36 | ], |
38 | "linebreak-style": [ | 37 | "linebreak-style": [ |
39 | 2, | 38 | "error", |
40 | "unix" | 39 | "unix" |
41 | ], | 40 | ], |
42 | "semi": [ | 41 | "semi": [ |
43 | 2, | 42 | "error", |
44 | "always" | 43 | "always" |
45 | ], | 44 | ], |
45 | "import/extensions": [ | ||
46 | "error", | ||
47 | "ignorePackages", | ||
48 | { | ||
49 | "js": "always", | ||
50 | "jsx": "always", | ||
51 | "json": "never", | ||
52 | "ts": "never", | ||
53 | "tsx": "never" | ||
54 | } | ||
55 | ], | ||
56 | "import/no-unresolved": [ | ||
57 | "error", | ||
58 | { | ||
59 | "caseSensitive": false | ||
60 | } | ||
61 | ], | ||
62 | "import/no-extraneous-dependencies": [ | ||
63 | "error", | ||
64 | { | ||
65 | // "devDependencies": true, | ||
66 | // "optionalDependencies": true, | ||
67 | // "peerDependencies": true, | ||
68 | "bundledDependencies": true | ||
69 | } | ||
70 | ], | ||
46 | // Best practices | 71 | // Best practices |
47 | "block-scoped-var": 1, | 72 | "block-scoped-var": 1, |
48 | "complexity": [ | 73 | "complexity": [ |
@@ -53,7 +78,8 @@ | |||
53 | "curly": 1, | 78 | "curly": 1, |
54 | "default-case": 1, | 79 | "default-case": 1, |
55 | "dot-location": [ | 80 | "dot-location": [ |
56 | 1, "property" | 81 | 1, |
82 | "property" | ||
57 | ], | 83 | ], |
58 | "dot-notation": 1, | 84 | "dot-notation": 1, |
59 | "eqeqeq": 2, | 85 | "eqeqeq": 2, |
@@ -80,9 +106,9 @@ | |||
80 | "no-lone-blocks": 1, | 106 | "no-lone-blocks": 1, |
81 | "no-loop-func": 2, | 107 | "no-loop-func": 2, |
82 | "no-magic-numbers": [ | 108 | "no-magic-numbers": [ |
83 | 2, | 109 | "error", |
84 | { | 110 | { |
85 | "ignore": [ | 111 | "ignore": [ |
86 | -1, | 112 | -1, |
87 | 0, | 113 | 0, |
88 | 1, | 114 | 1, |
@@ -115,7 +141,8 @@ | |||
115 | "no-throw-literal": 2, | 141 | "no-throw-literal": 2, |
116 | "no-unused-expressions": [ | 142 | "no-unused-expressions": [ |
117 | 1, | 143 | 1, |
118 | { "allowTernary": true | 144 | { |
145 | "allowTernary": true | ||
119 | } | 146 | } |
120 | ], | 147 | ], |
121 | "no-useless-call": 2, | 148 | "no-useless-call": 2, |
@@ -127,7 +154,6 @@ | |||
127 | "vars-on-top": 0, | 154 | "vars-on-top": 0, |
128 | "wrap-iife": 2, | 155 | "wrap-iife": 2, |
129 | "yoda": 0, | 156 | "yoda": 0, |
130 | // Strict mode | ||
131 | "strict": 1, | 157 | "strict": 1, |
132 | // Variables | 158 | // Variables |
133 | "init-declarations": 0, | 159 | "init-declarations": 0, |
@@ -143,6 +169,23 @@ | |||
143 | "no-use-before-define": 2 | 169 | "no-use-before-define": 2 |
144 | }, | 170 | }, |
145 | "globals": { | 171 | "globals": { |
146 | "it": false | 172 | "__dirname": false |
147 | } | 173 | }, |
174 | "overrides": [ | ||
175 | { | ||
176 | "files": [ | ||
177 | "**/__tests__/*" | ||
178 | ], | ||
179 | "globals": { | ||
180 | "after": false, | ||
181 | "afterEach": false, | ||
182 | "beforeAll": false, | ||
183 | "beforeEach": false, | ||
184 | "describe": false, | ||
185 | "Electron": false, | ||
186 | "expect": false, | ||
187 | "it": false | ||
188 | } | ||
189 | } | ||
190 | ] | ||
148 | } | 191 | } |