@paratco/eslint-config 0.6.4 → 0.7.0

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.
@@ -1,525 +1,525 @@
1
- export default {
2
- // https://eslint.style/rules/default/array-bracket-newline
3
- // Enforce linebreaks after opening and before closing array brackets
4
- "@stylistic/array-bracket-newline": ["warn"],
5
-
6
- // https://eslint.style/rules/default/array-bracket-spacing
7
- // Enforce consistent spacing inside array brackets
8
- "@stylistic/array-bracket-spacing": ["warn"],
9
-
10
- // https://eslint.style/rules/default/array-element-newline
11
- // Enforce line breaks after each array element
12
- "@stylistic/array-element-newline": ["warn", "consistent"],
13
-
14
- // https://eslint.style/rules/default/arrow-parens
15
- // Require parentheses around arrow function arguments
16
- "@stylistic/arrow-parens": ["warn", "always"],
17
-
18
- // https://eslint.style/rules/default/arrow-spacing
19
- // Enforce consistent spacing before and after the arrow in arrow functions
20
- "@stylistic/arrow-spacing": ["warn"],
21
-
22
- // https://eslint.style/rules/default/block-spacing
23
- // Disallow or enforce spaces inside of blocks after opening block and before closing block
24
- "@stylistic/block-spacing": ["warn"],
25
-
26
- // https://eslint.style/rules/default/brace-style
27
- // Enforce consistent brace style for blocks
28
- "@stylistic/brace-style": ["warn", "1tbs"],
29
-
30
- // https://eslint.style/rules/default/comma-dangle
31
- // Require or disallow trailing commas
32
- "@stylistic/comma-dangle": ["warn"],
33
-
34
- // https://eslint.style/rules/default/comma-spacing
35
- // Enforce consistent spacing before and after commas
36
- "@stylistic/comma-spacing": ["warn"],
37
-
38
- // https://eslint.style/rules/default/comma-style
39
- // Enforce consistent comma style
40
- "@stylistic/comma-style": ["warn"],
41
-
42
- // https://eslint.style/rules/default/computed-property-spacing
43
- // Enforce consistent spacing inside computed property brackets
44
- "@stylistic/computed-property-spacing": ["warn"],
45
-
46
- // https://eslint.style/rules/default/dot-location
47
- // Enforce consistent newlines before and after dots
48
- "@stylistic/dot-location": ["warn", "property"],
49
-
50
- // https://eslint.style/rules/default/eol-last
51
- // Require or disallow newline at the end of files
52
- "@stylistic/eol-last": ["warn"],
53
-
54
- // https://eslint.style/rules/default/function-call-spacing
55
- // Require or disallow spacing between function identifiers and their invocations. Alias of `function-call-spacing`.
56
- "@stylistic/function-call-spacing": ["warn"],
57
-
58
- // https://eslint.style/rules/default/function-call-argument-newline
59
- // Enforce line breaks between arguments of a function call
60
- "@stylistic/function-call-argument-newline": ["warn", "consistent"],
61
-
62
- // https://eslint.style/rules/default/function-paren-newline
63
- // Enforce consistent line breaks inside function parentheses
64
- "@stylistic/function-paren-newline": ["warn", "consistent"],
65
-
66
- // https://eslint.style/rules/default/generator-star-spacing
67
- // Enforce consistent spacing around `*` operators in generator functions
68
- "@stylistic/generator-star-spacing": ["warn"],
69
-
70
- // https://eslint.style/rules/default/implicit-arrow-linebreak
71
- // Enforce the location of arrow function bodies
72
- "@stylistic/implicit-arrow-linebreak": ["warn"],
73
-
74
- // https://eslint.style/rules/default/indent
75
- // Enforce consistent indentation
76
- "@stylistic/indent": ["warn", 2],
77
-
78
- // https://eslint.style/rules/default/indent-binary-ops
79
- // Indentation for binary operators
80
- "@stylistic/indent-binary-ops": ["warn", 2],
81
-
82
- // https://eslint.style/rules/default/jsx-child-element-spacing
83
- // Enforce or disallow spaces inside curly braces in JSX attributes and expressions
84
- "@stylistic/jsx-child-element-spacing": ["error"],
85
-
86
- // https://eslint.style/rules/default/jsx-closing-bracket-location
87
- // Enforce closing bracket location in JSX
88
- "@stylistic/jsx-closing-bracket-location": ["warn"],
89
-
90
- // https://eslint.style/rules/default/jsx-closing-tag-location
91
- // Enforce closing tag location for multiline JSX
92
- "@stylistic/jsx-closing-tag-location": ["warn"],
93
-
94
- // https://eslint.style/rules/default/jsx-curly-brace-presence
95
- // Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
96
- "@stylistic/jsx-curly-brace-presence": ["warn"],
97
-
98
- // https://eslint.style/rules/default/jsx-curly-newline
99
- // Enforce consistent linebreaks in curly braces in JSX attributes and expressions
100
- "@stylistic/jsx-curly-newline": ["warn"],
101
-
102
- // https://eslint.style/rules/default/jsx-curly-spacing
103
- // Enforce or disallow spaces inside curly braces in JSX attributes and expressions
104
- "@stylistic/jsx-curly-spacing": ["warn"],
105
-
106
- // https://eslint.style/rules/default/jsx-equals-spacing
107
- // Enforce or disallow spaces around equal signs in JSX attributes
108
- "@stylistic/jsx-equals-spacing": ["warn"],
109
-
110
- // https://eslint.style/rules/default/jsx-first-prop-new-line
111
- // Enforce proper position of the first property in JSX
112
- "@stylistic/jsx-first-prop-new-line": ["warn"],
113
-
114
- // https://eslint.style/rules/default/jsx-function-call-newline
115
- // Enforce line breaks before and after JSX elements when they are used as arguments to a function.
116
- "@stylistic/jsx-function-call-newline": ["warn"],
117
-
118
- // https://eslint.style/rules/default/jsx-indent
119
- // Enforce JSX indentation
120
- "@stylistic/jsx-indent": ["warn", 2, { checkAttributes: true, indentLogicalExpressions: true }],
121
-
122
- // https://eslint.style/rules/default/jsx-indent-props
123
- // Enforce props indentation in JSX
124
- "@stylistic/jsx-indent-props": ["warn", 2],
125
-
126
- // https://eslint.style/rules/default/jsx-max-props-per-line
127
- // Enforce maximum of props on a single line in JSX
128
- "@stylistic/jsx/jsx-max-props-per-line": ["off"],
129
-
130
- // https://eslint.style/rules/default/jsx-newline
131
- // Require or prevent a new line after jsx elements and expressions.
132
- "@stylistic/jsx-newline": ["off"],
133
-
134
- // https://eslint.style/rules/default/jsx-one-expression-per-line
135
- // Require one JSX element per line
136
- "@stylistic/jsx-one-expression-per-line": ["warn", { allow: "single-child" }],
137
-
138
- // https://eslint.style/rules/default/jsx-pascal-case
139
- // Enforce PascalCase for user-defined JSX components
140
- "@stylistic/jsx-pascal-case": ["error"],
141
-
142
- // https://eslint.style/rules/default/jsx-props-no-multi-spaces
143
- // Disallow multiple spaces between inline JSX props
144
- "@stylistic/jsx-props-no-multi-spaces": ["warn"],
145
-
146
- // https://eslint.style/rules/default/jsx-quotes
147
- // Enforce the consistent use of either double or single quotes in JSX attributes
148
- "@stylistic/jsx-quotes": ["warn"],
149
-
150
- // https://eslint.style/rules/default/jsx-self-closing-comp
151
- // Disallow extra closing tags for components without children
152
- "@stylistic/jsx-self-closing-comp": ["warn"],
153
-
154
- // https://eslint.style/rules/default/jsx-sort-props
155
- // Enforce props alphabetical sorting
156
- "@stylistic/jsx-sort-props": [
157
- "warn",
158
- {
159
- callbacksLast: true,
160
- shorthandFirst: true,
161
- // shorthandLast: false,
162
- multiline: "last",
163
- // ignoreCase: false,
164
- noSortAlphabetically: true
165
- // reservedFirst: true
166
- // locale: "auto"
167
- }
168
- ],
169
-
170
- // https://eslint.style/rules/default/jsx-tag-spacing
171
- // Enforce whitespace in and around the JSX opening and closing brackets
172
- "@stylistic/jsx-tag-spacing": [
173
- "warn",
174
- {
175
- closingSlash: "never",
176
- beforeSelfClosing: "always",
177
- afterOpening: "never",
178
- beforeClosing: "never"
179
- }
180
- ],
181
-
182
- // https://eslint.style/rules/default/jsx-wrap-multilines
183
- // Disallow missing parentheses around multiline JSX
184
- "@stylistic/jsx-wrap-multilines": [
185
- "warn",
186
- {
187
- declaration: "parens-new-line",
188
- assignment: "parens-new-line",
189
- return: "parens-new-line",
190
- arrow: "parens-new-line",
191
- condition: "parens-new-line",
192
- logical: "parens-new-line",
193
- prop: "parens-new-line"
194
- }
195
- ],
196
-
197
- // https://eslint.style/rules/default/key-spacing
198
- // Enforce consistent spacing between keys and values in object literal properties
199
- "@stylistic/key-spacing": "warn",
200
-
201
- // https://eslint.style/rules/default/keyword-spacing
202
- // Enforce consistent spacing before and after keywords
203
- "@stylistic/keyword-spacing": "warn",
204
-
205
- // https://eslint.style/rules/default/line-comment-position
206
- // Enforce position of line comments
207
- "@stylistic/line-comment-position": "warn",
208
-
209
- // https://eslint.style/rules/default/linebreak-style
210
- // Enforce consistent linebreak style
211
- "@stylistic/linebreak-style": "warn",
212
-
213
- // https://eslint.style/rules/default/lines-around-comment
214
- // Require empty lines around comments
215
- "@stylistic/lines-around-comment": [
216
- "warn",
217
- {
218
- beforeBlockComment: true,
219
- afterBlockComment: false,
220
- beforeLineComment: true,
221
- afterLineComment: false,
222
- allowBlockStart: true,
223
- allowBlockEnd: true,
224
- allowObjectStart: true,
225
- allowObjectEnd: true,
226
- allowArrayStart: true,
227
- allowArrayEnd: true,
228
- allowClassStart: true,
229
- allowClassEnd: true,
230
- afterHashbangComment: true
231
- }
232
- ],
233
-
234
- // https://eslint.style/rules/default/lines-between-class-members
235
- // Require or disallow an empty line between class members
236
- "@stylistic/lines-between-class-members": [
237
- "warn",
238
- {
239
- enforce: [
240
- {
241
- blankLine: "never",
242
- prev: "field",
243
- next: "field"
244
- },
245
- {
246
- blankLine: "always",
247
- prev: "*",
248
- next: "method"
249
- },
250
- {
251
- blankLine: "always",
252
- prev: "method",
253
- next: "*"
254
- }
255
- ]
256
- }
257
- ],
258
-
259
- // https://eslint.style/rules/default/max-len
260
- // Enforce a maximum line length
261
- "@stylistic/max-len": [
262
- "error",
263
- {
264
- code: 120,
265
- tabWidth: 2,
266
- ignoreUrls: true,
267
- ignoreStrings: true,
268
- ignoreTemplateLiterals: true,
269
- ignoreRegExpLiterals: true
270
- }
271
- ],
272
-
273
- // https://eslint.style/rules/default/max-statements-per-line
274
- // Enforce a maximum number of statements allowed per line
275
- "@stylistic/max-statements-per-line": ["error"],
276
-
277
- // https://eslint.style/rules/default/member-delimiter-style
278
- // Require a specific member delimiter style for interfaces and type literals
279
- "@stylistic/member-delimiter-style": ["warn"],
280
-
281
- // https://eslint.style/rules/default/multiline-comment-style
282
- // Enforce a particular style for multiline comments
283
- "@stylistic/multiline-comment-style": ["warn"],
284
-
285
- // https://eslint.style/rules/default/multiline-ternary
286
- // Enforce newlines between operands of ternary expressions
287
- "@stylistic/multiline-ternary": ["warn", "always-multiline"],
288
-
289
- // https://eslint.style/rules/default/new-parens
290
- // Enforce or disallow parentheses when invoking a constructor with no arguments
291
- "@stylistic/new-parens": ["warn"],
292
-
293
- // https://eslint.style/rules/default/newline-per-chained-call
294
- // Require a newline after each call in a method chain
295
- "@stylistic/newline-per-chained-call": ["warn"],
296
-
297
- // https://eslint.style/rules/default/no-confusing-arrow
298
- // Disallow arrow functions where they could be confused with comparisons
299
- "@stylistic/no-confusing-arrow": ["warn"],
300
-
301
- // https://eslint.style/rules/default/no-extra-parens
302
- // Disallow unnecessary parentheses
303
- "@stylistic/no-extra-parens": ["warn"],
304
-
305
- // https://eslint.style/rules/default/no-extra-semi
306
- // Disallow unnecessary semicolons
307
- "@stylistic/no-extra-semi": ["warn"],
308
-
309
- // https://eslint.style/rules/default/no-floating-decimal
310
- // Disallow leading or trailing decimal points in numeric literals
311
- "@stylistic/no-floating-decimal": ["warn"],
312
-
313
- // https://eslint.style/rules/default/no-mixed-operators
314
- // Disallow mixed binary operators
315
- "@stylistic/no-mixed-operators": ["error"],
316
-
317
- // https://eslint.style/rules/default/no-mixed-spaces-and-tabs
318
- // Disallow mixed spaces and tabs for indentation
319
- "@stylistic/no-mixed-spaces-and-tabs": ["error"],
320
-
321
- // https://eslint.style/rules/default/no-multi-spaces
322
- // Disallow multiple spaces
323
- "@stylistic/no-multi-spaces": ["warn"],
324
-
325
- // https://eslint.style/rules/default/no-multiple-empty-lines
326
- // Disallow multiple empty lines
327
- "@stylistic/no-multiple-empty-lines": ["warn"],
328
-
329
- // https://eslint.style/rules/default/no-tabs
330
- // Disallow all tabs
331
- "@stylistic/no-tabs": ["error"],
332
-
333
- // https://eslint.style/rules/default/no-trailing-spaces
334
- // Disallow trailing whitespace at the end of lines
335
- "@stylistic/no-trailing-spaces": ["warn"],
336
-
337
- // https://eslint.style/rules/default/no-whitespace-before-property
338
- // Disallow whitespace before properties
339
- "@stylistic/no-whitespace-before-property": ["warn"],
340
-
341
- // https://eslint.style/rules/default/nonblock-statement-body-position
342
- // Enforce the location of single-line statements
343
- "@stylistic/nonblock-statement-body-position": ["warn"],
344
-
345
- // https://eslint.style/rules/default/object-curly-newline
346
- // Enforce consistent line breaks after opening and before closing braces
347
- "@stylistic/object-curly-newline": [
348
- "warn",
349
- {
350
- consistent: true
351
- }
352
- ],
353
-
354
- // https://eslint.style/rules/default/object-curly-spacing
355
- // Enforce consistent spacing inside braces
356
- "@stylistic/object-curly-spacing": ["warn"],
357
-
358
- // https://eslint.style/rules/default/object-property-newline
359
- // Enforce placing object properties on separate lines
360
- "@stylistic/object-property-newline": [
361
- "warn",
362
- {
363
- allowAllPropertiesOnSameLine: true
364
- }
365
- ],
366
-
367
- // https://eslint.style/rules/default/one-var-declaration-per-line
368
- // Require or disallow newlines around variable declarations
369
- "@stylistic/one-var-declaration-per-line": ["warn"],
370
-
371
- // https://eslint.style/rules/default/operator-linebreak
372
- // Enforce consistent linebreak style for operators
373
- "@stylistic/operator-linebreak": ["warn"],
374
-
375
- // https://eslint.style/rules/default/padded-blocks
376
- // Require or disallow padding within blocks
377
- "@stylistic/padded-blocks": ["warn", "never"],
378
-
379
- // https://eslint.style/rules/default/padding-line-between-statements
380
- // Require or disallow padding lines between statements
381
- "@stylistic/padding-line-between-statements": [
382
- "warn",
383
- {
384
- blankLine: "always",
385
- prev: "*",
386
- next: "return"
387
- },
388
- {
389
- blankLine: "always",
390
- prev: "*",
391
- next: "block-like"
392
- },
393
- {
394
- blankLine: "always",
395
- prev: "block-like",
396
- next: "*"
397
- },
398
- {
399
- blankLine: "always",
400
- prev: "case",
401
- next: "case"
402
- },
403
- {
404
- blankLine: "never",
405
- prev: "*",
406
- next: "break"
407
- },
408
- {
409
- blankLine: "always",
410
- prev: "*",
411
- next: "export"
412
- },
413
- {
414
- blankLine: "always",
415
- prev: "*",
416
- next: "interface"
417
- },
418
- {
419
- blankLine: "always",
420
- prev: "interface",
421
- next: "*"
422
- },
423
- {
424
- blankLine: "always",
425
- prev: "*",
426
- next: "class"
427
- },
428
- {
429
- blankLine: "always",
430
- prev: "class",
431
- next: "*"
432
- }
433
- ],
434
-
435
- // https://eslint.style/rules/default/quote-props
436
- // Require quotes around object literal property names
437
- "@stylistic/quote-props": ["warn", "as-needed"],
438
-
439
- // https://eslint.style/rules/default/quotes
440
- // Enforce the consistent use of either backticks, double, or single quotes
441
- "@stylistic/quotes": ["warn"],
442
-
443
- // https://eslint.style/rules/default/rest-spread-spacing
444
- // Enforce spacing between rest and spread operators and their expressions
445
- "@stylistic/rest-spread-spacing": ["warn"],
446
-
447
- // https://eslint.style/rules/default/semi
448
- // Require or disallow semicolons instead of ASI
449
- "@stylistic/semi": ["warn"],
450
-
451
- // https://eslint.style/rules/default/semi-spacing
452
- // Enforce consistent spacing before and after semicolons
453
- "@stylistic/semi-spacing": ["warn"],
454
-
455
- // https://eslint.style/rules/default/semi-style
456
- // Enforce location of semicolons
457
- "@stylistic/semi-style": ["warn"],
458
-
459
- // https://eslint.style/rules/default/space-before-blocks
460
- // Enforce consistent spacing before blocks
461
- "@stylistic/space-before-blocks": ["warn"],
462
-
463
- // https://eslint.style/rules/default/space-before-function-paren
464
- // Enforce consistent spacing before `function` definition opening parenthesis
465
- "@stylistic/space-before-function-paren": [
466
- "warn",
467
- {
468
- anonymous: "always",
469
- named: "never",
470
- asyncArrow: "always"
471
- }
472
- ],
473
-
474
- // https://eslint.style/rules/default/space-in-parens
475
- // Enforce consistent spacing inside parentheses
476
- "@stylistic/space-in-parens": ["warn"],
477
-
478
- // https://eslint.style/rules/default/space-infix-ops
479
- // Require spacing around infix operators
480
- "@stylistic/space-infix-ops": ["warn"],
481
-
482
- // https://eslint.style/rules/default/space-unary-ops
483
- // Enforce consistent spacing before or after unary operators
484
- "@stylistic/space-unary-ops": ["warn"],
485
-
486
- // https://eslint.style/rules/default/spaced-comment
487
- // Enforce consistent spacing after the `//` or `/*` in a comment
488
- "@stylistic/spaced-comment": ["warn"],
489
-
490
- // https://eslint.style/rules/default/switch-colon-spacing
491
- // Enforce spacing around colons of switch statements
492
- "@stylistic/switch-colon-spacing": ["warn"],
493
-
494
- // https://eslint.style/rules/default/template-curly-spacing
495
- // Require or disallow spacing around embedded expressions of template strings
496
- "@stylistic/template-curly-spacing": ["warn"],
497
-
498
- // https://eslint.style/rules/default/template-tag-spacing
499
- // Require or disallow spacing between template tags and their literals
500
- "@stylistic/template-tag-spacing": ["warn"],
501
-
502
- // https://eslint.style/rules/default/type-annotation-spacing
503
- // Require consistent spacing around type annotations
504
- "@stylistic/type-annotation-spacing": ["warn"],
505
-
506
- // https://eslint.style/rules/default/type-generic-spacing
507
- // Enforces consistent spacing inside TypeScript type generics
508
- "@stylistic/type-generic-spacing": ["warn"],
509
-
510
- // https://eslint.style/rules/default/type-named-tuple-spacing
511
- // Expect space before the type declaration in the named tuple
512
- "@stylistic/type-named-tuple-spacing": ["warn"],
513
-
514
- // https://eslint.style/rules/default/wrap-iife
515
- // Require parentheses around immediate `function` invocations
516
- "@stylistic/wrap-iife": ["warn", "inside"],
517
-
518
- // https://eslint.style/rules/default/wrap-regex
519
- // Require parenthesis around regex literals
520
- "@stylistic/wrap-regex": ["warn"],
521
-
522
- // https://eslint.style/rules/default/yield-star-spacing
523
- // Require or disallow spacing around the `*` in `yield*` expressions
524
- "@stylistic/yield-star-spacing": ["warn", "after"]
525
- };
1
+ export default {
2
+ // https://eslint.style/rules/default/array-bracket-newline
3
+ // Enforce linebreaks after opening and before closing array brackets
4
+ "@stylistic/array-bracket-newline": ["warn"],
5
+
6
+ // https://eslint.style/rules/default/array-bracket-spacing
7
+ // Enforce consistent spacing inside array brackets
8
+ "@stylistic/array-bracket-spacing": ["warn"],
9
+
10
+ // https://eslint.style/rules/default/array-element-newline
11
+ // Enforce line breaks after each array element
12
+ "@stylistic/array-element-newline": ["warn", "consistent"],
13
+
14
+ // https://eslint.style/rules/default/arrow-parens
15
+ // Require parentheses around arrow function arguments
16
+ "@stylistic/arrow-parens": ["warn", "always"],
17
+
18
+ // https://eslint.style/rules/default/arrow-spacing
19
+ // Enforce consistent spacing before and after the arrow in arrow functions
20
+ "@stylistic/arrow-spacing": ["warn"],
21
+
22
+ // https://eslint.style/rules/default/block-spacing
23
+ // Disallow or enforce spaces inside of blocks after opening block and before closing block
24
+ "@stylistic/block-spacing": ["warn"],
25
+
26
+ // https://eslint.style/rules/default/brace-style
27
+ // Enforce consistent brace style for blocks
28
+ "@stylistic/brace-style": ["warn", "1tbs"],
29
+
30
+ // https://eslint.style/rules/default/comma-dangle
31
+ // Require or disallow trailing commas
32
+ "@stylistic/comma-dangle": ["warn"],
33
+
34
+ // https://eslint.style/rules/default/comma-spacing
35
+ // Enforce consistent spacing before and after commas
36
+ "@stylistic/comma-spacing": ["warn"],
37
+
38
+ // https://eslint.style/rules/default/comma-style
39
+ // Enforce consistent comma style
40
+ "@stylistic/comma-style": ["warn"],
41
+
42
+ // https://eslint.style/rules/default/computed-property-spacing
43
+ // Enforce consistent spacing inside computed property brackets
44
+ "@stylistic/computed-property-spacing": ["warn"],
45
+
46
+ // https://eslint.style/rules/default/dot-location
47
+ // Enforce consistent newlines before and after dots
48
+ "@stylistic/dot-location": ["warn", "property"],
49
+
50
+ // https://eslint.style/rules/default/eol-last
51
+ // Require or disallow newline at the end of files
52
+ "@stylistic/eol-last": ["warn"],
53
+
54
+ // https://eslint.style/rules/default/function-call-spacing
55
+ // Require or disallow spacing between function identifiers and their invocations. Alias of `function-call-spacing`.
56
+ "@stylistic/function-call-spacing": ["warn"],
57
+
58
+ // https://eslint.style/rules/default/function-call-argument-newline
59
+ // Enforce line breaks between arguments of a function call
60
+ "@stylistic/function-call-argument-newline": ["warn", "consistent"],
61
+
62
+ // https://eslint.style/rules/default/function-paren-newline
63
+ // Enforce consistent line breaks inside function parentheses
64
+ "@stylistic/function-paren-newline": ["warn", "consistent"],
65
+
66
+ // https://eslint.style/rules/default/generator-star-spacing
67
+ // Enforce consistent spacing around `*` operators in generator functions
68
+ "@stylistic/generator-star-spacing": ["warn"],
69
+
70
+ // https://eslint.style/rules/default/implicit-arrow-linebreak
71
+ // Enforce the location of arrow function bodies
72
+ "@stylistic/implicit-arrow-linebreak": ["warn"],
73
+
74
+ // https://eslint.style/rules/default/indent
75
+ // Enforce consistent indentation
76
+ "@stylistic/indent": ["warn", 2],
77
+
78
+ // https://eslint.style/rules/default/indent-binary-ops
79
+ // Indentation for binary operators
80
+ "@stylistic/indent-binary-ops": ["warn", 2],
81
+
82
+ // https://eslint.style/rules/default/jsx-child-element-spacing
83
+ // Enforce or disallow spaces inside curly braces in JSX attributes and expressions
84
+ "@stylistic/jsx-child-element-spacing": ["error"],
85
+
86
+ // https://eslint.style/rules/default/jsx-closing-bracket-location
87
+ // Enforce closing bracket location in JSX
88
+ "@stylistic/jsx-closing-bracket-location": ["warn"],
89
+
90
+ // https://eslint.style/rules/default/jsx-closing-tag-location
91
+ // Enforce closing tag location for multiline JSX
92
+ "@stylistic/jsx-closing-tag-location": ["warn"],
93
+
94
+ // https://eslint.style/rules/default/jsx-curly-brace-presence
95
+ // Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
96
+ "@stylistic/jsx-curly-brace-presence": ["warn"],
97
+
98
+ // https://eslint.style/rules/default/jsx-curly-newline
99
+ // Enforce consistent linebreaks in curly braces in JSX attributes and expressions
100
+ "@stylistic/jsx-curly-newline": ["warn"],
101
+
102
+ // https://eslint.style/rules/default/jsx-curly-spacing
103
+ // Enforce or disallow spaces inside curly braces in JSX attributes and expressions
104
+ "@stylistic/jsx-curly-spacing": ["warn"],
105
+
106
+ // https://eslint.style/rules/default/jsx-equals-spacing
107
+ // Enforce or disallow spaces around equal signs in JSX attributes
108
+ "@stylistic/jsx-equals-spacing": ["warn"],
109
+
110
+ // https://eslint.style/rules/default/jsx-first-prop-new-line
111
+ // Enforce proper position of the first property in JSX
112
+ "@stylistic/jsx-first-prop-new-line": ["warn"],
113
+
114
+ // https://eslint.style/rules/default/jsx-function-call-newline
115
+ // Enforce line breaks before and after JSX elements when they are used as arguments to a function.
116
+ "@stylistic/jsx-function-call-newline": ["warn"],
117
+
118
+ // https://eslint.style/rules/default/jsx-indent
119
+ // Enforce JSX indentation
120
+ "@stylistic/jsx-indent": ["warn", 2, { checkAttributes: true, indentLogicalExpressions: true }],
121
+
122
+ // https://eslint.style/rules/default/jsx-indent-props
123
+ // Enforce props indentation in JSX
124
+ "@stylistic/jsx-indent-props": ["warn", 2],
125
+
126
+ // https://eslint.style/rules/default/jsx-max-props-per-line
127
+ // Enforce maximum of props on a single line in JSX
128
+ "@stylistic/jsx/jsx-max-props-per-line": ["off"],
129
+
130
+ // https://eslint.style/rules/default/jsx-newline
131
+ // Require or prevent a new line after jsx elements and expressions.
132
+ "@stylistic/jsx-newline": ["off"],
133
+
134
+ // https://eslint.style/rules/default/jsx-one-expression-per-line
135
+ // Require one JSX element per line
136
+ "@stylistic/jsx-one-expression-per-line": ["warn", { allow: "single-child" }],
137
+
138
+ // https://eslint.style/rules/default/jsx-pascal-case
139
+ // Enforce PascalCase for user-defined JSX components
140
+ "@stylistic/jsx-pascal-case": ["error"],
141
+
142
+ // https://eslint.style/rules/default/jsx-props-no-multi-spaces
143
+ // Disallow multiple spaces between inline JSX props
144
+ "@stylistic/jsx-props-no-multi-spaces": ["warn"],
145
+
146
+ // https://eslint.style/rules/default/jsx-quotes
147
+ // Enforce the consistent use of either double or single quotes in JSX attributes
148
+ "@stylistic/jsx-quotes": ["warn"],
149
+
150
+ // https://eslint.style/rules/default/jsx-self-closing-comp
151
+ // Disallow extra closing tags for components without children
152
+ "@stylistic/jsx-self-closing-comp": ["warn"],
153
+
154
+ // https://eslint.style/rules/default/jsx-sort-props
155
+ // Enforce props alphabetical sorting
156
+ "@stylistic/jsx-sort-props": [
157
+ "warn",
158
+ {
159
+ callbacksLast: true,
160
+ shorthandFirst: true,
161
+ // shorthandLast: false,
162
+ multiline: "last",
163
+ // ignoreCase: false,
164
+ noSortAlphabetically: true
165
+ // reservedFirst: true
166
+ // locale: "auto"
167
+ }
168
+ ],
169
+
170
+ // https://eslint.style/rules/default/jsx-tag-spacing
171
+ // Enforce whitespace in and around the JSX opening and closing brackets
172
+ "@stylistic/jsx-tag-spacing": [
173
+ "warn",
174
+ {
175
+ closingSlash: "never",
176
+ beforeSelfClosing: "always",
177
+ afterOpening: "never",
178
+ beforeClosing: "never"
179
+ }
180
+ ],
181
+
182
+ // https://eslint.style/rules/default/jsx-wrap-multilines
183
+ // Disallow missing parentheses around multiline JSX
184
+ "@stylistic/jsx-wrap-multilines": [
185
+ "warn",
186
+ {
187
+ declaration: "parens-new-line",
188
+ assignment: "parens-new-line",
189
+ return: "parens-new-line",
190
+ arrow: "parens-new-line",
191
+ condition: "parens-new-line",
192
+ logical: "parens-new-line",
193
+ prop: "parens-new-line"
194
+ }
195
+ ],
196
+
197
+ // https://eslint.style/rules/default/key-spacing
198
+ // Enforce consistent spacing between keys and values in object literal properties
199
+ "@stylistic/key-spacing": "warn",
200
+
201
+ // https://eslint.style/rules/default/keyword-spacing
202
+ // Enforce consistent spacing before and after keywords
203
+ "@stylistic/keyword-spacing": "warn",
204
+
205
+ // https://eslint.style/rules/default/line-comment-position
206
+ // Enforce position of line comments
207
+ "@stylistic/line-comment-position": "warn",
208
+
209
+ // https://eslint.style/rules/default/linebreak-style
210
+ // Enforce consistent linebreak style
211
+ "@stylistic/linebreak-style": "warn",
212
+
213
+ // https://eslint.style/rules/default/lines-around-comment
214
+ // Require empty lines around comments
215
+ "@stylistic/lines-around-comment": [
216
+ "warn",
217
+ {
218
+ beforeBlockComment: true,
219
+ afterBlockComment: false,
220
+ beforeLineComment: true,
221
+ afterLineComment: false,
222
+ allowBlockStart: true,
223
+ allowBlockEnd: true,
224
+ allowObjectStart: true,
225
+ allowObjectEnd: true,
226
+ allowArrayStart: true,
227
+ allowArrayEnd: true,
228
+ allowClassStart: true,
229
+ allowClassEnd: true,
230
+ afterHashbangComment: true
231
+ }
232
+ ],
233
+
234
+ // https://eslint.style/rules/default/lines-between-class-members
235
+ // Require or disallow an empty line between class members
236
+ "@stylistic/lines-between-class-members": [
237
+ "warn",
238
+ {
239
+ enforce: [
240
+ {
241
+ blankLine: "never",
242
+ prev: "field",
243
+ next: "field"
244
+ },
245
+ {
246
+ blankLine: "always",
247
+ prev: "*",
248
+ next: "method"
249
+ },
250
+ {
251
+ blankLine: "always",
252
+ prev: "method",
253
+ next: "*"
254
+ }
255
+ ]
256
+ }
257
+ ],
258
+
259
+ // https://eslint.style/rules/default/max-len
260
+ // Enforce a maximum line length
261
+ "@stylistic/max-len": [
262
+ "error",
263
+ {
264
+ code: 120,
265
+ tabWidth: 2,
266
+ ignoreUrls: true,
267
+ ignoreStrings: true,
268
+ ignoreTemplateLiterals: true,
269
+ ignoreRegExpLiterals: true
270
+ }
271
+ ],
272
+
273
+ // https://eslint.style/rules/default/max-statements-per-line
274
+ // Enforce a maximum number of statements allowed per line
275
+ "@stylistic/max-statements-per-line": ["error"],
276
+
277
+ // https://eslint.style/rules/default/member-delimiter-style
278
+ // Require a specific member delimiter style for interfaces and type literals
279
+ "@stylistic/member-delimiter-style": ["warn"],
280
+
281
+ // https://eslint.style/rules/default/multiline-comment-style
282
+ // Enforce a particular style for multiline comments
283
+ "@stylistic/multiline-comment-style": ["warn"],
284
+
285
+ // https://eslint.style/rules/default/multiline-ternary
286
+ // Enforce newlines between operands of ternary expressions
287
+ "@stylistic/multiline-ternary": ["warn", "always-multiline"],
288
+
289
+ // https://eslint.style/rules/default/new-parens
290
+ // Enforce or disallow parentheses when invoking a constructor with no arguments
291
+ "@stylistic/new-parens": ["warn"],
292
+
293
+ // https://eslint.style/rules/default/newline-per-chained-call
294
+ // Require a newline after each call in a method chain
295
+ "@stylistic/newline-per-chained-call": ["warn"],
296
+
297
+ // https://eslint.style/rules/default/no-confusing-arrow
298
+ // Disallow arrow functions where they could be confused with comparisons
299
+ "@stylistic/no-confusing-arrow": ["warn"],
300
+
301
+ // https://eslint.style/rules/default/no-extra-parens
302
+ // Disallow unnecessary parentheses
303
+ "@stylistic/no-extra-parens": ["warn"],
304
+
305
+ // https://eslint.style/rules/default/no-extra-semi
306
+ // Disallow unnecessary semicolons
307
+ "@stylistic/no-extra-semi": ["warn"],
308
+
309
+ // https://eslint.style/rules/default/no-floating-decimal
310
+ // Disallow leading or trailing decimal points in numeric literals
311
+ "@stylistic/no-floating-decimal": ["warn"],
312
+
313
+ // https://eslint.style/rules/default/no-mixed-operators
314
+ // Disallow mixed binary operators
315
+ "@stylistic/no-mixed-operators": ["error"],
316
+
317
+ // https://eslint.style/rules/default/no-mixed-spaces-and-tabs
318
+ // Disallow mixed spaces and tabs for indentation
319
+ "@stylistic/no-mixed-spaces-and-tabs": ["error"],
320
+
321
+ // https://eslint.style/rules/default/no-multi-spaces
322
+ // Disallow multiple spaces
323
+ "@stylistic/no-multi-spaces": ["warn"],
324
+
325
+ // https://eslint.style/rules/default/no-multiple-empty-lines
326
+ // Disallow multiple empty lines
327
+ "@stylistic/no-multiple-empty-lines": ["warn"],
328
+
329
+ // https://eslint.style/rules/default/no-tabs
330
+ // Disallow all tabs
331
+ "@stylistic/no-tabs": ["error"],
332
+
333
+ // https://eslint.style/rules/default/no-trailing-spaces
334
+ // Disallow trailing whitespace at the end of lines
335
+ "@stylistic/no-trailing-spaces": ["warn"],
336
+
337
+ // https://eslint.style/rules/default/no-whitespace-before-property
338
+ // Disallow whitespace before properties
339
+ "@stylistic/no-whitespace-before-property": ["warn"],
340
+
341
+ // https://eslint.style/rules/default/nonblock-statement-body-position
342
+ // Enforce the location of single-line statements
343
+ "@stylistic/nonblock-statement-body-position": ["warn"],
344
+
345
+ // https://eslint.style/rules/default/object-curly-newline
346
+ // Enforce consistent line breaks after opening and before closing braces
347
+ "@stylistic/object-curly-newline": [
348
+ "warn",
349
+ {
350
+ consistent: true
351
+ }
352
+ ],
353
+
354
+ // https://eslint.style/rules/default/object-curly-spacing
355
+ // Enforce consistent spacing inside braces
356
+ "@stylistic/object-curly-spacing": ["warn"],
357
+
358
+ // https://eslint.style/rules/default/object-property-newline
359
+ // Enforce placing object properties on separate lines
360
+ "@stylistic/object-property-newline": [
361
+ "warn",
362
+ {
363
+ allowAllPropertiesOnSameLine: true
364
+ }
365
+ ],
366
+
367
+ // https://eslint.style/rules/default/one-var-declaration-per-line
368
+ // Require or disallow newlines around variable declarations
369
+ "@stylistic/one-var-declaration-per-line": ["warn"],
370
+
371
+ // https://eslint.style/rules/default/operator-linebreak
372
+ // Enforce consistent linebreak style for operators
373
+ "@stylistic/operator-linebreak": ["warn"],
374
+
375
+ // https://eslint.style/rules/default/padded-blocks
376
+ // Require or disallow padding within blocks
377
+ "@stylistic/padded-blocks": ["warn", "never"],
378
+
379
+ // https://eslint.style/rules/default/padding-line-between-statements
380
+ // Require or disallow padding lines between statements
381
+ "@stylistic/padding-line-between-statements": [
382
+ "warn",
383
+ {
384
+ blankLine: "always",
385
+ prev: "*",
386
+ next: "return"
387
+ },
388
+ {
389
+ blankLine: "always",
390
+ prev: "*",
391
+ next: "block-like"
392
+ },
393
+ {
394
+ blankLine: "always",
395
+ prev: "block-like",
396
+ next: "*"
397
+ },
398
+ {
399
+ blankLine: "always",
400
+ prev: "case",
401
+ next: "case"
402
+ },
403
+ {
404
+ blankLine: "never",
405
+ prev: "*",
406
+ next: "break"
407
+ },
408
+ {
409
+ blankLine: "always",
410
+ prev: "*",
411
+ next: "export"
412
+ },
413
+ {
414
+ blankLine: "always",
415
+ prev: "*",
416
+ next: "interface"
417
+ },
418
+ {
419
+ blankLine: "always",
420
+ prev: "interface",
421
+ next: "*"
422
+ },
423
+ {
424
+ blankLine: "always",
425
+ prev: "*",
426
+ next: "class"
427
+ },
428
+ {
429
+ blankLine: "always",
430
+ prev: "class",
431
+ next: "*"
432
+ }
433
+ ],
434
+
435
+ // https://eslint.style/rules/default/quote-props
436
+ // Require quotes around object literal property names
437
+ "@stylistic/quote-props": ["warn", "as-needed"],
438
+
439
+ // https://eslint.style/rules/default/quotes
440
+ // Enforce the consistent use of either backticks, double, or single quotes
441
+ "@stylistic/quotes": ["warn"],
442
+
443
+ // https://eslint.style/rules/default/rest-spread-spacing
444
+ // Enforce spacing between rest and spread operators and their expressions
445
+ "@stylistic/rest-spread-spacing": ["warn"],
446
+
447
+ // https://eslint.style/rules/default/semi
448
+ // Require or disallow semicolons instead of ASI
449
+ "@stylistic/semi": ["warn"],
450
+
451
+ // https://eslint.style/rules/default/semi-spacing
452
+ // Enforce consistent spacing before and after semicolons
453
+ "@stylistic/semi-spacing": ["warn"],
454
+
455
+ // https://eslint.style/rules/default/semi-style
456
+ // Enforce location of semicolons
457
+ "@stylistic/semi-style": ["warn"],
458
+
459
+ // https://eslint.style/rules/default/space-before-blocks
460
+ // Enforce consistent spacing before blocks
461
+ "@stylistic/space-before-blocks": ["warn"],
462
+
463
+ // https://eslint.style/rules/default/space-before-function-paren
464
+ // Enforce consistent spacing before `function` definition opening parenthesis
465
+ "@stylistic/space-before-function-paren": [
466
+ "warn",
467
+ {
468
+ anonymous: "always",
469
+ named: "never",
470
+ asyncArrow: "always"
471
+ }
472
+ ],
473
+
474
+ // https://eslint.style/rules/default/space-in-parens
475
+ // Enforce consistent spacing inside parentheses
476
+ "@stylistic/space-in-parens": ["warn"],
477
+
478
+ // https://eslint.style/rules/default/space-infix-ops
479
+ // Require spacing around infix operators
480
+ "@stylistic/space-infix-ops": ["warn"],
481
+
482
+ // https://eslint.style/rules/default/space-unary-ops
483
+ // Enforce consistent spacing before or after unary operators
484
+ "@stylistic/space-unary-ops": ["warn"],
485
+
486
+ // https://eslint.style/rules/default/spaced-comment
487
+ // Enforce consistent spacing after the `//` or `/*` in a comment
488
+ "@stylistic/spaced-comment": ["warn"],
489
+
490
+ // https://eslint.style/rules/default/switch-colon-spacing
491
+ // Enforce spacing around colons of switch statements
492
+ "@stylistic/switch-colon-spacing": ["warn"],
493
+
494
+ // https://eslint.style/rules/default/template-curly-spacing
495
+ // Require or disallow spacing around embedded expressions of template strings
496
+ "@stylistic/template-curly-spacing": ["warn"],
497
+
498
+ // https://eslint.style/rules/default/template-tag-spacing
499
+ // Require or disallow spacing between template tags and their literals
500
+ "@stylistic/template-tag-spacing": ["warn"],
501
+
502
+ // https://eslint.style/rules/default/type-annotation-spacing
503
+ // Require consistent spacing around type annotations
504
+ "@stylistic/type-annotation-spacing": ["warn"],
505
+
506
+ // https://eslint.style/rules/default/type-generic-spacing
507
+ // Enforces consistent spacing inside TypeScript type generics
508
+ "@stylistic/type-generic-spacing": ["warn"],
509
+
510
+ // https://eslint.style/rules/default/type-named-tuple-spacing
511
+ // Expect space before the type declaration in the named tuple
512
+ "@stylistic/type-named-tuple-spacing": ["warn"],
513
+
514
+ // https://eslint.style/rules/default/wrap-iife
515
+ // Require parentheses around immediate `function` invocations
516
+ "@stylistic/wrap-iife": ["warn", "inside"],
517
+
518
+ // https://eslint.style/rules/default/wrap-regex
519
+ // Require parenthesis around regex literals
520
+ "@stylistic/wrap-regex": ["warn"],
521
+
522
+ // https://eslint.style/rules/default/yield-star-spacing
523
+ // Require or disallow spacing around the `*` in `yield*` expressions
524
+ "@stylistic/yield-star-spacing": ["warn", "after"]
525
+ };