eslint-config-complete 1.2.1 → 1.2.3

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 (39) hide show
  1. package/dist/base/base-eslint.d.ts +12 -0
  2. package/dist/base/base-eslint.d.ts.map +1 -0
  3. package/dist/base/base-eslint.js +670 -0
  4. package/dist/base/base-import-x.d.ts +12 -0
  5. package/dist/base/base-import-x.d.ts.map +1 -0
  6. package/dist/base/base-import-x.js +262 -0
  7. package/dist/base/base-jsdoc.d.ts +6 -0
  8. package/dist/base/base-jsdoc.d.ts.map +1 -0
  9. package/dist/base/base-jsdoc.js +212 -0
  10. package/dist/base/base-n.d.ts +7 -0
  11. package/dist/base/base-n.d.ts.map +1 -0
  12. package/dist/base/base-n.js +108 -0
  13. package/dist/base/base-stylistic.d.ts +6 -0
  14. package/dist/base/base-stylistic.d.ts.map +1 -0
  15. package/dist/base/base-stylistic.js +35 -0
  16. package/dist/base/base-typescript-eslint.d.ts +6 -0
  17. package/dist/base/base-typescript-eslint.d.ts.map +1 -0
  18. package/dist/base/base-typescript-eslint.js +476 -0
  19. package/dist/base/base-unicorn.d.ts +10 -0
  20. package/dist/base/base-unicorn.d.ts.map +1 -0
  21. package/dist/base/base-unicorn.js +203 -0
  22. package/dist/base.d.ts +8 -0
  23. package/dist/base.d.ts.map +1 -0
  24. package/{src → dist}/base.js +17 -30
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/monorepo.d.ts +6 -0
  28. package/dist/monorepo.d.ts.map +1 -0
  29. package/dist/monorepo.js +16 -0
  30. package/package.json +5 -3
  31. package/src/base/base-eslint.js +0 -850
  32. package/src/base/base-import-x.js +0 -310
  33. package/src/base/base-jsdoc.js +0 -276
  34. package/src/base/base-n.js +0 -150
  35. package/src/base/base-stylistic.js +0 -38
  36. package/src/base/base-typescript-eslint.js +0 -554
  37. package/src/base/base-unicorn.js +0 -246
  38. package/src/monorepo.js +0 -18
  39. /package/{src → dist}/index.js +0 -0
@@ -1,850 +0,0 @@
1
- import confusingBrowserGlobals from "confusing-browser-globals";
2
- import tseslint from "typescript-eslint";
3
-
4
- /**
5
- * @see https://eslint.org/docs/latest/rules/#possible-problems
6
- * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
7
- */
8
- const POSSIBLE_PROBLEMS = {
9
- /** The `checkForEach` option is enabled to make the rule stricter. */
10
- "array-callback-return": [
11
- "warn",
12
- {
13
- checkForEach: true,
14
- },
15
- ],
16
-
17
- "constructor-super": "off", // @typescript-eslint/eslint-recommended
18
- "for-direction": "warn",
19
- "getter-return": "off", // @typescript-eslint/eslint-recommended
20
- "no-async-promise-executor": "warn",
21
- "no-await-in-loop": "warn",
22
- "no-class-assign": "warn",
23
- "no-compare-neg-zero": "warn",
24
- "no-cond-assign": "warn",
25
- "no-const-assign": "off", // @typescript-eslint/eslint-recommended
26
- "no-constant-binary-expression": "warn",
27
- "no-constant-condition": "warn",
28
- "no-constructor-return": "warn",
29
- "no-control-regex": "warn",
30
- "no-debugger": "warn",
31
- "no-dupe-args": "off", // @typescript-eslint/eslint-recommended
32
- "no-dupe-class-members": "off", // @typescript-eslint/eslint-recommended
33
- "no-dupe-else-if": "warn",
34
- "no-dupe-keys": "off", // @typescript-eslint/eslint-recommended
35
- "no-duplicate-case": "warn",
36
-
37
- /** Superseded by the `import-x/no-duplicates` rule. */
38
- "no-duplicate-imports": "off",
39
-
40
- "no-empty-character-class": "warn",
41
- "no-empty-pattern": "warn",
42
- "no-ex-assign": "warn",
43
- "no-fallthrough": "warn",
44
- "no-func-assign": "off", // @typescript-eslint/eslint-recommended
45
- "no-import-assign": "off", // @typescript-eslint/eslint-recommended
46
- "no-inner-declarations": "warn",
47
- "no-invalid-regexp": "warn",
48
- "no-irregular-whitespace": "warn",
49
-
50
- /** Superseded by the `@typescript-eslint/no-loss-of-precision` rule. */
51
- "no-loss-of-precision": "off",
52
-
53
- "no-misleading-character-class": "warn",
54
- "no-new-native-nonconstructor": "warn",
55
- "no-new-symbol": "off", // @typescript-eslint/eslint-recommended
56
- "no-obj-calls": "off", // @typescript-eslint/eslint-recommended`
57
- "no-promise-executor-return": "warn",
58
- "no-prototype-builtins": "warn",
59
- "no-self-assign": "warn",
60
- "no-self-compare": "warn",
61
- "no-setter-return": "off", // @typescript-eslint/eslint-recommended
62
- "no-sparse-arrays": "warn",
63
- "no-template-curly-in-string": "warn",
64
- "no-this-before-super": "off", // @typescript-eslint/eslint-recommended`
65
- "no-undef": "off", // @typescript-eslint/eslint-recommended
66
- "no-unexpected-multiline": "off", // eslint-config-prettier
67
- "no-unmodified-loop-condition": "warn",
68
- "no-unreachable": "off", // @typescript-eslint/eslint-recommended
69
- "no-unreachable-loop": "warn",
70
- "no-unsafe-finally": "warn",
71
- "no-unsafe-negation": "off", // @typescript-eslint/eslint-recommended
72
- "no-unsafe-optional-chaining": "warn",
73
- "no-unused-private-class-members": "warn",
74
-
75
- /** Superseded by the `@typescript-eslint/no-unused-vars` rule. */
76
- "no-unused-vars": "off",
77
-
78
- /** Superseded by the `@typescript-eslint/no-use-before-define` rule. */
79
- "no-use-before-define": "off",
80
-
81
- "no-useless-backreference": "warn",
82
-
83
- /**
84
- * Disabled since [Airbnb reports that the rule is "very
85
- * buggy"](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js).
86
- */
87
- "require-atomic-updates": "off",
88
-
89
- "use-isnan": "warn",
90
- "valid-typeof": "warn",
91
- };
92
-
93
- /**
94
- * @see https://eslint.org/docs/latest/rules/#suggestions
95
- * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
96
- */
97
- const SUGGESTIONS = {
98
- "accessor-pairs": "warn",
99
- "arrow-body-style": "warn",
100
- "block-scoped-var": "warn",
101
-
102
- /**
103
- * Superseded by the `@typescript-eslint/naming-convention` rule. (`camelcase` is used to enforce
104
- * naming conventions.)
105
- */
106
- camelcase: "off",
107
-
108
- /**
109
- * Superseded by the `complete/complete-sentences-jsdoc` and
110
- * `complete/complete-sentences-line-comments` rules.
111
- */
112
- "capitalized-comments": "off",
113
-
114
- /** Superseded by the `@typescript-eslint/class-methods-use-this` rule. */
115
- "class-methods-use-this": "off",
116
-
117
- /**
118
- * Disabled since cyclomatic complexity is not a good enough general indicator of code complexity
119
- * and leads to too many false positives.
120
- */
121
- complexity: "off",
122
-
123
- /** Superseded by the `@typescript-eslint/consistent-return` rule. */
124
- "consistent-return": "off",
125
-
126
- "consistent-this": "warn",
127
-
128
- /**
129
- * Always requiring curly braces can partially ward against [Apple-style if statement
130
- * bugs](https://www.imperialviolet.org/2014/02/22/applebug.html). Additionally, this rule needs
131
- * to be set to "all" to [work properly with
132
- * `eslint-prettier-config`](https://github.com/prettier/eslint-config-prettier#curly).
133
- */
134
- curly: ["warn", "all"],
135
-
136
- /**
137
- * Disabled since it would cause the `@typescript-eslint/switch-exhaustiveness-check` rule to not
138
- * work properly.
139
- */
140
- "default-case": "off",
141
-
142
- "default-case-last": "warn",
143
-
144
- /** Superseded by the `@typescript-eslint/default-param-last` rule. */
145
- "default-param-last": "off",
146
-
147
- /** Superseded by the `@typescript-eslint/dot-notation` rule. */
148
- "dot-notation": "off",
149
-
150
- /** Superseded by the `complete/eqeqeq-fix` rule. */
151
- eqeqeq: "off",
152
-
153
- "func-name-matching": "warn",
154
- "func-names": "warn",
155
-
156
- /**
157
- * Disabled since it is common in the TypeScript ecosystem to use both function forms, depending
158
- * on the situation.
159
- */
160
- "func-style": "off",
161
-
162
- "grouped-accessor-pairs": "warn",
163
-
164
- /** Superseded by the `complete/no-for-in` rule. */
165
- "guard-for-in": "off",
166
-
167
- /** Disabled since it is expected to be configured with project-specific keywords. */
168
- "id-denylist": "off",
169
-
170
- /** Disabled because short variable names are understandable in many contexts. */
171
- "id-length": "off",
172
-
173
- /**
174
- * Superseded by the `@typescript-eslint/naming-convention` rule. (`id-match` is used to enforce
175
- * naming conventions.)
176
- */
177
- "id-match": "off",
178
-
179
- /** Superseded by the `@typescript-eslint/init-declarations` rule. */
180
- "init-declarations": "off",
181
-
182
- /** The `enforceForIfStatements` option is enabled to make the rule stricter. */
183
- "logical-assignment-operators": [
184
- "warn",
185
- "always",
186
- {
187
- enforceForIfStatements: true,
188
- },
189
- ],
190
-
191
- "max-classes-per-file": "warn",
192
-
193
- /** Disabled since this rule is too prescriptive for general-purpose use. */
194
- "max-depth": "off",
195
-
196
- /**
197
- * Disabled because enforcing an arbitrary line threshold for every file in a project does not
198
- * provide much value.
199
- */
200
- "max-lines": "off",
201
-
202
- /**
203
- * Disabled because enforcing an arbitrary line threshold for every function in a project does not
204
- * provide much value.
205
- */
206
- "max-lines-per-function": "off",
207
-
208
- "max-nested-callbacks": "warn",
209
-
210
- /** Superseded by the `@typescript-eslint/max-params` rule. */
211
- "max-params": "off",
212
-
213
- /**
214
- * Disabled because enforcing an arbitrary statement threshold for every function in a project
215
- * does not provide much value.
216
- */
217
- "max-statements": "off",
218
-
219
- /** Disabled because it is conventional to use both kinds of comments in TypeScript projects. */
220
- "multiline-comment-style": "off",
221
-
222
- "new-cap": "warn",
223
- "no-alert": "warn",
224
-
225
- /** Superseded by the `@typescript-eslint/no-array-constructor` rule. */
226
- "no-array-constructor": "off",
227
-
228
- "no-bitwise": "warn",
229
- "no-caller": "warn",
230
- "no-case-declarations": "warn",
231
- "no-confusing-arrow": "off", // eslint-config-prettier
232
-
233
- /**
234
- * Disabled because command-line programs written in TypeScript commonly write to standard out and
235
- * standard error.
236
- */
237
- "no-console": "off",
238
-
239
- /**
240
- * Disabled because proper use of continues can reduce indentation for long blocks of code in the
241
- * same way as the [early return
242
- * pattern](https://medium.com/swlh/return-early-pattern-3d18a41bba8).
243
- */
244
- "no-continue": "off",
245
-
246
- "no-delete-var": "warn",
247
-
248
- /** Disabled since it is incompatible with the `unicorn/better-regex` rule. */
249
- "no-div-regex": "off",
250
-
251
- /** The `allowElseIf` option is disabled to make the rule stricter. */
252
- "no-else-return": [
253
- "warn",
254
- {
255
- allowElseIf: false,
256
- },
257
- ],
258
-
259
- "no-empty": "warn",
260
-
261
- /** Superseded by the `@typescript-eslint/no-empty-function` rule. */
262
- "no-empty-function": "off",
263
-
264
- "no-empty-static-block": "warn",
265
- "no-eq-null": "warn",
266
- "no-eval": "warn",
267
- "no-extend-native": "warn",
268
- "no-extra-bind": "warn",
269
- "no-extra-boolean-cast": "warn",
270
- "no-extra-label": "warn",
271
-
272
- /** Superseded by the `@typescript-eslint/no-extra-semi` rule. */
273
- "no-extra-semi": "off",
274
-
275
- "no-floating-decimal": "off", // eslint-config-prettier
276
- "no-global-assign": "warn",
277
- "no-implicit-coercion": "warn",
278
- "no-implicit-globals": "warn",
279
-
280
- /** Superseded by the `@typescript-eslint/no-implied-eval` rule. */
281
- "no-implied-eval": "off",
282
-
283
- /** Disabled because inline comments are common in the TypeScript ecosystem. */
284
- "no-inline-comments": "off",
285
-
286
- /** Superseded by the `@typescript-eslint/no-invalid-this` rule. */
287
- "no-invalid-this": "off",
288
-
289
- "no-iterator": "warn",
290
- "no-label-var": "warn",
291
- "no-labels": "warn",
292
- "no-lone-blocks": "warn",
293
- "no-lonely-if": "warn",
294
-
295
- /** Superseded by the `@typescript-eslint/no-loop-func` rule. */
296
- "no-loop-func": "off",
297
-
298
- /** Superseded by the `@typescript-eslint/no-magic-numbers` rule. */
299
- "no-magic-numbers": "off",
300
-
301
- "no-mixed-operators": "off", // eslint-config-prettier
302
- "no-multi-assign": "warn",
303
- "no-multi-str": "warn",
304
-
305
- /** Superseded by the `unicorn/no-negated-condition` rule. */
306
- "no-negated-condition": "off",
307
-
308
- /**
309
- * `unicorn/no-nested-ternary` is a modified version of this rule but that version is less strict.
310
- */
311
- "no-nested-ternary": "warn",
312
-
313
- "no-new": "warn",
314
- "no-new-func": "warn",
315
- "no-new-wrappers": "warn",
316
- "no-nonoctal-decimal-escape": "warn",
317
- "no-object-constructor": "warn",
318
- "no-octal": "warn",
319
- "no-octal-escape": "warn",
320
-
321
- /**
322
- * The options are [copied from
323
- * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
324
- */
325
- "no-param-reassign": [
326
- "warn",
327
- {
328
- props: true,
329
- ignorePropertyModificationsFor: [
330
- "acc", // for reduce accumulators
331
- "accumulator", // for reduce accumulators
332
- "e", // for e.returnvalue
333
- "ctx", // for Koa routing
334
- "context", // for Koa routing
335
- "req", // for Express requests
336
- "request", // for Express requests
337
- "res", // for Express responses
338
- "response", // for Express responses
339
- "$scope", // for Angular 1 scopes
340
- "staticContext", // for ReactRouter context
341
- ],
342
- },
343
- ],
344
-
345
- /**
346
- * Disabled because the rule is unnecessary when using Prettier. (Unary operators can lead to
347
- * errors with minified code, but Prettier adds semicolons automatically.)
348
- */
349
- "no-plusplus": "off",
350
-
351
- "no-proto": "warn",
352
-
353
- /** Superseded by the `@typescript-eslint/block-spacing` rule. */
354
- "no-redeclare": "off",
355
-
356
- "no-regex-spaces": "warn",
357
-
358
- /**
359
- * The options are [copied from
360
- * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js).
361
- */
362
- "no-restricted-exports": [
363
- "warn",
364
- {
365
- restrictedNamedExports: [
366
- "default", // use `export default` to provide a default export
367
- "then", // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
368
- ],
369
- },
370
- ],
371
-
372
- /**
373
- * The options are [copied from
374
- * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js).
375
- */
376
- "no-restricted-globals": [
377
- "warn",
378
- {
379
- name: "isFinite",
380
- message:
381
- "Use Number.isFinite instead: https://github.com/airbnb/javascript#standard-library--isfinite",
382
- },
383
- {
384
- name: "isNaN",
385
- message:
386
- "Use Number.isNaN instead: https://github.com/airbnb/javascript#standard-library--isnan",
387
- },
388
- ...confusingBrowserGlobals,
389
- ],
390
-
391
- /** Superseded by the `@typescript-eslint/no-restricted-imports` rule. */
392
- "no-restricted-imports": "off",
393
-
394
- /**
395
- * The options are [copied from
396
- * Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
397
- */
398
- "no-restricted-properties": [
399
- "warn",
400
- {
401
- object: "arguments",
402
- property: "callee",
403
- message: "arguments.callee is deprecated",
404
- },
405
- {
406
- object: "global",
407
- property: "isFinite",
408
- message: "Please use Number.isFinite instead",
409
- },
410
- {
411
- object: "self",
412
- property: "isFinite",
413
- message: "Please use Number.isFinite instead",
414
- },
415
- {
416
- object: "window",
417
- property: "isFinite",
418
- message: "Please use Number.isFinite instead",
419
- },
420
- {
421
- object: "global",
422
- property: "isNaN",
423
- message: "Please use Number.isNaN instead",
424
- },
425
- {
426
- object: "self",
427
- property: "isNaN",
428
- message: "Please use Number.isNaN instead",
429
- },
430
- {
431
- object: "window",
432
- property: "isNaN",
433
- message: "Please use Number.isNaN instead",
434
- },
435
- {
436
- property: "__defineGetter__",
437
- message: "Please use Object.defineProperty instead.",
438
- },
439
- {
440
- property: "__defineSetter__",
441
- message: "Please use Object.defineProperty instead.",
442
- },
443
- {
444
- object: "Math",
445
- property: "pow",
446
- message: "Use the exponentiation operator (**) instead.",
447
- },
448
- ],
449
-
450
- /** Disabled because it is intended for disallowing specific language features per-project. */
451
- "no-restricted-syntax": "off",
452
-
453
- /** The `always` option is provided to make the rule stricter. */
454
- "no-return-assign": ["warn", "always"],
455
-
456
- "no-script-url": "warn",
457
-
458
- /**
459
- * Disabled because [it can conflict with
460
- * Prettier](https://github.com/prettier/eslint-config-prettier/tree/main#no-sequences).
461
- */
462
- "no-sequences": "off",
463
-
464
- /** Superseded by the `@typescript-eslint/no-shadow` rule. */
465
- "no-shadow": "off",
466
-
467
- "no-shadow-restricted-names": "warn",
468
-
469
- /**
470
- * Disabled because ternaries are common in the TypeScript ecosystem and can often lead to concise
471
- * code that is easy to read.
472
- */
473
- "no-ternary": "off",
474
-
475
- /** Superseded by the `@typescript-eslint/no-throw-literal` rule. */
476
- "no-throw-literal": "off",
477
-
478
- "no-undef-init": "warn",
479
-
480
- /**
481
- * Disabled because in TypeScript, it is common to explicitly check for undefined for the purposes
482
- * of type narrowing.
483
- */
484
- "no-undefined": "off",
485
-
486
- /**
487
- * Disabled since it is a common pattern to use underscores to temporarily allow unused variables
488
- * during development.
489
- */
490
- "no-underscore-dangle": "off",
491
-
492
- /** The `defaultAssignment` option is disabled to make the rule stricter. */
493
- "no-unneeded-ternary": [
494
- "warn",
495
- {
496
- defaultAssignment: false,
497
- },
498
- ],
499
-
500
- /** Superseded by the `@typescript-eslint/no-unused-expressions` rule. */
501
- "no-unused-expressions": "off",
502
-
503
- "no-unused-labels": "warn",
504
- "no-useless-assignment": "warn",
505
- "no-useless-call": "warn",
506
- "no-useless-catch": "warn",
507
-
508
- /** The `enforceForClassMembers` option is enabled to make the rule stricter. */
509
- "no-useless-computed-key": [
510
- "warn",
511
- {
512
- enforceForClassMembers: true,
513
- },
514
- ],
515
-
516
- "no-useless-concat": "warn",
517
-
518
- /** Superseded by the `@typescript-eslint/no-useless-constructor` rule. */
519
- "no-useless-constructor": "off",
520
-
521
- "no-useless-escape": "warn",
522
- "no-useless-rename": "warn",
523
-
524
- /**
525
- * Superseded by the `complete/no-useless-return` rule (since the auto-fix is usually unwanted).
526
- */
527
- "no-useless-return": "off",
528
-
529
- "no-var": "warn",
530
- "no-void": "warn",
531
-
532
- /** Superseded by the `unicorn/expiring-todo-comments` rule. */
533
- "no-warning-comments": "off",
534
-
535
- "no-with": "warn",
536
-
537
- /** The `ignoreConstructors` option is disabled to make the rule stricter. */
538
- "object-shorthand": [
539
- "warn",
540
- "always",
541
- {
542
- ignoreConstructors: false,
543
- },
544
- ],
545
-
546
- /**
547
- * The `never` option is provided to disallow multi-variable declarations (since they can be
548
- * confusing).
549
- */
550
- "one-var": ["warn", "never"],
551
-
552
- "one-var-declaration-per-line": "off", // eslint-config-prettier
553
- "operator-assignment": "warn",
554
- "prefer-arrow-callback": "warn",
555
-
556
- /** Superseded by the `complete/prefer-const` rule (since the auto-fix is usually unwanted). */
557
- "prefer-const": "off",
558
-
559
- /** Superseded by the `@typescript-eslint/prefer-destructuring` rule. */
560
- "prefer-destructuring": "off",
561
-
562
- "prefer-exponentiation-operator": "warn",
563
-
564
- /**
565
- * Disabled because it is common to have a regex with only a single match, in which case a named
566
- * capture group can be needlessly verbose (and cause extra type narrowing).
567
- */
568
- "prefer-named-capture-group": "off",
569
-
570
- "prefer-numeric-literals": "warn",
571
- "prefer-object-has-own": "warn",
572
- "prefer-object-spread": "warn",
573
-
574
- /** Superseded by the `@typescript-eslint/prefer-promise-reject-errors` rule. */
575
- "prefer-promise-reject-errors": "off",
576
-
577
- /** The `disallowRedundantWrapping` option is enabled to make the rule stricter. */
578
- "prefer-regex-literals": [
579
- "warn",
580
- {
581
- disallowRedundantWrapping: true,
582
- },
583
- ],
584
-
585
- "prefer-rest-params": "warn",
586
- "prefer-spread": "warn",
587
- "prefer-template": "warn",
588
- "quote-props": "off", // eslint-config-prettier
589
- radix: "warn",
590
-
591
- /** Superseded by the `@typescript-eslint/require-await` rule. */
592
- "require-await": "off",
593
-
594
- /**
595
- * Disabled because requiring the `u` or the `v` flag for ASCII text is verbose and cumbersome.
596
- * (Even though these flags would also enable regex strict mode, the marginal benefit is not worth
597
- * the verbosity.)
598
- */
599
- "require-unicode-regexp": "off",
600
-
601
- "require-yield": "warn",
602
-
603
- /** Disabled since this is automatically handled by `prettier-plugin-organize-imports`. */
604
- "sort-imports": "off",
605
-
606
- /** Disabled because object keys are often not meant to be sorted in alphabetical order. */
607
- "sort-keys": "off",
608
-
609
- /**
610
- * Disabled because variable declarations are often not meant to be sorted in alphabetical order.
611
- */
612
- "sort-vars": "off",
613
-
614
- /**
615
- * Partially superseded by `complete/format-jsdoc-comments` and `complete/format-line-comments`,
616
- * but those rules do not handle trailing line comments.
617
- *
618
- * The `markers` option is provided to make this rule ignore lines that start with "///".
619
- */
620
- "spaced-comment": [
621
- "warn",
622
- "always",
623
- {
624
- markers: ["/"],
625
- },
626
- ],
627
-
628
- /** The `never` option is provided to make the rule stricter. */
629
- strict: ["warn", "never"],
630
-
631
- "symbol-description": "warn",
632
- "vars-on-top": "warn",
633
- yoda: "warn",
634
- };
635
-
636
- /**
637
- * @see https://eslint.org/docs/latest/rules/#suggestions
638
- * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
639
- */
640
- const LAYOUT_AND_FORMATTING = {
641
- "unicode-bom": "warn",
642
- };
643
-
644
- /**
645
- * @see https://eslint.org/docs/latest/rules/#deprecated
646
- * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
647
- */
648
- const DEPRECATED = {
649
- /** Disabled since the rule is deprecated. */
650
- "array-bracket-newline": "off",
651
-
652
- /** Disabled since the rule is deprecated. */
653
- "array-bracket-spacing": "off",
654
-
655
- /** Disabled since the rule is deprecated. */
656
- "array-element-newline": "off",
657
-
658
- /** Disabled since the rule is deprecated. */
659
- "arrow-parens": "off",
660
-
661
- /** Disabled since the rule is deprecated. */
662
- "arrow-spacing": "off",
663
-
664
- /** Disabled since the rule is deprecated. */
665
- "block-spacing": "off",
666
-
667
- /** Disabled since the rule is deprecated. */
668
- "brace-style": "off",
669
-
670
- /** Disabled since the rule is deprecated. */
671
- "comma-dangle": "off",
672
-
673
- /** Disabled since the rule is deprecated. */
674
- "comma-spacing": "off",
675
-
676
- /** Disabled since the rule is deprecated. */
677
- "comma-style": "off",
678
-
679
- /** Disabled since the rule is deprecated. */
680
- "computed-property-spacing": "off",
681
-
682
- /** Disabled since the rule is deprecated. */
683
- "dot-location": "off",
684
-
685
- /** Disabled since the rule is deprecated. */
686
- "eol-last": "off",
687
-
688
- /** Disabled since the rule is deprecated. */
689
- "func-call-spacing": "off",
690
-
691
- /** Disabled since the rule is deprecated. */
692
- "function-call-argument-newline": "off",
693
-
694
- /** Disabled since the rule is deprecated. */
695
- "function-paren-newline": "off",
696
-
697
- /** Disabled since the rule is deprecated. */
698
- "generator-star-spacing": "off",
699
-
700
- /** Disabled since the rule is deprecated. */
701
- "implicit-arrow-linebreak": "off",
702
-
703
- /** Disabled since the rule is deprecated. */
704
- indent: "off",
705
-
706
- /** Disabled since the rule is deprecated. */
707
- "jsx-quotes": "off",
708
-
709
- /** Disabled since the rule is deprecated. */
710
- "key-spacing": "off",
711
-
712
- /** Disabled since the rule is deprecated. */
713
- "keyword-spacing": "off",
714
-
715
- /** Disabled since the rule is deprecated. */
716
- "line-comment-position": "off",
717
-
718
- /** Disabled since the rule is deprecated. */
719
- "linebreak-style": "off",
720
-
721
- /** Disabled since the rule is deprecated. */
722
- "lines-around-comment": "off",
723
-
724
- /** Disabled since the rule is deprecated. */
725
- "lines-between-class-members": "off",
726
-
727
- /** Disabled since the rule is deprecated. */
728
- "max-len": "off",
729
-
730
- /** Disabled since the rule is deprecated. */
731
- "max-statements-per-line": "off",
732
-
733
- /** Disabled since the rule is deprecated. */
734
- "multiline-ternary": "off",
735
-
736
- /** Disabled since the rule is deprecated. */
737
- "new-parens": "off",
738
-
739
- /** Disabled since the rule is deprecated. */
740
- "newline-per-chained-call": "off",
741
-
742
- /** Disabled since the rule is deprecated. */
743
- "no-extra-parens": "off",
744
-
745
- /** Disabled since the rule is deprecated. */
746
- "no-mixed-spaces-and-tabs": "off",
747
-
748
- /** Disabled since the rule is deprecated. */
749
- "no-multi-spaces": "off",
750
-
751
- /** Disabled since the rule is deprecated. */
752
- "no-multiple-empty-lines": "off",
753
-
754
- /** Disabled since the rule is deprecated. */
755
- "no-tabs": "off",
756
-
757
- /** Disabled since the rule is deprecated. */
758
- "no-trailing-spaces": "off",
759
-
760
- /** Disabled since the rule is deprecated. */
761
- "no-whitespace-before-property": "off",
762
-
763
- /** Disabled since the rule is deprecated. */
764
- "nonblock-statement-body-position": "off",
765
-
766
- /** Disabled since the rule is deprecated. */
767
- "object-curly-newline": "off",
768
-
769
- /** Disabled since the rule is deprecated. */
770
- "object-curly-spacing": "off",
771
-
772
- /** Disabled since the rule is deprecated. */
773
- "object-property-newline": "off",
774
-
775
- /** Disabled since the rule is deprecated. */
776
- "operator-linebreak": "off",
777
-
778
- /** Disabled since the rule is deprecated. */
779
- "padded-blocks": "off",
780
-
781
- /** Disabled since the rule is deprecated. */
782
- "padding-line-between-statements": "off",
783
-
784
- /** Disabled since the rule is deprecated. */
785
- quotes: "off",
786
-
787
- /** Disabled since the rule is deprecated. */
788
- "rest-spread-spacing": "off",
789
-
790
- /** Disabled since the rule is deprecated. */
791
- semi: "off",
792
-
793
- /** Disabled since the rule is deprecated. */
794
- "semi-spacing": "off",
795
-
796
- /** Disabled since the rule is deprecated. */
797
- "semi-style": "off",
798
-
799
- /** Disabled since the rule is deprecated. */
800
- "space-before-blocks": "off",
801
-
802
- /** Disabled since the rule is deprecated. */
803
- "space-before-function-paren": "off",
804
-
805
- /** Disabled since the rule is deprecated. */
806
- "space-in-parens": "off",
807
-
808
- /** Disabled since the rule is deprecated. */
809
- "space-infix-ops": "off",
810
-
811
- /** Disabled since the rule is deprecated. */
812
- "space-unary-ops": "off",
813
-
814
- /** Disabled since the rule is deprecated. */
815
- "switch-colon-spacing": "off",
816
-
817
- /** Disabled since the rule is deprecated. */
818
- "template-curly-spacing": "off",
819
-
820
- /** Disabled since the rule is deprecated. */
821
- "template-tag-spacing": "off",
822
-
823
- /** Disabled since the rule is deprecated. */
824
- "wrap-iife": "off",
825
-
826
- /** Disabled since the rule is deprecated. */
827
- "wrap-regex": "off",
828
-
829
- /** Disabled since the rule is deprecated. */
830
- "yield-star-spacing": "off",
831
- };
832
-
833
- /**
834
- * This ESLint config only contains built-in rules from ESLint itself:
835
- * https://eslint.org/docs/latest/rules/
836
- *
837
- * Rules are separated into categories:
838
- * 1) Possible Problems
839
- * 2) Suggestions
840
- * 3) Layout & Formatting
841
- * 4) Deprecated
842
- */
843
- export const baseESLint = tseslint.config({
844
- rules: {
845
- ...POSSIBLE_PROBLEMS,
846
- ...SUGGESTIONS,
847
- ...LAYOUT_AND_FORMATTING,
848
- ...DEPRECATED,
849
- },
850
- });