@paratco/eslint-config 0.5.0 → 0.6.1

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.
@@ -0,0 +1,510 @@
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": ["error", { code: 120 }],
262
+
263
+ // https://eslint.style/rules/default/max-statements-per-line
264
+ // Enforce a maximum number of statements allowed per line
265
+ "@stylistic/max-statements-per-line": ["error"],
266
+
267
+ // https://eslint.style/rules/default/member-delimiter-style
268
+ // Require a specific member delimiter style for interfaces and type literals
269
+ "@stylistic/member-delimiter-style": ["warn"],
270
+
271
+ // https://eslint.style/rules/default/multiline-comment-style
272
+ // Enforce a particular style for multiline comments
273
+ "@stylistic/multiline-comment-style": ["warn"],
274
+
275
+ // https://eslint.style/rules/default/multiline-ternary
276
+ // Enforce newlines between operands of ternary expressions
277
+ "@stylistic/multiline-ternary": ["warn", "always-multiline"],
278
+
279
+ // https://eslint.style/rules/default/new-parens
280
+ // Enforce or disallow parentheses when invoking a constructor with no arguments
281
+ "@stylistic/new-parens": ["warn"],
282
+
283
+ // https://eslint.style/rules/default/newline-per-chained-call
284
+ // Require a newline after each call in a method chain
285
+ "@stylistic/newline-per-chained-call": ["warn"],
286
+
287
+ // https://eslint.style/rules/default/no-confusing-arrow
288
+ // Disallow arrow functions where they could be confused with comparisons
289
+ "@stylistic/no-confusing-arrow": ["warn"],
290
+
291
+ // https://eslint.style/rules/default/no-extra-parens
292
+ // Disallow unnecessary parentheses
293
+ "@stylistic/no-extra-parens": ["warn"],
294
+
295
+ // https://eslint.style/rules/default/no-extra-semi
296
+ // Disallow unnecessary semicolons
297
+ "@stylistic/no-extra-semi": ["warn"],
298
+
299
+ // https://eslint.style/rules/default/no-floating-decimal
300
+ // Disallow leading or trailing decimal points in numeric literals
301
+ "@stylistic/no-floating-decimal": ["warn"],
302
+
303
+ // https://eslint.style/rules/default/no-mixed-operators
304
+ // Disallow mixed binary operators
305
+ "@stylistic/no-mixed-operators": ["error"],
306
+
307
+ // https://eslint.style/rules/default/no-mixed-spaces-and-tabs
308
+ // Disallow mixed spaces and tabs for indentation
309
+ "@stylistic/no-mixed-spaces-and-tabs": ["error"],
310
+
311
+ // https://eslint.style/rules/default/no-multi-spaces
312
+ // Disallow multiple spaces
313
+ "@stylistic/no-multi-spaces": ["warn"],
314
+
315
+ // https://eslint.style/rules/default/no-multiple-empty-lines
316
+ // Disallow multiple empty lines
317
+ "@stylistic/no-multiple-empty-lines": ["warn"],
318
+
319
+ // https://eslint.style/rules/default/no-tabs
320
+ // Disallow all tabs
321
+ "@stylistic/no-tabs": ["error"],
322
+
323
+ // https://eslint.style/rules/default/no-trailing-spaces
324
+ // Disallow trailing whitespace at the end of lines
325
+ "@stylistic/no-trailing-spaces": ["warn"],
326
+
327
+ // https://eslint.style/rules/default/no-whitespace-before-property
328
+ // Disallow whitespace before properties
329
+ "@stylistic/no-whitespace-before-property": ["warn"],
330
+
331
+ // https://eslint.style/rules/default/nonblock-statement-body-position
332
+ // Enforce the location of single-line statements
333
+ "@stylistic/nonblock-statement-body-position": ["warn"],
334
+
335
+ // https://eslint.style/rules/default/object-curly-newline
336
+ // Enforce consistent line breaks after opening and before closing braces
337
+ "@stylistic/object-curly-newline": [
338
+ "warn",
339
+ {
340
+ multiline: true
341
+ }
342
+ ],
343
+
344
+ // https://eslint.style/rules/default/object-curly-spacing
345
+ // Enforce consistent spacing inside braces
346
+ "@stylistic/object-curly-spacing": ["warn"],
347
+
348
+ // https://eslint.style/rules/default/object-property-newline
349
+ // Enforce placing object properties on separate lines
350
+ "@stylistic/object-property-newline": ["warn"],
351
+
352
+ // https://eslint.style/rules/default/one-var-declaration-per-line
353
+ // Require or disallow newlines around variable declarations
354
+ "@stylistic/one-var-declaration-per-line": ["warn"],
355
+
356
+ // https://eslint.style/rules/default/operator-linebreak
357
+ // Enforce consistent linebreak style for operators
358
+ "@stylistic/operator-linebreak": ["warn"],
359
+
360
+ // https://eslint.style/rules/default/padded-blocks
361
+ // Require or disallow padding within blocks
362
+ "@stylistic/padded-blocks": ["warn", "never"],
363
+
364
+ // https://eslint.style/rules/default/padding-line-between-statements
365
+ // Require or disallow padding lines between statements
366
+ "@stylistic/padding-line-between-statements": [
367
+ "warn",
368
+ {
369
+ blankLine: "always",
370
+ prev: "*",
371
+ next: "return"
372
+ },
373
+ {
374
+ blankLine: "always",
375
+ prev: "*",
376
+ next: "block-like"
377
+ },
378
+ {
379
+ blankLine: "always",
380
+ prev: "block-like",
381
+ next: "*"
382
+ },
383
+ {
384
+ blankLine: "always",
385
+ prev: "case",
386
+ next: "case"
387
+ },
388
+ {
389
+ blankLine: "never",
390
+ prev: "*",
391
+ next: "break"
392
+ },
393
+ {
394
+ blankLine: "always",
395
+ prev: "*",
396
+ next: "export"
397
+ },
398
+ {
399
+ blankLine: "always",
400
+ prev: "*",
401
+ next: "interface"
402
+ },
403
+ {
404
+ blankLine: "always",
405
+ prev: "interface",
406
+ next: "*"
407
+ },
408
+ {
409
+ blankLine: "always",
410
+ prev: "*",
411
+ next: "class"
412
+ },
413
+ {
414
+ blankLine: "always",
415
+ prev: "class",
416
+ next: "*"
417
+ }
418
+ ],
419
+
420
+ // https://eslint.style/rules/default/quote-props
421
+ // Require quotes around object literal property names
422
+ "@stylistic/quote-props": ["warn", "as-needed"],
423
+
424
+ // https://eslint.style/rules/default/quotes
425
+ // Enforce the consistent use of either backticks, double, or single quotes
426
+ "@stylistic/quotes": ["warn"],
427
+
428
+ // https://eslint.style/rules/default/rest-spread-spacing
429
+ // Enforce spacing between rest and spread operators and their expressions
430
+ "@stylistic/rest-spread-spacing": ["warn"],
431
+
432
+ // https://eslint.style/rules/default/semi
433
+ // Require or disallow semicolons instead of ASI
434
+ "@stylistic/semi": ["warn"],
435
+
436
+ // https://eslint.style/rules/default/semi-spacing
437
+ // Enforce consistent spacing before and after semicolons
438
+ "@stylistic/semi-spacing": ["warn"],
439
+
440
+ // https://eslint.style/rules/default/semi-style
441
+ // Enforce location of semicolons
442
+ "@stylistic/semi-style": ["warn"],
443
+
444
+ // https://eslint.style/rules/default/space-before-blocks
445
+ // Enforce consistent spacing before blocks
446
+ "@stylistic/space-before-blocks": ["warn"],
447
+
448
+ // https://eslint.style/rules/default/space-before-function-paren
449
+ // Enforce consistent spacing before `function` definition opening parenthesis
450
+ "@stylistic/space-before-function-paren": [
451
+ "warn",
452
+ {
453
+ anonymous: "always",
454
+ named: "never",
455
+ asyncArrow: "always"
456
+ }
457
+ ],
458
+
459
+ // https://eslint.style/rules/default/space-in-parens
460
+ // Enforce consistent spacing inside parentheses
461
+ "@stylistic/space-in-parens": ["warn"],
462
+
463
+ // https://eslint.style/rules/default/space-infix-ops
464
+ // Require spacing around infix operators
465
+ "@stylistic/space-infix-ops": ["warn"],
466
+
467
+ // https://eslint.style/rules/default/space-unary-ops
468
+ // Enforce consistent spacing before or after unary operators
469
+ "@stylistic/space-unary-ops": ["warn"],
470
+
471
+ // https://eslint.style/rules/default/spaced-comment
472
+ // Enforce consistent spacing after the `//` or `/*` in a comment
473
+ "@stylistic/spaced-comment": ["warn"],
474
+
475
+ // https://eslint.style/rules/default/switch-colon-spacing
476
+ // Enforce spacing around colons of switch statements
477
+ "@stylistic/switch-colon-spacing": ["warn"],
478
+
479
+ // https://eslint.style/rules/default/template-curly-spacing
480
+ // Require or disallow spacing around embedded expressions of template strings
481
+ "@stylistic/template-curly-spacing": ["warn"],
482
+
483
+ // https://eslint.style/rules/default/template-tag-spacing
484
+ // Require or disallow spacing between template tags and their literals
485
+ "@stylistic/template-tag-spacing": ["warn"],
486
+
487
+ // https://eslint.style/rules/default/type-annotation-spacing
488
+ // Require consistent spacing around type annotations
489
+ "@stylistic/type-annotation-spacing": ["warn"],
490
+
491
+ // https://eslint.style/rules/default/type-generic-spacing
492
+ // Enforces consistent spacing inside TypeScript type generics
493
+ "@stylistic/type-generic-spacing": ["warn"],
494
+
495
+ // https://eslint.style/rules/default/type-named-tuple-spacing
496
+ // Expect space before the type declaration in the named tuple
497
+ "@stylistic/type-named-tuple-spacing": ["warn"],
498
+
499
+ // https://eslint.style/rules/default/wrap-iife
500
+ // Require parentheses around immediate `function` invocations
501
+ "@stylistic/wrap-iife": ["warn", "inside"],
502
+
503
+ // https://eslint.style/rules/default/wrap-regex
504
+ // Require parenthesis around regex literals
505
+ "@stylistic/wrap-regex": ["warn"],
506
+
507
+ // https://eslint.style/rules/default/yield-star-spacing
508
+ // Require or disallow spacing around the `*` in `yield*` expressions
509
+ "@stylistic/yield-star-spacing": ["warn", "after"]
510
+ };