|
1 | 1 | module.exports = { |
2 | | - "env": { |
3 | | - "browser": true, |
4 | | - "node": true, |
5 | | - "commonjs": true, |
6 | | - "es6": true, |
7 | | - "jest": true |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + node: true, |
| 5 | + commonjs: true, |
| 6 | + es6: true, |
| 7 | + jest: true |
8 | 8 | }, |
9 | | - "extends": "eslint:recommended", |
10 | | - "parser": "@babel/eslint-parser", |
11 | | - "parserOptions": { |
12 | | - "ecmaFeatures": { |
13 | | - "experimentalObjectRestSpread": true, |
14 | | - "jsx": true |
15 | | - }, |
16 | | - "sourceType": "module" |
| 9 | + extends: ['eslint:recommended'], |
| 10 | + parserOptions: { |
| 11 | + ecmaVersion: 'latest', |
| 12 | + sourceType: 'module' |
17 | 13 | }, |
18 | | - "plugins": [ |
19 | | - "jest" |
20 | | - ], |
21 | | - "globals": { |
22 | | - "VERSION": true, |
| 14 | + |
| 15 | + globals: { |
| 16 | + VERSION: true, |
23 | 17 | page: true, |
24 | | - browser: true, |
25 | | - context: true, |
26 | | - jestPuppeteer: true, |
27 | | - RequestInterceptor: true, |
28 | | - RequestSpy: true, |
29 | | - ResponseFaker: true |
| 18 | + browser: true |
30 | 19 | }, |
31 | | - "rules": { |
32 | | - "accessor-pairs": "error", |
33 | | - "array-bracket-spacing": [ |
34 | | - "error", |
35 | | - "never" |
36 | | - ], |
37 | | - "array-callback-return": "error", |
38 | | - "arrow-parens": "off", |
39 | | - "arrow-spacing": [ |
40 | | - "error", |
41 | | - { |
42 | | - "after": true, |
43 | | - "before": true |
44 | | - } |
45 | | - ], |
46 | | - "block-scoped-var": "error", |
47 | | - "block-spacing": "error", |
48 | | - "brace-style": [ |
49 | | - "error", |
50 | | - "1tbs" |
51 | | - ], |
52 | | - "callback-return": "off", |
53 | | - "camelcase": "off", |
54 | | - "comma-dangle": "error", |
55 | | - "comma-spacing": [ |
56 | | - "error", |
57 | | - { |
58 | | - "after": true, |
59 | | - "before": false |
60 | | - } |
61 | | - ], |
62 | | - "comma-style": [ |
63 | | - "error", |
64 | | - "last" |
65 | | - ], |
66 | | - "complexity": "error", |
67 | | - "computed-property-spacing": [ |
68 | | - "error", |
69 | | - "never" |
70 | | - ], |
71 | | - "consistent-return": "off", |
72 | | - "consistent-this": "off", |
73 | | - "curly": "error", |
74 | | - "default-case": "error", |
75 | | - "dot-location": [ |
76 | | - "error", |
77 | | - "property" |
78 | | - ], |
79 | | - "dot-notation": "error", |
80 | | - "eol-last": "off", |
81 | | - "eqeqeq": "error", |
82 | | - "func-names": [ |
83 | | - "off", |
84 | | - "never" |
85 | | - ], |
86 | | - "func-style": [ |
87 | | - "off", |
88 | | - "expression" |
89 | | - ], |
90 | | - "generator-star-spacing": "error", |
91 | | - "global-require": "error", |
92 | | - "guard-for-in": "error", |
93 | | - "handle-callback-err": "error", |
94 | | - "id-blacklist": "error", |
95 | | - "id-length": "off", |
96 | | - "id-match": "error", |
97 | | - "indent": ["error", 2, {"SwitchCase": 1}], |
98 | | - "init-declarations": "error", |
99 | | - "jsx-quotes": [ |
100 | | - "error", |
101 | | - "prefer-double" |
102 | | - ], |
103 | | - "key-spacing": "error", |
104 | | - "keyword-spacing": [ |
105 | | - "error", |
106 | | - { |
107 | | - "after": true, |
108 | | - "before": true |
109 | | - } |
110 | | - ], |
111 | | - "linebreak-style": [ |
112 | | - "error", |
113 | | - "unix" |
114 | | - ], |
115 | | - "lines-around-comment": "error", |
116 | | - "max-depth": "error", |
117 | | - "max-len": "off", |
118 | | - "max-lines": "off", |
119 | | - "max-nested-callbacks": "error", |
120 | | - "max-params": "off", |
121 | | - "max-statements": "off", |
122 | | - "max-statements-per-line": "error", |
123 | | - "new-cap": "error", |
124 | | - "new-parens": "error", |
125 | | - "newline-after-var": "off", |
126 | | - "newline-before-return": "off", |
127 | | - "newline-per-chained-call": "off", |
128 | | - "no-alert": "error", |
129 | | - "no-array-constructor": "error", |
130 | | - "no-bitwise": "error", |
131 | | - "no-caller": "error", |
132 | | - "no-catch-shadow": "error", |
133 | | - "no-confusing-arrow": "off", |
134 | | - "no-continue": "error", |
135 | | - "no-console": "off", |
136 | | - "no-div-regex": "error", |
137 | | - "no-duplicate-imports": "error", |
138 | | - "no-else-return": "off", |
139 | | - "no-empty-function": "error", |
140 | | - "no-eq-null": "error", |
141 | | - "no-eval": "error", |
142 | | - "no-extend-native": "error", |
143 | | - "no-extra-bind": "error", |
144 | | - "no-extra-label": "error", |
145 | | - "no-extra-parens": "off", |
146 | | - "no-floating-decimal": "error", |
147 | | - "no-implicit-globals": "error", |
148 | | - "no-implied-eval": "error", |
149 | | - "no-inline-comments": "off", |
150 | | - "no-invalid-this": "off", |
151 | | - "no-iterator": "error", |
152 | | - "no-label-var": "error", |
153 | | - "no-labels": "error", |
154 | | - "no-lone-blocks": "error", |
155 | | - "no-lonely-if": "error", |
156 | | - "no-loop-func": "error", |
157 | | - "no-magic-numbers": "off", |
158 | | - "no-mixed-operators": "off", |
159 | | - "no-mixed-requires": "error", |
160 | | - "no-multi-spaces": "error", |
161 | | - "no-multi-str": "error", |
162 | | - "no-multiple-empty-lines": "error", |
163 | | - "no-negated-condition": "off", |
164 | | - "no-nested-ternary": "error", |
165 | | - "no-new": "error", |
166 | | - "no-new-func": "error", |
167 | | - "no-new-object": "error", |
168 | | - "no-new-require": "error", |
169 | | - "no-new-wrappers": "error", |
170 | | - "no-octal-escape": "error", |
171 | | - "no-param-reassign": "off", |
172 | | - "no-path-concat": "error", |
173 | | - "no-plusplus": "off", |
174 | | - "no-process-env": "off", |
175 | | - "no-process-exit": "error", |
176 | | - "no-proto": "error", |
177 | | - "no-prototype-builtins": "error", |
178 | | - "no-restricted-globals": "error", |
179 | | - "no-restricted-imports": "error", |
180 | | - "no-restricted-modules": "error", |
181 | | - "no-restricted-syntax": "error", |
182 | | - "no-return-assign": "error", |
183 | | - "no-script-url": "error", |
184 | | - "no-self-compare": "error", |
185 | | - "no-sequences": "error", |
186 | | - "no-shadow": "off", |
187 | | - "no-shadow-restricted-names": "error", |
188 | | - "no-spaced-func": "error", |
189 | | - "no-sync": "error", |
190 | | - "no-ternary": "off", |
191 | | - "no-throw-literal": "error", |
192 | | - "no-undef-init": "error", |
193 | | - "no-undefined": "off", |
194 | | - "no-underscore-dangle": "off", |
195 | | - "no-unmodified-loop-condition": "error", |
196 | | - "no-unneeded-ternary": "error", |
197 | | - "no-unused-expressions": "off", |
198 | | - "no-unused-vars": "warn", |
199 | | - "no-use-before-define": "off", |
200 | | - "no-useless-call": "error", |
201 | | - "no-useless-computed-key": "error", |
202 | | - "no-useless-concat": "error", |
203 | | - "no-useless-constructor": "error", |
204 | | - "no-useless-escape": "off", |
205 | | - "no-useless-rename": "error", |
206 | | - "no-var": "error", |
207 | | - "no-void": "error", |
208 | | - "no-warning-comments": "off", |
209 | | - "no-whitespace-before-property": "error", |
210 | | - "no-with": "error", |
211 | | - "object-curly-spacing": [ |
212 | | - "warn", |
213 | | - "always" |
214 | | - ], |
215 | | - "object-property-newline": [ |
216 | | - "error", |
217 | | - { |
218 | | - "allowMultiplePropertiesPerLine": true |
219 | | - } |
220 | | - ], |
221 | | - "one-var": "off", |
222 | | - "one-var-declaration-per-line": "error", |
223 | | - "operator-assignment": "error", |
224 | | - "operator-linebreak": "error", |
225 | | - "padded-blocks": "off", |
226 | | - "prefer-arrow-callback": "off", |
227 | | - "prefer-const": "off", |
228 | | - "prefer-reflect": "off", |
229 | | - "prefer-rest-params": "error", |
230 | | - "prefer-spread": "error", |
231 | | - "prefer-template": "off", |
232 | | - "quote-props": "off", |
233 | | - "quotes": [ |
234 | | - "error", |
235 | | - "single" |
236 | | - ], |
237 | | - "no-this-before-super": "off", |
238 | | - "radix": "error", |
239 | | - "rest-spread-spacing": "error", |
240 | | - "semi": ["warn", "always"], |
241 | | - "semi-spacing": "error", |
242 | | - "sort-imports": "off", |
243 | | - "sort-vars": "error", |
244 | | - "space-before-blocks": "error", |
245 | | - "space-before-function-paren": "off", |
246 | | - "space-in-parens": [ |
247 | | - "error", |
248 | | - "never" |
249 | | - ], |
250 | | - "space-infix-ops": "error", |
251 | | - "space-unary-ops": "error", |
252 | | - "spaced-comment": [ |
253 | | - "error", |
254 | | - "always" |
255 | | - ], |
256 | | - "strict": "error", |
257 | | - "template-curly-spacing": [ |
258 | | - "error", |
259 | | - "never" |
260 | | - ], |
261 | | - "unicode-bom": [ |
262 | | - "error", |
263 | | - "never" |
264 | | - ], |
265 | | - "valid-jsdoc": "off", |
266 | | - "vars-on-top": "error", |
267 | | - "wrap-iife": "error", |
268 | | - "wrap-regex": "off", |
269 | | - "yield-star-spacing": "error", |
270 | | - "yoda": [ |
271 | | - "error", |
272 | | - "never" |
273 | | - ] |
| 20 | + rules: { |
| 21 | + indent: ['error', 2, { SwitchCase: 1 }], |
| 22 | + 'linebreak-style': ['error', 'unix'], |
| 23 | + quotes: ['error', 'single'], |
| 24 | + semi: ['warn', 'always'], |
| 25 | + 'no-console': 'off', |
| 26 | + 'no-unused-vars': 'warn', |
| 27 | + 'no-useless-escape': 'off' |
274 | 28 | } |
275 | 29 | }; |
0 commit comments