@paratco/eslint-config 1.0.16 → 2.1.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.
Files changed (54) hide show
  1. package/dist/configs/base.d.ts +124 -0
  2. package/dist/configs/base.d.ts.map +1 -0
  3. package/dist/configs/base.js +21 -0
  4. package/dist/configs/import.d.ts +83 -0
  5. package/dist/configs/import.d.ts.map +1 -0
  6. package/dist/configs/import.js +41 -0
  7. package/dist/configs/node.d.ts +203 -0
  8. package/dist/configs/node.d.ts.map +1 -0
  9. package/{src → dist}/configs/node.js +3 -5
  10. package/dist/configs/prettierFormatter.d.ts +4 -0
  11. package/dist/configs/prettierFormatter.d.ts.map +1 -0
  12. package/{src → dist}/configs/prettierFormatter.js +0 -1
  13. package/dist/configs/react.d.ts +2863 -0
  14. package/dist/configs/react.d.ts.map +1 -0
  15. package/dist/configs/react.js +51 -0
  16. package/dist/configs/stylisticFormatter.d.ts +218 -0
  17. package/dist/configs/stylisticFormatter.d.ts.map +1 -0
  18. package/dist/configs/stylisticFormatter.js +29 -0
  19. package/dist/index.d.ts +3484 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +14 -0
  22. package/dist/rules/import.d.ts +59 -0
  23. package/dist/rules/import.d.ts.map +1 -0
  24. package/dist/rules/import.js +139 -0
  25. package/dist/rules/javascript.d.ts +23 -0
  26. package/dist/rules/javascript.d.ts.map +1 -0
  27. package/dist/rules/javascript.js +42 -0
  28. package/dist/rules/react.d.ts +112 -0
  29. package/dist/rules/react.d.ts.map +1 -0
  30. package/dist/rules/react.js +330 -0
  31. package/dist/rules/stylistic.d.ts +208 -0
  32. package/dist/rules/stylistic.d.ts.map +1 -0
  33. package/dist/rules/stylistic.js +439 -0
  34. package/dist/rules/typescript.d.ts +96 -0
  35. package/dist/rules/typescript.d.ts.map +1 -0
  36. package/dist/rules/typescript.js +254 -0
  37. package/package.json +25 -12
  38. package/.github/dependabot.yml +0 -14
  39. package/.github/workflows/publish.yml +0 -52
  40. package/.prettierrc.json +0 -22
  41. package/.yarnrc.yml +0 -1
  42. package/index.js +0 -15
  43. package/prettier/README.md +0 -22
  44. package/prettier/index.json +0 -22
  45. package/prettier/package.json +0 -20
  46. package/src/configs/base.js +0 -25
  47. package/src/configs/import.js +0 -43
  48. package/src/configs/react.js +0 -58
  49. package/src/configs/stylisticFormatter.js +0 -33
  50. package/src/lints/import/index.js +0 -175
  51. package/src/lints/javascript/index.js +0 -46
  52. package/src/lints/react/index.js +0 -425
  53. package/src/lints/stylistic/index.js +0 -529
  54. package/src/lints/typescript/index.js +0 -295
@@ -1,529 +0,0 @@
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
- comments: 120,
267
- // ignorePattern: true,
268
- ignoreComments: true,
269
- ignoreTrailingComments: true,
270
- ignoreUrls: true,
271
- ignoreStrings: true,
272
- ignoreTemplateLiterals: true,
273
- ignoreRegExpLiterals: true
274
- }
275
- ],
276
-
277
- // https://eslint.style/rules/default/max-statements-per-line
278
- // Enforce a maximum number of statements allowed per line
279
- "@stylistic/max-statements-per-line": ["error"],
280
-
281
- // https://eslint.style/rules/default/member-delimiter-style
282
- // Require a specific member delimiter style for interfaces and type literals
283
- "@stylistic/member-delimiter-style": ["warn"],
284
-
285
- // https://eslint.style/rules/default/multiline-comment-style
286
- // Enforce a particular style for multiline comments
287
- "@stylistic/multiline-comment-style": ["off"],
288
-
289
- // https://eslint.style/rules/default/multiline-ternary
290
- // Enforce newlines between operands of ternary expressions
291
- "@stylistic/multiline-ternary": ["warn", "always-multiline"],
292
-
293
- // https://eslint.style/rules/default/new-parens
294
- // Enforce or disallow parentheses when invoking a constructor with no arguments
295
- "@stylistic/new-parens": ["warn"],
296
-
297
- // https://eslint.style/rules/default/newline-per-chained-call
298
- // Require a newline after each call in a method chain
299
- "@stylistic/newline-per-chained-call": ["warn"],
300
-
301
- // https://eslint.style/rules/default/no-confusing-arrow
302
- // Disallow arrow functions where they could be confused with comparisons
303
- "@stylistic/no-confusing-arrow": ["warn"],
304
-
305
- // https://eslint.style/rules/default/no-extra-parens
306
- // Disallow unnecessary parentheses
307
- "@stylistic/no-extra-parens": ["warn"],
308
-
309
- // https://eslint.style/rules/default/no-extra-semi
310
- // Disallow unnecessary semicolons
311
- "@stylistic/no-extra-semi": ["warn"],
312
-
313
- // https://eslint.style/rules/default/no-floating-decimal
314
- // Disallow leading or trailing decimal points in numeric literals
315
- "@stylistic/no-floating-decimal": ["warn"],
316
-
317
- // https://eslint.style/rules/default/no-mixed-operators
318
- // Disallow mixed binary operators
319
- "@stylistic/no-mixed-operators": ["error"],
320
-
321
- // https://eslint.style/rules/default/no-mixed-spaces-and-tabs
322
- // Disallow mixed spaces and tabs for indentation
323
- "@stylistic/no-mixed-spaces-and-tabs": ["error"],
324
-
325
- // https://eslint.style/rules/default/no-multi-spaces
326
- // Disallow multiple spaces
327
- "@stylistic/no-multi-spaces": ["warn"],
328
-
329
- // https://eslint.style/rules/default/no-multiple-empty-lines
330
- // Disallow multiple empty lines
331
- "@stylistic/no-multiple-empty-lines": ["warn"],
332
-
333
- // https://eslint.style/rules/default/no-tabs
334
- // Disallow all tabs
335
- "@stylistic/no-tabs": ["error"],
336
-
337
- // https://eslint.style/rules/default/no-trailing-spaces
338
- // Disallow trailing whitespace at the end of lines
339
- "@stylistic/no-trailing-spaces": ["warn"],
340
-
341
- // https://eslint.style/rules/default/no-whitespace-before-property
342
- // Disallow whitespace before properties
343
- "@stylistic/no-whitespace-before-property": ["warn"],
344
-
345
- // https://eslint.style/rules/default/nonblock-statement-body-position
346
- // Enforce the location of single-line statements
347
- "@stylistic/nonblock-statement-body-position": ["warn"],
348
-
349
- // https://eslint.style/rules/default/object-curly-newline
350
- // Enforce consistent line breaks after opening and before closing braces
351
- "@stylistic/object-curly-newline": [
352
- "warn",
353
- {
354
- consistent: true
355
- }
356
- ],
357
-
358
- // https://eslint.style/rules/default/object-curly-spacing
359
- // Enforce consistent spacing inside braces
360
- "@stylistic/object-curly-spacing": ["warn"],
361
-
362
- // https://eslint.style/rules/default/object-property-newline
363
- // Enforce placing object properties on separate lines
364
- "@stylistic/object-property-newline": [
365
- "warn",
366
- {
367
- allowAllPropertiesOnSameLine: true
368
- }
369
- ],
370
-
371
- // https://eslint.style/rules/default/one-var-declaration-per-line
372
- // Require or disallow newlines around variable declarations
373
- "@stylistic/one-var-declaration-per-line": ["warn"],
374
-
375
- // https://eslint.style/rules/default/operator-linebreak
376
- // Enforce consistent linebreak style for operators
377
- "@stylistic/operator-linebreak": ["warn"],
378
-
379
- // https://eslint.style/rules/default/padded-blocks
380
- // Require or disallow padding within blocks
381
- "@stylistic/padded-blocks": ["warn", "never"],
382
-
383
- // https://eslint.style/rules/default/padding-line-between-statements
384
- // Require or disallow padding lines between statements
385
- "@stylistic/padding-line-between-statements": [
386
- "warn",
387
- {
388
- blankLine: "always",
389
- prev: "*",
390
- next: "return"
391
- },
392
- {
393
- blankLine: "always",
394
- prev: "*",
395
- next: "block-like"
396
- },
397
- {
398
- blankLine: "always",
399
- prev: "block-like",
400
- next: "*"
401
- },
402
- {
403
- blankLine: "always",
404
- prev: "case",
405
- next: "case"
406
- },
407
- {
408
- blankLine: "never",
409
- prev: "*",
410
- next: "break"
411
- },
412
- {
413
- blankLine: "always",
414
- prev: "*",
415
- next: "export"
416
- },
417
- {
418
- blankLine: "always",
419
- prev: "*",
420
- next: "interface"
421
- },
422
- {
423
- blankLine: "always",
424
- prev: "interface",
425
- next: "*"
426
- },
427
- {
428
- blankLine: "always",
429
- prev: "*",
430
- next: "class"
431
- },
432
- {
433
- blankLine: "always",
434
- prev: "class",
435
- next: "*"
436
- }
437
- ],
438
-
439
- // https://eslint.style/rules/default/quote-props
440
- // Require quotes around object literal property names
441
- "@stylistic/quote-props": ["warn", "as-needed"],
442
-
443
- // https://eslint.style/rules/default/quotes
444
- // Enforce the consistent use of either backticks, double, or single quotes
445
- "@stylistic/quotes": ["warn"],
446
-
447
- // https://eslint.style/rules/default/rest-spread-spacing
448
- // Enforce spacing between rest and spread operators and their expressions
449
- "@stylistic/rest-spread-spacing": ["warn"],
450
-
451
- // https://eslint.style/rules/default/semi
452
- // Require or disallow semicolons instead of ASI
453
- "@stylistic/semi": ["warn"],
454
-
455
- // https://eslint.style/rules/default/semi-spacing
456
- // Enforce consistent spacing before and after semicolons
457
- "@stylistic/semi-spacing": ["warn"],
458
-
459
- // https://eslint.style/rules/default/semi-style
460
- // Enforce location of semicolons
461
- "@stylistic/semi-style": ["warn"],
462
-
463
- // https://eslint.style/rules/default/space-before-blocks
464
- // Enforce consistent spacing before blocks
465
- "@stylistic/space-before-blocks": ["warn"],
466
-
467
- // https://eslint.style/rules/default/space-before-function-paren
468
- // Enforce consistent spacing before `function` definition opening parenthesis
469
- "@stylistic/space-before-function-paren": [
470
- "warn",
471
- {
472
- anonymous: "always",
473
- named: "never",
474
- asyncArrow: "always"
475
- }
476
- ],
477
-
478
- // https://eslint.style/rules/default/space-in-parens
479
- // Enforce consistent spacing inside parentheses
480
- "@stylistic/space-in-parens": ["warn"],
481
-
482
- // https://eslint.style/rules/default/space-infix-ops
483
- // Require spacing around infix operators
484
- "@stylistic/space-infix-ops": ["warn"],
485
-
486
- // https://eslint.style/rules/default/space-unary-ops
487
- // Enforce consistent spacing before or after unary operators
488
- "@stylistic/space-unary-ops": ["warn"],
489
-
490
- // https://eslint.style/rules/default/spaced-comment
491
- // Enforce consistent spacing after the `//` or `/*` in a comment
492
- "@stylistic/spaced-comment": ["warn"],
493
-
494
- // https://eslint.style/rules/default/switch-colon-spacing
495
- // Enforce spacing around colons of switch statements
496
- "@stylistic/switch-colon-spacing": ["warn"],
497
-
498
- // https://eslint.style/rules/default/template-curly-spacing
499
- // Require or disallow spacing around embedded expressions of template strings
500
- "@stylistic/template-curly-spacing": ["warn"],
501
-
502
- // https://eslint.style/rules/default/template-tag-spacing
503
- // Require or disallow spacing between template tags and their literals
504
- "@stylistic/template-tag-spacing": ["warn"],
505
-
506
- // https://eslint.style/rules/default/type-annotation-spacing
507
- // Require consistent spacing around type annotations
508
- "@stylistic/type-annotation-spacing": ["warn"],
509
-
510
- // https://eslint.style/rules/default/type-generic-spacing
511
- // Enforces consistent spacing inside TypeScript type generics
512
- "@stylistic/type-generic-spacing": ["warn"],
513
-
514
- // https://eslint.style/rules/default/type-named-tuple-spacing
515
- // Expect space before the type declaration in the named tuple
516
- "@stylistic/type-named-tuple-spacing": ["warn"],
517
-
518
- // https://eslint.style/rules/default/wrap-iife
519
- // Require parentheses around immediate `function` invocations
520
- "@stylistic/wrap-iife": ["warn", "inside"],
521
-
522
- // https://eslint.style/rules/default/wrap-regex
523
- // Require parenthesis around regex literals
524
- "@stylistic/wrap-regex": ["warn"],
525
-
526
- // https://eslint.style/rules/default/yield-star-spacing
527
- // Require or disallow spacing around the `*` in `yield*` expressions
528
- "@stylistic/yield-star-spacing": ["warn", "after"]
529
- };