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