@enormora/eslint-config-base 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.js +4 -178
- package/package.json +7 -6
- package/rule-sets/stylistic.js +217 -2
package/base.js
CHANGED
|
@@ -4,7 +4,7 @@ import noSecretsPlugin from 'eslint-plugin-no-secrets';
|
|
|
4
4
|
import codeSpellChecker from '@cspell/eslint-plugin';
|
|
5
5
|
import { stylisticRuleSet } from './rule-sets/stylistic.js';
|
|
6
6
|
import { bestPracticesRuleSet } from './rule-sets/best-practices.js';
|
|
7
|
-
import { ecmaVersion,
|
|
7
|
+
import { ecmaVersion, javascriptExtensions } from './constants.js';
|
|
8
8
|
|
|
9
9
|
export const baseConfig = {
|
|
10
10
|
languageOptions: {
|
|
@@ -43,13 +43,13 @@ export const baseConfig = {
|
|
|
43
43
|
...bestPracticesRuleSet.rules,
|
|
44
44
|
|
|
45
45
|
'array-callback-return': 'error',
|
|
46
|
+
camelcase: 'off',
|
|
46
47
|
'no-array-constructor': 'error',
|
|
47
48
|
'no-bitwise': 'error',
|
|
48
49
|
'no-caller': 'error',
|
|
49
50
|
'no-case-declarations': 'error',
|
|
50
51
|
'no-class-assign': 'error',
|
|
51
52
|
'no-cond-assign': 'error',
|
|
52
|
-
'no-confusing-arrow': 'error',
|
|
53
53
|
'no-console': 'error',
|
|
54
54
|
'no-const-assign': 'error',
|
|
55
55
|
'no-constant-condition': 'error',
|
|
@@ -76,10 +76,7 @@ export const baseConfig = {
|
|
|
76
76
|
'no-extra-bind': 'error',
|
|
77
77
|
'no-extra-boolean-cast': 'error',
|
|
78
78
|
'no-extra-label': 'error',
|
|
79
|
-
'no-extra-parens': 'error',
|
|
80
|
-
'no-extra-semi': 'error',
|
|
81
79
|
'no-fallthrough': 'error',
|
|
82
|
-
'no-floating-decimal': 'error',
|
|
83
80
|
'no-func-assign': 'error',
|
|
84
81
|
'no-implicit-coercion': 'error',
|
|
85
82
|
'no-implicit-globals': 'error',
|
|
@@ -95,21 +92,17 @@ export const baseConfig = {
|
|
|
95
92
|
'no-lone-blocks': 'error',
|
|
96
93
|
'no-lonely-if': 'error',
|
|
97
94
|
'no-loop-func': 'error',
|
|
98
|
-
'no-mixed-spaces-and-tabs': 'error',
|
|
99
95
|
'no-new-native-nonconstructor': 'error',
|
|
100
|
-
'linebreak-style': ['error', 'unix'],
|
|
101
|
-
'no-multi-spaces': 'error',
|
|
102
96
|
'no-multi-str': 'error',
|
|
103
|
-
'no-multiple-empty-lines': ['error', { max: 1 }],
|
|
104
97
|
'no-global-assign': 'error',
|
|
105
98
|
'no-negated-condition': 'off',
|
|
106
99
|
'no-nested-ternary': 'error',
|
|
107
100
|
'no-new': 'error',
|
|
108
101
|
'no-new-func': 'error',
|
|
109
|
-
'no-new-object': 'error',
|
|
110
102
|
'no-new-symbol': 'error',
|
|
111
103
|
'no-new-wrappers': 'error',
|
|
112
104
|
'no-obj-calls': 'error',
|
|
105
|
+
'no-object-constructor': 'error',
|
|
113
106
|
'no-octal': 'error',
|
|
114
107
|
'no-octal-escape': 'error',
|
|
115
108
|
'no-param-reassign': ['error', { props: true }],
|
|
@@ -126,9 +119,7 @@ export const baseConfig = {
|
|
|
126
119
|
'no-shadow': ['error', { builtinGlobals: true }],
|
|
127
120
|
'no-shadow-restricted-names': 'error',
|
|
128
121
|
'no-sparse-arrays': 'error',
|
|
129
|
-
'no-tabs': 'error',
|
|
130
122
|
'no-ternary': 'off',
|
|
131
|
-
'no-trailing-spaces': 'error',
|
|
132
123
|
'no-this-before-super': 'error',
|
|
133
124
|
'no-throw-literal': 'error',
|
|
134
125
|
'no-undef': ['error', { typeof: true }],
|
|
@@ -160,7 +151,6 @@ export const baseConfig = {
|
|
|
160
151
|
'no-useless-constructor': 'error',
|
|
161
152
|
'no-useless-escape': 'error',
|
|
162
153
|
'no-useless-rename': 'error',
|
|
163
|
-
'no-whitespace-before-property': 'error',
|
|
164
154
|
'no-void': 'error',
|
|
165
155
|
'prefer-const': [
|
|
166
156
|
'error',
|
|
@@ -190,19 +180,7 @@ export const baseConfig = {
|
|
|
190
180
|
ignore: [-1, 0, 1]
|
|
191
181
|
}
|
|
192
182
|
],
|
|
193
|
-
'no-mixed-operators': 'off',
|
|
194
|
-
'array-bracket-spacing': ['error', 'never'],
|
|
195
|
-
'array-bracket-newline': ['error', 'consistent'],
|
|
196
|
-
'array-element-newline': ['error', 'consistent'],
|
|
197
183
|
'arrow-body-style': ['error', 'always'],
|
|
198
|
-
'arrow-parens': ['error', 'always'],
|
|
199
|
-
'arrow-spacing': [
|
|
200
|
-
'error',
|
|
201
|
-
{
|
|
202
|
-
before: true,
|
|
203
|
-
after: true
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
184
|
'accessor-pairs': [
|
|
207
185
|
'error',
|
|
208
186
|
{
|
|
@@ -210,66 +188,24 @@ export const baseConfig = {
|
|
|
210
188
|
}
|
|
211
189
|
],
|
|
212
190
|
'block-scoped-var': 'off',
|
|
213
|
-
'block-spacing': 'off',
|
|
214
|
-
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
|
|
215
|
-
camelcase: 'off',
|
|
216
|
-
'comma-dangle': ['error', 'never'],
|
|
217
|
-
'comma-spacing': [
|
|
218
|
-
'error',
|
|
219
|
-
{
|
|
220
|
-
before: false,
|
|
221
|
-
after: true
|
|
222
|
-
}
|
|
223
|
-
],
|
|
224
|
-
'comma-style': ['error', 'last'],
|
|
225
191
|
complexity: ['error', { max: 6 }],
|
|
226
|
-
'computed-property-spacing': [
|
|
227
|
-
'error',
|
|
228
|
-
'never',
|
|
229
|
-
{
|
|
230
|
-
enforceForClassMembers: true
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
192
|
'consistent-return': 'error',
|
|
234
193
|
'consistent-this': ['error', 'self'],
|
|
235
194
|
'constructor-super': 'error',
|
|
236
|
-
'generator-star-spacing': ['error', { before: false, after: true }],
|
|
237
195
|
curly: ['error', 'all'],
|
|
238
196
|
'default-case': 'error',
|
|
239
|
-
'dot-location': ['error', 'property'],
|
|
240
197
|
'dot-notation': 'error',
|
|
241
|
-
'eol-last': 'error',
|
|
242
198
|
eqeqeq: 'error',
|
|
243
199
|
'func-names': 'off',
|
|
244
200
|
'func-style': 'off',
|
|
245
201
|
'guard-for-in': 'error',
|
|
246
202
|
'id-length': ['error', { min: 2, properties: 'never' }],
|
|
247
|
-
indent: [
|
|
248
|
-
'error',
|
|
249
|
-
indentSize,
|
|
250
|
-
{
|
|
251
|
-
SwitchCase: 1,
|
|
252
|
-
VariableDeclarator: 1,
|
|
253
|
-
MemberExpression: 1
|
|
254
|
-
}
|
|
255
|
-
],
|
|
256
203
|
'init-declarations': ['error', 'always'],
|
|
257
|
-
'jsx-quotes': 'off',
|
|
258
|
-
'key-spacing': [
|
|
259
|
-
'error',
|
|
260
|
-
{
|
|
261
|
-
beforeColon: false,
|
|
262
|
-
afterColon: true
|
|
263
|
-
}
|
|
264
|
-
],
|
|
265
|
-
'lines-around-comment': 'off',
|
|
266
204
|
'max-depth': ['error', { max: 5 }],
|
|
267
205
|
'max-lines': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
|
|
268
206
|
'max-nested-callbacks': ['error', { max: 4 }],
|
|
269
207
|
'max-params': ['error', { max: 4 }],
|
|
270
208
|
'max-statements': ['error', { max: 10 }],
|
|
271
|
-
'multiline-ternary': 'off',
|
|
272
|
-
'max-statements-per-line': ['error', { max: 1 }],
|
|
273
209
|
'new-cap': [
|
|
274
210
|
'error',
|
|
275
211
|
{
|
|
@@ -277,23 +213,9 @@ export const baseConfig = {
|
|
|
277
213
|
capIsNew: true
|
|
278
214
|
}
|
|
279
215
|
],
|
|
280
|
-
'new-parens': 'error',
|
|
281
|
-
'newline-per-chained-call': 'off',
|
|
282
|
-
'object-curly-newline': 'off',
|
|
283
|
-
'object-curly-spacing': ['error', 'always'],
|
|
284
|
-
'object-property-newline': 'off',
|
|
285
216
|
'object-shorthand': ['error', 'always'],
|
|
286
217
|
'one-var': ['error', 'never'],
|
|
287
|
-
'one-var-declaration-per-line': 'error',
|
|
288
218
|
'operator-assignment': ['error', 'always'],
|
|
289
|
-
'operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before' } }],
|
|
290
|
-
'padded-blocks': [
|
|
291
|
-
'error',
|
|
292
|
-
'never',
|
|
293
|
-
{
|
|
294
|
-
allowSingleLineBlocks: false
|
|
295
|
-
}
|
|
296
|
-
],
|
|
297
219
|
'prefer-arrow-callback': [
|
|
298
220
|
'error',
|
|
299
221
|
{
|
|
@@ -301,69 +223,19 @@ export const baseConfig = {
|
|
|
301
223
|
}
|
|
302
224
|
],
|
|
303
225
|
'prefer-rest-params': 'error',
|
|
304
|
-
'quote-props': ['error', 'as-needed'],
|
|
305
|
-
quotes: ['error', 'single', { avoidEscape: true }],
|
|
306
226
|
radix: 'error',
|
|
307
227
|
'id-match': 'off',
|
|
308
228
|
'require-yield': 'error',
|
|
309
|
-
'rest-spread-spacing': ['error', 'never'],
|
|
310
|
-
semi: ['error', 'always'],
|
|
311
|
-
'semi-spacing': [
|
|
312
|
-
'error',
|
|
313
|
-
{
|
|
314
|
-
before: false,
|
|
315
|
-
after: true
|
|
316
|
-
}
|
|
317
|
-
],
|
|
318
229
|
'sort-vars': 'off',
|
|
319
|
-
'keyword-spacing': [
|
|
320
|
-
'error',
|
|
321
|
-
{
|
|
322
|
-
before: true,
|
|
323
|
-
after: true
|
|
324
|
-
}
|
|
325
|
-
],
|
|
326
|
-
'space-before-blocks': ['error', 'always'],
|
|
327
|
-
'space-before-function-paren': [
|
|
328
|
-
'error',
|
|
329
|
-
{
|
|
330
|
-
anonymous: 'always',
|
|
331
|
-
named: 'never',
|
|
332
|
-
asyncArrow: 'always'
|
|
333
|
-
}
|
|
334
|
-
],
|
|
335
|
-
'space-in-parens': ['error', 'never'],
|
|
336
|
-
'space-infix-ops': 'error',
|
|
337
|
-
'space-unary-ops': 'error',
|
|
338
|
-
'spaced-comment': [
|
|
339
|
-
'error',
|
|
340
|
-
'always',
|
|
341
|
-
{
|
|
342
|
-
line: {
|
|
343
|
-
exceptions: ['-', '+', '*'],
|
|
344
|
-
markers: ['!', '/', '=>']
|
|
345
|
-
},
|
|
346
|
-
block: {
|
|
347
|
-
exceptions: ['-', '+', '*'],
|
|
348
|
-
markers: ['!', '*'],
|
|
349
|
-
balanced: true
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
],
|
|
353
230
|
'sort-imports': 'off',
|
|
354
231
|
strict: ['error', 'safe'],
|
|
355
|
-
'template-curly-spacing': 'error',
|
|
356
232
|
'unicode-bom': ['error', 'never'],
|
|
357
233
|
'use-isnan': 'error',
|
|
358
234
|
'valid-typeof': 'error',
|
|
359
235
|
'vars-on-top': 'error',
|
|
360
|
-
'wrap-iife': ['error', 'inside'],
|
|
361
|
-
'wrap-regex': 'off',
|
|
362
|
-
'yield-star-spacing': ['error', { before: false, after: true }],
|
|
363
236
|
yoda: ['error', 'never'],
|
|
364
237
|
'capitalized-comments': 'off',
|
|
365
238
|
'class-methods-use-this': 'error',
|
|
366
|
-
'func-call-spacing': ['error', 'never'],
|
|
367
239
|
'func-name-matching': 'off',
|
|
368
240
|
'line-comment-position': 'off',
|
|
369
241
|
'no-await-in-loop': 'off',
|
|
@@ -373,7 +245,6 @@ export const baseConfig = {
|
|
|
373
245
|
'no-template-curly-in-string': 'error',
|
|
374
246
|
'no-unsafe-negation': 'error',
|
|
375
247
|
'no-useless-return': 'error',
|
|
376
|
-
'nonblock-statement-body-position': 'off',
|
|
377
248
|
'prefer-destructuring': [
|
|
378
249
|
'error',
|
|
379
250
|
{
|
|
@@ -400,54 +271,22 @@ export const baseConfig = {
|
|
|
400
271
|
'require-await': 'off',
|
|
401
272
|
'sort-keys': 'off',
|
|
402
273
|
'symbol-description': 'error',
|
|
403
|
-
'template-tag-spacing': ['error', 'never'],
|
|
404
274
|
'for-direction': 'off',
|
|
405
|
-
'padding-line-between-statements': [
|
|
406
|
-
'error',
|
|
407
|
-
{
|
|
408
|
-
blankLine: 'always',
|
|
409
|
-
prev: 'directive',
|
|
410
|
-
next: '*'
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
blankLine: 'any',
|
|
414
|
-
prev: 'directive',
|
|
415
|
-
next: 'directive'
|
|
416
|
-
}
|
|
417
|
-
],
|
|
418
|
-
'semi-style': ['error', 'last'],
|
|
419
|
-
'switch-colon-spacing': [
|
|
420
|
-
'error',
|
|
421
|
-
{
|
|
422
|
-
after: true,
|
|
423
|
-
before: false
|
|
424
|
-
}
|
|
425
|
-
],
|
|
426
|
-
'function-paren-newline': 'off',
|
|
427
275
|
'getter-return': [
|
|
428
276
|
'error',
|
|
429
277
|
{
|
|
430
278
|
allowImplicit: false
|
|
431
279
|
}
|
|
432
280
|
],
|
|
433
|
-
'implicit-arrow-linebreak': 'off',
|
|
434
|
-
'lines-between-class-members': [
|
|
435
|
-
'error',
|
|
436
|
-
'always',
|
|
437
|
-
{
|
|
438
|
-
exceptAfterSingleLine: true
|
|
439
|
-
}
|
|
440
|
-
],
|
|
441
281
|
'multiline-comment-style': 'off',
|
|
442
282
|
'max-classes-per-file': 'off',
|
|
443
|
-
'max-lines-per-function':
|
|
283
|
+
'max-lines-per-function': 'off',
|
|
444
284
|
'prefer-object-spread': 'error',
|
|
445
285
|
'no-async-promise-executor': 'error',
|
|
446
286
|
'no-misleading-character-class': 'error',
|
|
447
287
|
'default-param-last': 'error',
|
|
448
288
|
'prefer-regex-literals': 'error',
|
|
449
289
|
'require-unicode-regexp': 'off',
|
|
450
|
-
'function-call-argument-newline': ['error', 'consistent'],
|
|
451
290
|
'no-useless-catch': 'error',
|
|
452
291
|
'prefer-named-capture-group': 'error',
|
|
453
292
|
'no-import-assign': 'error',
|
|
@@ -458,19 +297,6 @@ export const baseConfig = {
|
|
|
458
297
|
'no-alert': 'off',
|
|
459
298
|
'no-script-url': 'off',
|
|
460
299
|
'no-restricted-globals': 'off',
|
|
461
|
-
'max-len': [
|
|
462
|
-
'error',
|
|
463
|
-
{
|
|
464
|
-
code: 120,
|
|
465
|
-
tabWidth: indentSize,
|
|
466
|
-
ignoreComments: true,
|
|
467
|
-
ignoreTrailingComments: true,
|
|
468
|
-
ignoreUrls: true,
|
|
469
|
-
ignoreStrings: false,
|
|
470
|
-
ignoreTemplateLiterals: false,
|
|
471
|
-
ignoreRegExpLiterals: true
|
|
472
|
-
}
|
|
473
|
-
],
|
|
474
300
|
|
|
475
301
|
'grouped-accessor-pairs': 'off',
|
|
476
302
|
'no-constructor-return': 'error',
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@cspell/eslint-plugin": "
|
|
3
|
+
"@cspell/eslint-plugin": "8.1.3",
|
|
4
|
+
"@stylistic/eslint-plugin": "1.5.1",
|
|
4
5
|
"eslint-plugin-array-func": "4.0.0",
|
|
5
6
|
"eslint-plugin-destructuring": "2.2.1",
|
|
6
7
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
7
|
-
"eslint-plugin-import": "2.
|
|
8
|
+
"eslint-plugin-import": "2.29.0",
|
|
8
9
|
"eslint-plugin-no-secrets": "0.8.9",
|
|
9
|
-
"eslint-plugin-prettier": "5.0.
|
|
10
|
+
"eslint-plugin-prettier": "5.0.1",
|
|
10
11
|
"eslint-plugin-promise": "6.1.1",
|
|
11
|
-
"eslint-plugin-sonarjs": "0.
|
|
12
|
-
"eslint-plugin-unicorn": "
|
|
12
|
+
"eslint-plugin-sonarjs": "0.23.0",
|
|
13
|
+
"eslint-plugin-unicorn": "49.0.0"
|
|
13
14
|
},
|
|
14
15
|
"license": "MIT",
|
|
15
16
|
"main": "base.js",
|
|
@@ -19,5 +20,5 @@
|
|
|
19
20
|
"url": "git://github.com/enormora/eslint-config.git"
|
|
20
21
|
},
|
|
21
22
|
"type": "module",
|
|
22
|
-
"version": "0.0.
|
|
23
|
+
"version": "0.0.9"
|
|
23
24
|
}
|
package/rule-sets/stylistic.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import prettierPlugin from 'eslint-plugin-prettier';
|
|
2
2
|
import destructuringPlugin from 'eslint-plugin-destructuring';
|
|
3
|
+
import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
4
|
+
import { indentSize } from '../constants.js';
|
|
3
5
|
|
|
4
6
|
export const stylisticRuleSet = {
|
|
5
7
|
plugins: {
|
|
6
8
|
prettier: prettierPlugin,
|
|
7
|
-
destructuring: destructuringPlugin
|
|
9
|
+
destructuring: destructuringPlugin,
|
|
10
|
+
'@stylistic': stylisticPlugin
|
|
8
11
|
},
|
|
9
12
|
|
|
10
13
|
settings: {},
|
|
@@ -14,6 +17,218 @@ export const stylisticRuleSet = {
|
|
|
14
17
|
|
|
15
18
|
'destructuring/in-methods-params': 'error',
|
|
16
19
|
'destructuring/in-params': ['error', { 'max-params': 0 }],
|
|
17
|
-
'destructuring/no-rename': 'off'
|
|
20
|
+
'destructuring/no-rename': 'off',
|
|
21
|
+
|
|
22
|
+
'@stylistic/array-bracket-newline': ['error', 'consistent'],
|
|
23
|
+
'@stylistic/array-bracket-spacing': ['error', 'never'],
|
|
24
|
+
'@stylistic/array-element-newline': ['error', 'consistent'],
|
|
25
|
+
'@stylistic/arrow-parens': ['error', 'always'],
|
|
26
|
+
'@stylistic/arrow-spacing': [
|
|
27
|
+
'error',
|
|
28
|
+
{
|
|
29
|
+
before: true,
|
|
30
|
+
after: true
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
'@stylistic/block-spacing': 'off',
|
|
34
|
+
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: false }],
|
|
35
|
+
'@stylistic/comma-dangle': ['error', 'never'],
|
|
36
|
+
'@stylistic/comma-spacing': [
|
|
37
|
+
'error',
|
|
38
|
+
{
|
|
39
|
+
before: false,
|
|
40
|
+
after: true
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
'@stylistic/comma-style': ['error', 'last'],
|
|
44
|
+
'@stylistic/computed-property-spacing': [
|
|
45
|
+
'error',
|
|
46
|
+
'never',
|
|
47
|
+
{
|
|
48
|
+
enforceForClassMembers: true
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
'@stylistic/dot-location': ['error', 'property'],
|
|
52
|
+
'@stylistic/eol-last': 'error',
|
|
53
|
+
'@stylistic/func-call-spacing': ['error', 'never'],
|
|
54
|
+
'@stylistic/function-call-spacing': ['error', 'never'],
|
|
55
|
+
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
|
56
|
+
'@stylistic/function-paren-newline': 'off',
|
|
57
|
+
'@stylistic/generator-star-spacing': ['error', { before: false, after: true }],
|
|
58
|
+
'@stylistic/indent-binary-ops': ['error', indentSize],
|
|
59
|
+
'@stylistic/implicit-arrow-linebreak': 'off',
|
|
60
|
+
'@stylistic/indent': [
|
|
61
|
+
'error',
|
|
62
|
+
indentSize,
|
|
63
|
+
{
|
|
64
|
+
SwitchCase: 1,
|
|
65
|
+
VariableDeclarator: 1,
|
|
66
|
+
MemberExpression: 1
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
'@stylistic/jsx-child-element-spacing': 'off',
|
|
70
|
+
'@stylistic/jsx-closing-bracket-location': 'off',
|
|
71
|
+
'@stylistic/jsx-closing-tag-location': 'off',
|
|
72
|
+
'@stylistic/jsx-curly-brace-presence': 'off',
|
|
73
|
+
'@stylistic/jsx-curly-newline': 'off',
|
|
74
|
+
'@stylistic/jsx-curly-spacing': 'off',
|
|
75
|
+
'@stylistic/jsx-equals-spacing': 'off',
|
|
76
|
+
'@stylistic/jsx-first-prop-new-line': 'off',
|
|
77
|
+
'@stylistic/jsx-indent': 'off',
|
|
78
|
+
'@stylistic/jsx-indent-props': 'off',
|
|
79
|
+
'@stylistic/jsx-max-props-per-line': 'off',
|
|
80
|
+
'@stylistic/jsx-newline': 'off',
|
|
81
|
+
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
82
|
+
'@stylistic/jsx-props-no-multi-spaces': 'off',
|
|
83
|
+
'@stylistic/jsx-self-closing-comp': 'off',
|
|
84
|
+
'@stylistic/jsx-sort-props': 'off',
|
|
85
|
+
'@stylistic/jsx-tag-spacing': 'off',
|
|
86
|
+
'@stylistic/jsx-quotes': 'off',
|
|
87
|
+
'@stylistic/jsx-wrap-multilines': 'off',
|
|
88
|
+
'@stylistic/key-spacing': [
|
|
89
|
+
'error',
|
|
90
|
+
{
|
|
91
|
+
beforeColon: false,
|
|
92
|
+
afterColon: true
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
'@stylistic/keyword-spacing': [
|
|
96
|
+
'error',
|
|
97
|
+
{
|
|
98
|
+
before: true,
|
|
99
|
+
after: true
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
'@stylistic/linebreak-style': ['error', 'unix'],
|
|
103
|
+
'@stylistic/lines-between-class-members': [
|
|
104
|
+
'error',
|
|
105
|
+
'always',
|
|
106
|
+
{
|
|
107
|
+
exceptAfterSingleLine: true
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
'@stylistic/lines-around-comment': 'off',
|
|
111
|
+
'@stylistic/max-len': [
|
|
112
|
+
'error',
|
|
113
|
+
{
|
|
114
|
+
code: 120,
|
|
115
|
+
tabWidth: indentSize,
|
|
116
|
+
ignoreComments: true,
|
|
117
|
+
ignoreTrailingComments: true,
|
|
118
|
+
ignoreUrls: true,
|
|
119
|
+
ignoreStrings: false,
|
|
120
|
+
ignoreTemplateLiterals: false,
|
|
121
|
+
ignoreRegExpLiterals: true
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
'@stylistic/max-statements-per-line': ['error', { max: 1 }],
|
|
125
|
+
'@stylistic/member-delimiter-style': [
|
|
126
|
+
'error',
|
|
127
|
+
{
|
|
128
|
+
multiline: {
|
|
129
|
+
delimiter: 'semi',
|
|
130
|
+
requireLast: true
|
|
131
|
+
},
|
|
132
|
+
singleline: {
|
|
133
|
+
delimiter: 'semi',
|
|
134
|
+
requireLast: false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
'@stylistic/multiline-ternary': 'off',
|
|
139
|
+
'@stylistic/new-parens': 'error',
|
|
140
|
+
'@stylistic/newline-per-chained-call': 'off',
|
|
141
|
+
'@stylistic/no-confusing-arrow': 'error',
|
|
142
|
+
// Currently this rule conflicts with prettier, because in some cases prettier adds unnecessary extra parens. Unfortunately there is no way to turn this off yet. We should re-enable this rule once this has been fixed in prettier or once there is a better formatter that doesn’t add unnecessary parens. See https://github.com/prettier/prettier/issues/3089
|
|
143
|
+
'@stylistic/no-extra-parens': 'off',
|
|
144
|
+
'@stylistic/no-extra-semi': 'error',
|
|
145
|
+
'@stylistic/no-floating-decimal': 'error',
|
|
146
|
+
'@stylistic/no-mixed-operators': 'off',
|
|
147
|
+
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
|
148
|
+
'@stylistic/no-multi-spaces': 'error',
|
|
149
|
+
'@stylistic/no-multiple-empty-lines': ['error', { max: 1 }],
|
|
150
|
+
'@stylistic/no-tabs': 'error',
|
|
151
|
+
'@stylistic/no-trailing-spaces': 'error',
|
|
152
|
+
'@stylistic/no-whitespace-before-property': 'error',
|
|
153
|
+
'@stylistic/nonblock-statement-body-position': 'off',
|
|
154
|
+
'@stylistic/object-curly-newline': 'off',
|
|
155
|
+
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
156
|
+
'@stylistic/object-property-newline': 'off',
|
|
157
|
+
'@stylistic/one-var-declaration-per-line': 'error',
|
|
158
|
+
'@stylistic/operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before' } }],
|
|
159
|
+
'@stylistic/padded-blocks': [
|
|
160
|
+
'error',
|
|
161
|
+
'never',
|
|
162
|
+
{
|
|
163
|
+
allowSingleLineBlocks: false
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
'@stylistic/padding-line-between-statements': [
|
|
167
|
+
'error',
|
|
168
|
+
{
|
|
169
|
+
blankLine: 'always',
|
|
170
|
+
prev: 'directive',
|
|
171
|
+
next: '*'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
blankLine: 'any',
|
|
175
|
+
prev: 'directive',
|
|
176
|
+
next: 'directive'
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
'@stylistic/quote-props': ['error', 'as-needed'],
|
|
180
|
+
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
|
|
181
|
+
'@stylistic/rest-spread-spacing': ['error', 'never'],
|
|
182
|
+
'@stylistic/semi': ['error', 'always'],
|
|
183
|
+
'@stylistic/semi-spacing': [
|
|
184
|
+
'error',
|
|
185
|
+
{
|
|
186
|
+
before: false,
|
|
187
|
+
after: true
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
'@stylistic/semi-style': ['error', 'last'],
|
|
191
|
+
'@stylistic/space-before-blocks': ['error', 'always'],
|
|
192
|
+
'@stylistic/space-before-function-paren': [
|
|
193
|
+
'error',
|
|
194
|
+
{
|
|
195
|
+
anonymous: 'always',
|
|
196
|
+
named: 'never',
|
|
197
|
+
asyncArrow: 'always'
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
'@stylistic/space-in-parens': ['error', 'never'],
|
|
201
|
+
'@stylistic/space-infix-ops': 'error',
|
|
202
|
+
'@stylistic/space-unary-ops': 'error',
|
|
203
|
+
'@stylistic/spaced-comment': [
|
|
204
|
+
'error',
|
|
205
|
+
'always',
|
|
206
|
+
{
|
|
207
|
+
line: {
|
|
208
|
+
exceptions: ['-', '+', '*'],
|
|
209
|
+
markers: ['!', '/', '=>']
|
|
210
|
+
},
|
|
211
|
+
block: {
|
|
212
|
+
exceptions: ['-', '+', '*'],
|
|
213
|
+
markers: ['!', '*'],
|
|
214
|
+
balanced: true
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
'@stylistic/switch-colon-spacing': [
|
|
219
|
+
'error',
|
|
220
|
+
{
|
|
221
|
+
after: true,
|
|
222
|
+
before: false
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
'@stylistic/template-curly-spacing': 'error',
|
|
226
|
+
'@stylistic/template-tag-spacing': ['error', 'never'],
|
|
227
|
+
'@stylistic/type-annotation-spacing': 'error',
|
|
228
|
+
'@stylistic/type-generic-spacing': 'error',
|
|
229
|
+
'@stylistic/type-named-tuple-spacing': 'error',
|
|
230
|
+
'@stylistic/wrap-iife': ['error', 'inside'],
|
|
231
|
+
'@stylistic/wrap-regex': 'off',
|
|
232
|
+
'@stylistic/yield-star-spacing': ['error', { before: false, after: true }]
|
|
18
233
|
}
|
|
19
234
|
};
|