@lincy/eslint-config 3.0.11 → 3.2.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.
- package/README.md +145 -42
- package/dist/index.cjs +762 -587
- package/dist/index.d.cts +68 -26
- package/dist/index.d.ts +68 -26
- package/dist/index.js +762 -609
- package/package.json +6 -9
package/dist/index.js
CHANGED
|
@@ -61,9 +61,6 @@ function searchPackageJSON(dir) {
|
|
|
61
61
|
// src/factory.ts
|
|
62
62
|
import gitignore from "eslint-config-flat-gitignore";
|
|
63
63
|
|
|
64
|
-
// src/flags.ts
|
|
65
|
-
var OFF = 0;
|
|
66
|
-
|
|
67
64
|
// src/plugins.ts
|
|
68
65
|
import { default as default2 } from "eslint-plugin-antfu";
|
|
69
66
|
import { default as default3 } from "eslint-plugin-eslint-comments";
|
|
@@ -72,49 +69,69 @@ import { default as default5 } from "eslint-plugin-jsdoc";
|
|
|
72
69
|
import { default as default6 } from "eslint-plugin-jsonc";
|
|
73
70
|
import { default as default7 } from "eslint-plugin-markdown";
|
|
74
71
|
import { default as default8 } from "eslint-plugin-n";
|
|
75
|
-
import { default as default9 } from "@stylistic/eslint-plugin
|
|
76
|
-
import { default as default10 } from "@
|
|
77
|
-
import { default as default11 } from "
|
|
78
|
-
import { default as default12 } from "eslint-plugin-
|
|
79
|
-
import { default as default13 } from "eslint-plugin-
|
|
80
|
-
import { default as default14 } from "eslint-plugin-
|
|
81
|
-
import { default as default15 } from "eslint-plugin-
|
|
82
|
-
import { default as default16 } from "eslint
|
|
83
|
-
import { default as default17 } from "
|
|
84
|
-
import { default as default18 } from "
|
|
85
|
-
import { default as default19 } from "
|
|
86
|
-
import { default as default20 } from "jsonc-eslint-parser";
|
|
72
|
+
import { default as default9 } from "@stylistic/eslint-plugin";
|
|
73
|
+
import { default as default10 } from "@typescript-eslint/eslint-plugin";
|
|
74
|
+
import { default as default11 } from "eslint-plugin-unicorn";
|
|
75
|
+
import { default as default12 } from "eslint-plugin-unused-imports";
|
|
76
|
+
import { default as default13 } from "eslint-plugin-vue";
|
|
77
|
+
import { default as default14 } from "eslint-plugin-yml";
|
|
78
|
+
import { default as default15 } from "eslint-plugin-no-only-tests";
|
|
79
|
+
import { default as default16 } from "@typescript-eslint/parser";
|
|
80
|
+
import { default as default17 } from "vue-eslint-parser";
|
|
81
|
+
import { default as default18 } from "yaml-eslint-parser";
|
|
82
|
+
import { default as default19 } from "jsonc-eslint-parser";
|
|
87
83
|
|
|
88
84
|
// src/configs/comments.ts
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
function comments() {
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
plugins: {
|
|
89
|
+
"eslint-comments": default3
|
|
90
|
+
},
|
|
91
|
+
rules: {
|
|
92
|
+
"eslint-comments/no-aggregating-enable": "error",
|
|
93
|
+
"eslint-comments/no-duplicate-disable": "error",
|
|
94
|
+
"eslint-comments/no-unlimited-disable": "error",
|
|
95
|
+
"eslint-comments/no-unused-enable": "error"
|
|
96
|
+
}
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
100
|
|
|
101
101
|
// src/globs.ts
|
|
102
102
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
103
103
|
var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
104
|
+
var GLOB_JS = "**/*.?([cm])js";
|
|
105
|
+
var GLOB_JSX = "**/*.?([cm])jsx";
|
|
104
106
|
var GLOB_TS = "**/*.?([cm])ts";
|
|
105
107
|
var GLOB_TSX = "**/*.?([cm])tsx";
|
|
108
|
+
var GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
109
|
+
var GLOB_CSS = "**/*.css";
|
|
110
|
+
var GLOB_LESS = "**/*.less";
|
|
111
|
+
var GLOB_SCSS = "**/*.scss";
|
|
106
112
|
var GLOB_JSON = "**/*.json";
|
|
107
113
|
var GLOB_JSON5 = "**/*.json5";
|
|
108
114
|
var GLOB_JSONC = "**/*.jsonc";
|
|
109
115
|
var GLOB_MARKDOWN = "**/*.md";
|
|
110
116
|
var GLOB_VUE = "**/*.vue";
|
|
111
117
|
var GLOB_YAML = "**/*.y?(a)ml";
|
|
118
|
+
var GLOB_HTML = "**/*.htm?(l)";
|
|
112
119
|
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
113
120
|
var GLOB_TESTS = [
|
|
114
121
|
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
115
122
|
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
116
123
|
`**/*.test.${GLOB_SRC_EXT}`
|
|
117
124
|
];
|
|
125
|
+
var GLOB_ALL_SRC = [
|
|
126
|
+
GLOB_SRC,
|
|
127
|
+
GLOB_STYLE,
|
|
128
|
+
GLOB_JSON,
|
|
129
|
+
GLOB_JSON5,
|
|
130
|
+
GLOB_MARKDOWN,
|
|
131
|
+
GLOB_VUE,
|
|
132
|
+
GLOB_YAML,
|
|
133
|
+
GLOB_HTML
|
|
134
|
+
];
|
|
118
135
|
var GLOB_EXCLUDE = [
|
|
119
136
|
"**/node_modules",
|
|
120
137
|
"**/dist",
|
|
@@ -140,33 +157,54 @@ var GLOB_EXCLUDE = [
|
|
|
140
157
|
];
|
|
141
158
|
|
|
142
159
|
// src/configs/ignores.ts
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
]
|
|
160
|
+
function ignores(options = {}) {
|
|
161
|
+
const {
|
|
162
|
+
ignores: ignores2 = []
|
|
163
|
+
} = options;
|
|
164
|
+
return [
|
|
165
|
+
{
|
|
166
|
+
ignores: [
|
|
167
|
+
...GLOB_EXCLUDE,
|
|
168
|
+
...ignores2
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
];
|
|
172
|
+
}
|
|
146
173
|
|
|
147
174
|
// src/configs/imports.ts
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
175
|
+
function imports() {
|
|
176
|
+
return [
|
|
177
|
+
{
|
|
178
|
+
plugins: {
|
|
179
|
+
import: default4
|
|
180
|
+
},
|
|
181
|
+
rules: {
|
|
182
|
+
"import/export": "error",
|
|
183
|
+
"import/first": "error",
|
|
184
|
+
"import/newline-after-import": ["error", { considerComments: true, count: 1 }],
|
|
185
|
+
"import/no-duplicates": "error",
|
|
186
|
+
"import/no-mutable-exports": "error",
|
|
187
|
+
"import/no-named-default": "error",
|
|
188
|
+
"import/no-self-import": "error",
|
|
189
|
+
"import/no-webpack-loader-syntax": "error",
|
|
190
|
+
"import/order": "error"
|
|
191
|
+
}
|
|
163
192
|
}
|
|
164
|
-
|
|
165
|
-
|
|
193
|
+
];
|
|
194
|
+
}
|
|
166
195
|
|
|
167
196
|
// src/configs/javascript.ts
|
|
168
197
|
import globals from "globals";
|
|
198
|
+
|
|
199
|
+
// src/flags.ts
|
|
200
|
+
var OFF = 0;
|
|
201
|
+
|
|
202
|
+
// src/configs/javascript.ts
|
|
169
203
|
function javascript(options = {}) {
|
|
204
|
+
const {
|
|
205
|
+
isInEditor = false,
|
|
206
|
+
overrides = {}
|
|
207
|
+
} = options;
|
|
170
208
|
return [
|
|
171
209
|
{
|
|
172
210
|
languageOptions: {
|
|
@@ -190,7 +228,7 @@ function javascript(options = {}) {
|
|
|
190
228
|
},
|
|
191
229
|
plugins: {
|
|
192
230
|
"antfu": default2,
|
|
193
|
-
"unused-imports":
|
|
231
|
+
"unused-imports": default12
|
|
194
232
|
},
|
|
195
233
|
rules: {
|
|
196
234
|
"accessor-pairs": ["error", { enforceForClassMembers: true, setWithoutGet: true }],
|
|
@@ -371,7 +409,7 @@ function javascript(options = {}) {
|
|
|
371
409
|
],
|
|
372
410
|
"symbol-description": "error",
|
|
373
411
|
"unicode-bom": ["error", "never"],
|
|
374
|
-
"unused-imports/no-unused-imports":
|
|
412
|
+
"unused-imports/no-unused-imports": isInEditor ? OFF : "error",
|
|
375
413
|
"unused-imports/no-unused-vars": [
|
|
376
414
|
"error",
|
|
377
415
|
{ args: "after-used", argsIgnorePattern: "^_", vars: "all", varsIgnorePattern: "^_" }
|
|
@@ -380,7 +418,8 @@ function javascript(options = {}) {
|
|
|
380
418
|
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
381
419
|
"vars-on-top": "error",
|
|
382
420
|
"wrap-iife": ["error", "any", { functionPrototypeMethods: true }],
|
|
383
|
-
"yoda": ["error", "never"]
|
|
421
|
+
"yoda": ["error", "never"],
|
|
422
|
+
...overrides
|
|
384
423
|
}
|
|
385
424
|
},
|
|
386
425
|
{
|
|
@@ -393,65 +432,106 @@ function javascript(options = {}) {
|
|
|
393
432
|
}
|
|
394
433
|
|
|
395
434
|
// src/configs/jsdoc.ts
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
435
|
+
function jsdoc() {
|
|
436
|
+
return [
|
|
437
|
+
{
|
|
438
|
+
plugins: {
|
|
439
|
+
jsdoc: default5
|
|
440
|
+
},
|
|
441
|
+
rules: {
|
|
442
|
+
"jsdoc/check-access": "warn",
|
|
443
|
+
"jsdoc/check-alignment": "warn",
|
|
444
|
+
"jsdoc/check-param-names": "warn",
|
|
445
|
+
"jsdoc/check-property-names": "warn",
|
|
446
|
+
"jsdoc/check-types": "warn",
|
|
447
|
+
"jsdoc/empty-tags": "warn",
|
|
448
|
+
"jsdoc/implements-on-classes": "warn",
|
|
449
|
+
"jsdoc/multiline-blocks": "warn",
|
|
450
|
+
"jsdoc/no-defaults": "warn",
|
|
451
|
+
"jsdoc/no-multi-asterisks": "warn",
|
|
452
|
+
"jsdoc/no-types": "warn",
|
|
453
|
+
"jsdoc/require-param-name": "warn",
|
|
454
|
+
"jsdoc/require-property": "warn",
|
|
455
|
+
"jsdoc/require-property-description": "warn",
|
|
456
|
+
"jsdoc/require-property-name": "warn",
|
|
457
|
+
"jsdoc/require-returns-check": "warn",
|
|
458
|
+
"jsdoc/require-returns-description": "warn",
|
|
459
|
+
"jsdoc/require-yields-check": "warn",
|
|
460
|
+
"jsdoc/valid-types": "warn"
|
|
461
|
+
}
|
|
415
462
|
}
|
|
416
|
-
|
|
417
|
-
|
|
463
|
+
];
|
|
464
|
+
}
|
|
418
465
|
|
|
419
466
|
// src/configs/jsonc.ts
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
plugins: {
|
|
427
|
-
jsonc: default6
|
|
467
|
+
function jsonc() {
|
|
468
|
+
return [
|
|
469
|
+
{
|
|
470
|
+
plugins: {
|
|
471
|
+
jsonc: default6
|
|
472
|
+
}
|
|
428
473
|
},
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
474
|
+
{
|
|
475
|
+
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|
|
476
|
+
languageOptions: {
|
|
477
|
+
parser: default19
|
|
478
|
+
},
|
|
479
|
+
rules: {
|
|
480
|
+
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
481
|
+
"jsonc/comma-dangle": ["error", "never"],
|
|
482
|
+
"jsonc/comma-style": ["error", "last"],
|
|
483
|
+
"jsonc/indent": ["error", 2],
|
|
484
|
+
"jsonc/key-spacing": ["error", { afterColon: true, beforeColon: false }],
|
|
485
|
+
"jsonc/no-bigint-literals": "error",
|
|
486
|
+
"jsonc/no-binary-expression": "error",
|
|
487
|
+
"jsonc/no-binary-numeric-literals": "error",
|
|
488
|
+
"jsonc/no-dupe-keys": "error",
|
|
489
|
+
"jsonc/no-escape-sequence-in-identifier": "error",
|
|
490
|
+
"jsonc/no-floating-decimal": "error",
|
|
491
|
+
"jsonc/no-hexadecimal-numeric-literals": "error",
|
|
492
|
+
"jsonc/no-infinity": "error",
|
|
493
|
+
"jsonc/no-multi-str": "error",
|
|
494
|
+
"jsonc/no-nan": "error",
|
|
495
|
+
"jsonc/no-number-props": "error",
|
|
496
|
+
"jsonc/no-numeric-separators": "error",
|
|
497
|
+
"jsonc/no-octal": "error",
|
|
498
|
+
"jsonc/no-octal-escape": "error",
|
|
499
|
+
"jsonc/no-octal-numeric-literals": "error",
|
|
500
|
+
"jsonc/no-parenthesized": "error",
|
|
501
|
+
"jsonc/no-plus-sign": "error",
|
|
502
|
+
"jsonc/no-regexp-literals": "error",
|
|
503
|
+
"jsonc/no-sparse-arrays": "error",
|
|
504
|
+
"jsonc/no-template-literals": "error",
|
|
505
|
+
"jsonc/no-undefined-value": "error",
|
|
506
|
+
"jsonc/no-unicode-codepoint-escapes": "error",
|
|
507
|
+
"jsonc/no-useless-escape": "error",
|
|
508
|
+
"jsonc/object-curly-newline": ["error", { consistent: true, multiline: true }],
|
|
509
|
+
"jsonc/object-curly-spacing": ["error", "always"],
|
|
510
|
+
"jsonc/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
|
|
511
|
+
"jsonc/quote-props": "error",
|
|
512
|
+
"jsonc/quotes": "error",
|
|
513
|
+
"jsonc/space-unary-ops": "error",
|
|
514
|
+
"jsonc/valid-json-number": "error",
|
|
515
|
+
"jsonc/vue-custom-block/no-parsing-error": "error"
|
|
516
|
+
}
|
|
440
517
|
}
|
|
441
|
-
|
|
442
|
-
|
|
518
|
+
];
|
|
519
|
+
}
|
|
443
520
|
|
|
444
521
|
// src/configs/markdown.ts
|
|
445
522
|
function markdown(options = {}) {
|
|
446
523
|
const {
|
|
447
|
-
componentExts = []
|
|
524
|
+
componentExts = [],
|
|
525
|
+
overrides = {}
|
|
448
526
|
} = options;
|
|
449
527
|
return [
|
|
450
528
|
{
|
|
451
|
-
files: [GLOB_MARKDOWN],
|
|
452
529
|
plugins: {
|
|
453
530
|
markdown: default7
|
|
454
|
-
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
files: [GLOB_MARKDOWN],
|
|
455
535
|
processor: "markdown/markdown"
|
|
456
536
|
},
|
|
457
537
|
{
|
|
@@ -466,22 +546,17 @@ function markdown(options = {}) {
|
|
|
466
546
|
}
|
|
467
547
|
}
|
|
468
548
|
},
|
|
469
|
-
plugins: {
|
|
470
|
-
ts: default11
|
|
471
|
-
},
|
|
472
549
|
rules: {
|
|
473
|
-
...default7.configs.recommended.overrides[1].rules,
|
|
474
550
|
"antfu/no-cjs-exports": OFF,
|
|
475
551
|
"antfu/no-ts-export-equal": OFF,
|
|
476
|
-
"
|
|
552
|
+
"eol-last": OFF,
|
|
477
553
|
"no-alert": OFF,
|
|
478
554
|
"no-console": OFF,
|
|
479
|
-
"no-restricted-imports": OFF,
|
|
480
555
|
"no-undef": OFF,
|
|
481
556
|
"no-unused-expressions": OFF,
|
|
482
557
|
"no-unused-vars": OFF,
|
|
483
558
|
"node/prefer-global/process": OFF,
|
|
484
|
-
"
|
|
559
|
+
"style/comma-dangle": OFF,
|
|
485
560
|
"ts/consistent-type-imports": OFF,
|
|
486
561
|
"ts/no-namespace": OFF,
|
|
487
562
|
"ts/no-redeclare": OFF,
|
|
@@ -489,386 +564,356 @@ function markdown(options = {}) {
|
|
|
489
564
|
"ts/no-unused-vars": OFF,
|
|
490
565
|
"ts/no-use-before-define": OFF,
|
|
491
566
|
"ts/no-var-requires": OFF,
|
|
567
|
+
"unicode-bom": "off",
|
|
492
568
|
"unused-imports/no-unused-imports": OFF,
|
|
493
|
-
"unused-imports/no-unused-vars": OFF
|
|
569
|
+
"unused-imports/no-unused-vars": OFF,
|
|
570
|
+
...overrides
|
|
494
571
|
}
|
|
495
572
|
}
|
|
496
573
|
];
|
|
497
574
|
}
|
|
498
575
|
|
|
499
576
|
// src/configs/node.ts
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
577
|
+
function node() {
|
|
578
|
+
return [
|
|
579
|
+
{
|
|
580
|
+
plugins: {
|
|
581
|
+
node: default8
|
|
582
|
+
},
|
|
583
|
+
rules: {
|
|
584
|
+
"node/handle-callback-err": ["error", "^(err|error)$"],
|
|
585
|
+
"node/no-deprecated-api": "error",
|
|
586
|
+
"node/no-exports-assign": "error",
|
|
587
|
+
"node/no-new-require": "error",
|
|
588
|
+
"node/no-path-concat": "error",
|
|
589
|
+
"node/prefer-global/buffer": ["error", "never"],
|
|
590
|
+
"node/prefer-global/process": ["error", "never"],
|
|
591
|
+
"node/process-exit-as-throw": "error"
|
|
592
|
+
}
|
|
514
593
|
}
|
|
515
|
-
|
|
516
|
-
|
|
594
|
+
];
|
|
595
|
+
}
|
|
517
596
|
|
|
518
597
|
// src/configs/sort.ts
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
"
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
"
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
598
|
+
function sortPackageJson() {
|
|
599
|
+
return [
|
|
600
|
+
{
|
|
601
|
+
files: ["**/package.json"],
|
|
602
|
+
rules: {
|
|
603
|
+
"jsonc/sort-array-values": [
|
|
604
|
+
"error",
|
|
605
|
+
{
|
|
606
|
+
order: { type: "asc" },
|
|
607
|
+
pathPattern: "^files$"
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
"jsonc/sort-keys": [
|
|
611
|
+
"error",
|
|
612
|
+
{
|
|
613
|
+
order: [
|
|
614
|
+
"publisher",
|
|
615
|
+
"name",
|
|
616
|
+
"displayName",
|
|
617
|
+
"type",
|
|
618
|
+
"version",
|
|
619
|
+
"private",
|
|
620
|
+
"packageManager",
|
|
621
|
+
"description",
|
|
622
|
+
"author",
|
|
623
|
+
"license",
|
|
624
|
+
"funding",
|
|
625
|
+
"homepage",
|
|
626
|
+
"repository",
|
|
627
|
+
"bugs",
|
|
628
|
+
"keywords",
|
|
629
|
+
"categories",
|
|
630
|
+
"sideEffects",
|
|
631
|
+
"exports",
|
|
632
|
+
"main",
|
|
633
|
+
"module",
|
|
634
|
+
"unpkg",
|
|
635
|
+
"jsdelivr",
|
|
636
|
+
"types",
|
|
637
|
+
"typesVersions",
|
|
638
|
+
"bin",
|
|
639
|
+
"icon",
|
|
640
|
+
"files",
|
|
641
|
+
"engines",
|
|
642
|
+
"activationEvents",
|
|
643
|
+
"contributes",
|
|
644
|
+
"scripts",
|
|
645
|
+
"peerDependencies",
|
|
646
|
+
"peerDependenciesMeta",
|
|
647
|
+
"dependencies",
|
|
648
|
+
"optionalDependencies",
|
|
649
|
+
"devDependencies",
|
|
650
|
+
"pnpm",
|
|
651
|
+
"overrides",
|
|
652
|
+
"resolutions",
|
|
653
|
+
"husky",
|
|
654
|
+
"simple-git-hooks",
|
|
655
|
+
"lint-staged",
|
|
656
|
+
"eslintConfig"
|
|
657
|
+
],
|
|
658
|
+
pathPattern: "^$"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
order: { type: "asc" },
|
|
662
|
+
pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
order: { type: "asc" },
|
|
666
|
+
pathPattern: "^resolutions$"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
order: { type: "asc" },
|
|
670
|
+
pathPattern: "^pnpm.overrides$"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
order: [
|
|
674
|
+
"types",
|
|
675
|
+
"import",
|
|
676
|
+
"require",
|
|
677
|
+
"default"
|
|
678
|
+
],
|
|
679
|
+
pathPattern: "^exports.*$"
|
|
680
|
+
}
|
|
681
|
+
]
|
|
682
|
+
}
|
|
602
683
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
"
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
684
|
+
];
|
|
685
|
+
}
|
|
686
|
+
function sortTsconfig() {
|
|
687
|
+
return [
|
|
688
|
+
{
|
|
689
|
+
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
690
|
+
rules: {
|
|
691
|
+
"jsonc/sort-keys": [
|
|
692
|
+
"error",
|
|
693
|
+
{
|
|
694
|
+
order: [
|
|
695
|
+
"extends",
|
|
696
|
+
"compilerOptions",
|
|
697
|
+
"references",
|
|
698
|
+
"files",
|
|
699
|
+
"include",
|
|
700
|
+
"exclude"
|
|
701
|
+
],
|
|
702
|
+
pathPattern: "^$"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
order: [
|
|
706
|
+
/* Projects */
|
|
707
|
+
"incremental",
|
|
708
|
+
"composite",
|
|
709
|
+
"tsBuildInfoFile",
|
|
710
|
+
"disableSourceOfProjectReferenceRedirect",
|
|
711
|
+
"disableSolutionSearching",
|
|
712
|
+
"disableReferencedProjectLoad",
|
|
713
|
+
/* Language and Environment */
|
|
714
|
+
"target",
|
|
715
|
+
"lib",
|
|
716
|
+
"jsx",
|
|
717
|
+
"experimentalDecorators",
|
|
718
|
+
"emitDecoratorMetadata",
|
|
719
|
+
"jsxFactory",
|
|
720
|
+
"jsxFragmentFactory",
|
|
721
|
+
"jsxImportSource",
|
|
722
|
+
"reactNamespace",
|
|
723
|
+
"noLib",
|
|
724
|
+
"useDefineForClassFields",
|
|
725
|
+
"moduleDetection",
|
|
726
|
+
/* Modules */
|
|
727
|
+
"module",
|
|
728
|
+
"rootDir",
|
|
729
|
+
"moduleResolution",
|
|
730
|
+
"baseUrl",
|
|
731
|
+
"paths",
|
|
732
|
+
"rootDirs",
|
|
733
|
+
"typeRoots",
|
|
734
|
+
"types",
|
|
735
|
+
"allowUmdGlobalAccess",
|
|
736
|
+
"moduleSuffixes",
|
|
737
|
+
"allowImportingTsExtensions",
|
|
738
|
+
"resolvePackageJsonExports",
|
|
739
|
+
"resolvePackageJsonImports",
|
|
740
|
+
"customConditions",
|
|
741
|
+
"resolveJsonModule",
|
|
742
|
+
"allowArbitraryExtensions",
|
|
743
|
+
"noResolve",
|
|
744
|
+
/* JavaScript Support */
|
|
745
|
+
"allowJs",
|
|
746
|
+
"checkJs",
|
|
747
|
+
"maxNodeModuleJsDepth",
|
|
748
|
+
/* Emit */
|
|
749
|
+
"declaration",
|
|
750
|
+
"declarationMap",
|
|
751
|
+
"emitDeclarationOnly",
|
|
752
|
+
"sourceMap",
|
|
753
|
+
"inlineSourceMap",
|
|
754
|
+
"outFile",
|
|
755
|
+
"outDir",
|
|
756
|
+
"removeComments",
|
|
757
|
+
"noEmit",
|
|
758
|
+
"importHelpers",
|
|
759
|
+
"importsNotUsedAsValues",
|
|
760
|
+
"downlevelIteration",
|
|
761
|
+
"sourceRoot",
|
|
762
|
+
"mapRoot",
|
|
763
|
+
"inlineSources",
|
|
764
|
+
"emitBOM",
|
|
765
|
+
"newLine",
|
|
766
|
+
"stripInternal",
|
|
767
|
+
"noEmitHelpers",
|
|
768
|
+
"noEmitOnError",
|
|
769
|
+
"preserveConstEnums",
|
|
770
|
+
"declarationDir",
|
|
771
|
+
"preserveValueImports",
|
|
772
|
+
/* Interop Constraints */
|
|
773
|
+
"isolatedModules",
|
|
774
|
+
"verbatimModuleSyntax",
|
|
775
|
+
"allowSyntheticDefaultImports",
|
|
776
|
+
"esModuleInterop",
|
|
777
|
+
"preserveSymlinks",
|
|
778
|
+
"forceConsistentCasingInFileNames",
|
|
779
|
+
/* Type Checking */
|
|
780
|
+
"strict",
|
|
781
|
+
"strictBindCallApply",
|
|
782
|
+
"strictFunctionTypes",
|
|
783
|
+
"strictNullChecks",
|
|
784
|
+
"strictPropertyInitialization",
|
|
785
|
+
"allowUnreachableCode",
|
|
786
|
+
"allowUnusedLabels",
|
|
787
|
+
"alwaysStrict",
|
|
788
|
+
"exactOptionalPropertyTypes",
|
|
789
|
+
"noFallthroughCasesInSwitch",
|
|
790
|
+
"noImplicitAny",
|
|
791
|
+
"noImplicitOverride",
|
|
792
|
+
"noImplicitReturns",
|
|
793
|
+
"noImplicitThis",
|
|
794
|
+
"noPropertyAccessFromIndexSignature",
|
|
795
|
+
"noUncheckedIndexedAccess",
|
|
796
|
+
"noUnusedLocals",
|
|
797
|
+
"noUnusedParameters",
|
|
798
|
+
"useUnknownInCatchVariables",
|
|
799
|
+
/* Completeness */
|
|
800
|
+
"skipDefaultLibCheck",
|
|
801
|
+
"skipLibCheck"
|
|
802
|
+
],
|
|
803
|
+
pathPattern: "^compilerOptions$"
|
|
804
|
+
}
|
|
805
|
+
]
|
|
806
|
+
}
|
|
724
807
|
}
|
|
725
|
-
|
|
726
|
-
|
|
808
|
+
];
|
|
809
|
+
}
|
|
727
810
|
|
|
728
811
|
// src/configs/stylistic.ts
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
]
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
plugins: {
|
|
833
|
-
"style-ts": default10,
|
|
834
|
-
"ts": default11
|
|
835
|
-
},
|
|
836
|
-
rules: {
|
|
837
|
-
...stylisticJsToTS(javascriptStylistic[0].rules),
|
|
838
|
-
"comma-dangle": OFF,
|
|
839
|
-
"quotes": OFF,
|
|
840
|
-
"semi": OFF,
|
|
841
|
-
"style-ts/member-delimiter-style": ["error", { multiline: { delimiter: "none" } }],
|
|
842
|
-
"style-ts/type-annotation-spacing": ["error", {}],
|
|
843
|
-
"ts/comma-dangle": ["error", "always-multiline"],
|
|
844
|
-
"ts/quotes": ["error", "single"],
|
|
845
|
-
"ts/semi": ["error", "never"]
|
|
812
|
+
function stylistic(options = {}) {
|
|
813
|
+
const {
|
|
814
|
+
overrides = {}
|
|
815
|
+
} = options;
|
|
816
|
+
return [
|
|
817
|
+
{
|
|
818
|
+
plugins: {
|
|
819
|
+
antfu: default2,
|
|
820
|
+
style: default9
|
|
821
|
+
},
|
|
822
|
+
rules: {
|
|
823
|
+
"antfu/consistent-list-newline": "error",
|
|
824
|
+
"antfu/if-newline": "error",
|
|
825
|
+
"curly": ["error", "multi-or-nest", "consistent"],
|
|
826
|
+
"style/array-bracket-spacing": ["error", "never"],
|
|
827
|
+
"style/arrow-spacing": ["error", { after: true, before: true }],
|
|
828
|
+
"style/block-spacing": ["error", "always"],
|
|
829
|
+
"style/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
|
|
830
|
+
"style/comma-dangle": ["error", "always-multiline"],
|
|
831
|
+
"style/comma-spacing": ["error", { after: true, before: false }],
|
|
832
|
+
"style/comma-style": ["error", "last"],
|
|
833
|
+
"style/computed-property-spacing": ["error", "never", { enforceForClassMembers: true }],
|
|
834
|
+
"style/dot-location": ["error", "property"],
|
|
835
|
+
"style/indent": ["error", 4, {
|
|
836
|
+
ArrayExpression: 1,
|
|
837
|
+
CallExpression: { arguments: 1 },
|
|
838
|
+
FunctionDeclaration: { body: 1, parameters: 1 },
|
|
839
|
+
FunctionExpression: { body: 1, parameters: 1 },
|
|
840
|
+
ImportDeclaration: 1,
|
|
841
|
+
MemberExpression: 1,
|
|
842
|
+
ObjectExpression: 1,
|
|
843
|
+
SwitchCase: 1,
|
|
844
|
+
VariableDeclarator: 1,
|
|
845
|
+
flatTernaryExpressions: false,
|
|
846
|
+
ignoreComments: false,
|
|
847
|
+
ignoredNodes: [
|
|
848
|
+
"TemplateLiteral *",
|
|
849
|
+
"JSXElement",
|
|
850
|
+
"JSXElement > *",
|
|
851
|
+
"JSXAttribute",
|
|
852
|
+
"JSXIdentifier",
|
|
853
|
+
"JSXNamespacedName",
|
|
854
|
+
"JSXMemberExpression",
|
|
855
|
+
"JSXSpreadAttribute",
|
|
856
|
+
"JSXExpressionContainer",
|
|
857
|
+
"JSXOpeningElement",
|
|
858
|
+
"JSXClosingElement",
|
|
859
|
+
"JSXFragment",
|
|
860
|
+
"JSXOpeningFragment",
|
|
861
|
+
"JSXClosingFragment",
|
|
862
|
+
"JSXText",
|
|
863
|
+
"JSXEmptyExpression",
|
|
864
|
+
"JSXSpreadChild",
|
|
865
|
+
"TSTypeParameterInstantiation",
|
|
866
|
+
"FunctionExpression > .params[decorators.length > 0]",
|
|
867
|
+
"FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
|
|
868
|
+
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
|
|
869
|
+
],
|
|
870
|
+
offsetTernaryExpressions: true,
|
|
871
|
+
outerIIFEBody: 1
|
|
872
|
+
}],
|
|
873
|
+
"style/key-spacing": ["error", { afterColon: true, beforeColon: false }],
|
|
874
|
+
"style/keyword-spacing": ["error", { after: true, before: true }],
|
|
875
|
+
"style/lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
876
|
+
"style/member-delimiter-style": ["error", { multiline: { delimiter: "none" } }],
|
|
877
|
+
"style/multiline-ternary": ["error", "always-multiline"],
|
|
878
|
+
"style/no-mixed-spaces-and-tabs": "error",
|
|
879
|
+
"style/no-multi-spaces": "error",
|
|
880
|
+
"style/no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
881
|
+
"style/no-tabs": "error",
|
|
882
|
+
"style/no-trailing-spaces": "error",
|
|
883
|
+
"style/no-whitespace-before-property": "error",
|
|
884
|
+
"style/object-curly-newline": ["error", { consistent: true, multiline: true }],
|
|
885
|
+
"style/object-curly-spacing": ["error", "always"],
|
|
886
|
+
"style/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
|
|
887
|
+
"style/operator-linebreak": ["error", "before"],
|
|
888
|
+
"style/padded-blocks": ["error", { blocks: "never", classes: "never", switches: "never" }],
|
|
889
|
+
"style/quotes": ["error", "single"],
|
|
890
|
+
"style/rest-spread-spacing": ["error", "never"],
|
|
891
|
+
"style/semi": ["error", "never"],
|
|
892
|
+
"style/semi-spacing": ["error", { after: true, before: false }],
|
|
893
|
+
"style/space-before-blocks": ["error", "always"],
|
|
894
|
+
"style/space-before-function-paren": ["error", { anonymous: "always", asyncArrow: "always", named: "never" }],
|
|
895
|
+
"style/space-in-parens": ["error", "never"],
|
|
896
|
+
"style/space-infix-ops": "error",
|
|
897
|
+
"style/space-unary-ops": ["error", { nonwords: false, words: true }],
|
|
898
|
+
"style/spaced-comment": ["error", "always", {
|
|
899
|
+
block: {
|
|
900
|
+
balanced: true,
|
|
901
|
+
exceptions: ["*"],
|
|
902
|
+
markers: ["!"]
|
|
903
|
+
},
|
|
904
|
+
line: {
|
|
905
|
+
exceptions: ["/", "#"],
|
|
906
|
+
markers: ["/"]
|
|
907
|
+
}
|
|
908
|
+
}],
|
|
909
|
+
"style/template-curly-spacing": "error",
|
|
910
|
+
"style/template-tag-spacing": ["error", "never"],
|
|
911
|
+
"style/type-annotation-spacing": ["error", {}],
|
|
912
|
+
"style/yield-star-spacing": ["error", "both"],
|
|
913
|
+
...overrides
|
|
914
|
+
}
|
|
846
915
|
}
|
|
847
|
-
|
|
848
|
-
];
|
|
849
|
-
function stylisticJsToTS(input) {
|
|
850
|
-
return {
|
|
851
|
-
// turn off all stylistic rules from style
|
|
852
|
-
...Object.fromEntries(
|
|
853
|
-
Object.entries(input).map(([key]) => {
|
|
854
|
-
if (!key.startsWith("style/"))
|
|
855
|
-
return null;
|
|
856
|
-
const basename = key.replace("style/", "");
|
|
857
|
-
if (tsPackage.rules.find((i) => i.name === basename))
|
|
858
|
-
return [key, OFF];
|
|
859
|
-
return null;
|
|
860
|
-
}).filter(Boolean)
|
|
861
|
-
),
|
|
862
|
-
// rename all stylistic rules from style to style/ts
|
|
863
|
-
...Object.fromEntries(
|
|
864
|
-
Object.entries(input).map(([key, value]) => {
|
|
865
|
-
if (!key.startsWith("style/"))
|
|
866
|
-
return null;
|
|
867
|
-
const basename = key.replace("style/", "");
|
|
868
|
-
return tsPackage.rules.find((i) => i.name === basename) ? [`style-ts/${basename}`, value] : null;
|
|
869
|
-
}).filter(Boolean)
|
|
870
|
-
)
|
|
871
|
-
};
|
|
916
|
+
];
|
|
872
917
|
}
|
|
873
918
|
|
|
874
919
|
// src/configs/typescript.ts
|
|
@@ -887,13 +932,46 @@ function renameRules(rules, from, to) {
|
|
|
887
932
|
})
|
|
888
933
|
);
|
|
889
934
|
}
|
|
935
|
+
var rulesOn = /* @__PURE__ */ new Set();
|
|
936
|
+
var rulesOff = /* @__PURE__ */ new Set();
|
|
937
|
+
function recordRulesStateConfigs(configs) {
|
|
938
|
+
for (const config of configs)
|
|
939
|
+
recordRulesState(config.rules ?? {});
|
|
940
|
+
return configs;
|
|
941
|
+
}
|
|
942
|
+
function recordRulesState(rules) {
|
|
943
|
+
for (const [key, value] of Object.entries(rules ?? {})) {
|
|
944
|
+
const firstValue = Array.isArray(value) ? value[0] : value;
|
|
945
|
+
if (firstValue == null)
|
|
946
|
+
continue;
|
|
947
|
+
if (firstValue === "off" || firstValue === 0)
|
|
948
|
+
rulesOff.add(key);
|
|
949
|
+
else
|
|
950
|
+
rulesOn.add(key);
|
|
951
|
+
}
|
|
952
|
+
return rules;
|
|
953
|
+
}
|
|
954
|
+
function warnUnnecessaryOffRules() {
|
|
955
|
+
const unnecessaryOffRules = [...rulesOff].filter((key) => !rulesOn.has(key));
|
|
956
|
+
for (const off of unnecessaryOffRules)
|
|
957
|
+
console.warn(`[eslint] rule \`${off}\` is never turned on, you can remove the rule from your config`);
|
|
958
|
+
}
|
|
890
959
|
|
|
891
960
|
// src/configs/typescript.ts
|
|
892
961
|
function typescript(options) {
|
|
893
962
|
const {
|
|
894
|
-
componentExts = []
|
|
963
|
+
componentExts = [],
|
|
964
|
+
overrides = {}
|
|
895
965
|
} = options ?? {};
|
|
896
966
|
return [
|
|
967
|
+
{
|
|
968
|
+
// Install the plugins without globs, so they can be configured separately.
|
|
969
|
+
plugins: {
|
|
970
|
+
antfu: default2,
|
|
971
|
+
import: default4,
|
|
972
|
+
ts: default10
|
|
973
|
+
}
|
|
974
|
+
},
|
|
897
975
|
{
|
|
898
976
|
files: [
|
|
899
977
|
GLOB_TS,
|
|
@@ -901,24 +979,19 @@ function typescript(options) {
|
|
|
901
979
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
902
980
|
],
|
|
903
981
|
languageOptions: {
|
|
904
|
-
parser:
|
|
982
|
+
parser: default16,
|
|
905
983
|
parserOptions: {
|
|
906
984
|
sourceType: "module"
|
|
907
985
|
}
|
|
908
986
|
},
|
|
909
|
-
plugins: {
|
|
910
|
-
antfu: default2,
|
|
911
|
-
import: default4,
|
|
912
|
-
ts: default11
|
|
913
|
-
},
|
|
914
987
|
rules: {
|
|
915
988
|
...renameRules(
|
|
916
|
-
|
|
989
|
+
default10.configs["eslint-recommended"].overrides[0].rules,
|
|
917
990
|
"@typescript-eslint/",
|
|
918
991
|
"ts/"
|
|
919
992
|
),
|
|
920
993
|
...renameRules(
|
|
921
|
-
|
|
994
|
+
default10.configs.strict.rules,
|
|
922
995
|
"@typescript-eslint/",
|
|
923
996
|
"ts/"
|
|
924
997
|
),
|
|
@@ -935,18 +1008,10 @@ function typescript(options) {
|
|
|
935
1008
|
"no-use-before-define": OFF,
|
|
936
1009
|
"no-useless-constructor": OFF,
|
|
937
1010
|
"ts/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
|
|
938
|
-
"ts/ban-ts-ignore": OFF,
|
|
939
|
-
"ts/consistent-indexed-object-style": OFF,
|
|
940
1011
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
941
1012
|
"ts/consistent-type-imports": ["error", { disallowTypeAnnotations: false, prefer: "type-imports" }],
|
|
942
|
-
"ts/explicit-function-return-type": OFF,
|
|
943
|
-
"ts/explicit-member-accessibility": OFF,
|
|
944
|
-
"ts/explicit-module-boundary-types": OFF,
|
|
945
|
-
"ts/naming-convention": OFF,
|
|
946
1013
|
"ts/no-dupe-class-members": "error",
|
|
947
1014
|
"ts/no-dynamic-delete": OFF,
|
|
948
|
-
"ts/no-empty-function": OFF,
|
|
949
|
-
"ts/no-empty-interface": OFF,
|
|
950
1015
|
"ts/no-explicit-any": OFF,
|
|
951
1016
|
"ts/no-extra-parens": ["error", "functions"],
|
|
952
1017
|
"ts/no-invalid-this": "error",
|
|
@@ -957,10 +1022,10 @@ function typescript(options) {
|
|
|
957
1022
|
"ts/no-require-imports": "error",
|
|
958
1023
|
"ts/no-unused-vars": OFF,
|
|
959
1024
|
"ts/no-use-before-define": ["error", { classes: false, functions: false, variables: true }],
|
|
960
|
-
"ts/parameter-properties": OFF,
|
|
961
1025
|
"ts/prefer-ts-expect-error": "error",
|
|
962
1026
|
"ts/triple-slash-reference": OFF,
|
|
963
|
-
"ts/unified-signatures": OFF
|
|
1027
|
+
"ts/unified-signatures": OFF,
|
|
1028
|
+
...overrides
|
|
964
1029
|
}
|
|
965
1030
|
},
|
|
966
1031
|
{
|
|
@@ -986,30 +1051,29 @@ function typescript(options) {
|
|
|
986
1051
|
}
|
|
987
1052
|
];
|
|
988
1053
|
}
|
|
989
|
-
function
|
|
1054
|
+
function typescriptWithTypes(options) {
|
|
990
1055
|
const {
|
|
991
1056
|
componentExts = [],
|
|
992
1057
|
tsconfigPath,
|
|
993
|
-
tsconfigRootDir = process.cwd()
|
|
1058
|
+
tsconfigRootDir = process.cwd(),
|
|
1059
|
+
overrides = {}
|
|
994
1060
|
} = options;
|
|
995
1061
|
return [
|
|
996
1062
|
{
|
|
997
1063
|
files: [
|
|
998
1064
|
GLOB_TS,
|
|
999
1065
|
GLOB_TSX,
|
|
1000
|
-
...componentExts.map((ext) => `**/*.${ext}`)
|
|
1066
|
+
...componentExts.map((ext) => `**/*.${ext}`),
|
|
1067
|
+
"!**/*.md/*.*"
|
|
1001
1068
|
],
|
|
1002
1069
|
ignores: ["**/*.md/*.*"],
|
|
1003
1070
|
languageOptions: {
|
|
1004
|
-
parser:
|
|
1071
|
+
parser: default16,
|
|
1005
1072
|
parserOptions: {
|
|
1006
1073
|
project: [tsconfigPath],
|
|
1007
1074
|
tsconfigRootDir
|
|
1008
1075
|
}
|
|
1009
1076
|
},
|
|
1010
|
-
plugins: {
|
|
1011
|
-
ts: default11
|
|
1012
|
-
},
|
|
1013
1077
|
rules: {
|
|
1014
1078
|
"dot-notation": OFF,
|
|
1015
1079
|
"no-implied-eval": OFF,
|
|
@@ -1029,50 +1093,53 @@ function typescriptWithLanguageServer(options) {
|
|
|
1029
1093
|
"ts/no-unsafe-return": "error",
|
|
1030
1094
|
"ts/restrict-plus-operands": "error",
|
|
1031
1095
|
"ts/restrict-template-expressions": "error",
|
|
1032
|
-
"ts/unbound-method": "error"
|
|
1096
|
+
"ts/unbound-method": "error",
|
|
1097
|
+
...overrides
|
|
1033
1098
|
}
|
|
1034
1099
|
}
|
|
1035
1100
|
];
|
|
1036
1101
|
}
|
|
1037
1102
|
|
|
1038
1103
|
// src/configs/unicorn.ts
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1104
|
+
function unicorn() {
|
|
1105
|
+
return [
|
|
1106
|
+
{
|
|
1107
|
+
plugins: {
|
|
1108
|
+
unicorn: default11
|
|
1109
|
+
},
|
|
1110
|
+
rules: {
|
|
1111
|
+
// Pass error message when throwing errors
|
|
1112
|
+
"unicorn/error-message": "error",
|
|
1113
|
+
// Uppercase regex escapes
|
|
1114
|
+
"unicorn/escape-case": "error",
|
|
1115
|
+
// Array.isArray instead of instanceof
|
|
1116
|
+
"unicorn/no-instanceof-array": "error",
|
|
1117
|
+
// Ban `new Array` as `Array` constructor's params are ambiguous
|
|
1118
|
+
"unicorn/no-new-array": "error",
|
|
1119
|
+
// Prevent deprecated `new Buffer()`
|
|
1120
|
+
"unicorn/no-new-buffer": "error",
|
|
1121
|
+
// Keep regex literals safe!
|
|
1122
|
+
"unicorn/no-unsafe-regex": "error",
|
|
1123
|
+
// Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error')
|
|
1124
|
+
"unicorn/number-literal-case": "error",
|
|
1125
|
+
// includes over indexOf when checking for existence
|
|
1126
|
+
"unicorn/prefer-includes": "error",
|
|
1127
|
+
// Prefer using the node: protocol
|
|
1128
|
+
"unicorn/prefer-node-protocol": "error",
|
|
1129
|
+
// Prefer using number properties like `Number.isNaN` rather than `isNaN`
|
|
1130
|
+
"unicorn/prefer-number-properties": "error",
|
|
1131
|
+
// String methods startsWith/endsWith instead of more complicated stuff
|
|
1132
|
+
"unicorn/prefer-string-starts-ends-with": "error",
|
|
1133
|
+
// textContent instead of innerText
|
|
1134
|
+
"unicorn/prefer-text-content": "error",
|
|
1135
|
+
// Enforce throwing type error when throwing error while checking typeof
|
|
1136
|
+
"unicorn/prefer-type-error": "error",
|
|
1137
|
+
// Use new when throwing error
|
|
1138
|
+
"unicorn/throw-new-error": "error"
|
|
1139
|
+
}
|
|
1073
1140
|
}
|
|
1074
|
-
|
|
1075
|
-
|
|
1141
|
+
];
|
|
1142
|
+
}
|
|
1076
1143
|
|
|
1077
1144
|
// src/configs/vue.ts
|
|
1078
1145
|
var pkg = getPackageInfoSync("vue");
|
|
@@ -1080,34 +1147,39 @@ var vueVersion = pkg && pkg.version;
|
|
|
1080
1147
|
vueVersion = vueVersion && vueVersion[0];
|
|
1081
1148
|
vueVersion = Number.isNaN(vueVersion) ? "3" : vueVersion;
|
|
1082
1149
|
function vue(options = {}) {
|
|
1150
|
+
const {
|
|
1151
|
+
overrides = {}
|
|
1152
|
+
} = options;
|
|
1083
1153
|
return [
|
|
1154
|
+
{
|
|
1155
|
+
plugins: {
|
|
1156
|
+
vue: default13
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1084
1159
|
{
|
|
1085
1160
|
files: [GLOB_VUE],
|
|
1086
1161
|
languageOptions: {
|
|
1087
|
-
parser:
|
|
1162
|
+
parser: default17,
|
|
1088
1163
|
parserOptions: {
|
|
1089
1164
|
ecmaFeatures: {
|
|
1090
1165
|
jsx: true
|
|
1091
1166
|
},
|
|
1092
1167
|
extraFileExtensions: [".vue"],
|
|
1093
|
-
parser: options.typescript ?
|
|
1168
|
+
parser: options.typescript ? default16 : null,
|
|
1094
1169
|
sourceType: "module"
|
|
1095
1170
|
}
|
|
1096
1171
|
},
|
|
1097
|
-
|
|
1098
|
-
vue: default14
|
|
1099
|
-
},
|
|
1100
|
-
processor: default14.processors[".vue"],
|
|
1172
|
+
processor: default13.processors[".vue"],
|
|
1101
1173
|
rules: {
|
|
1102
|
-
...
|
|
1174
|
+
...default13.configs.base.rules,
|
|
1103
1175
|
...vueVersion === "3" ? {
|
|
1104
|
-
...
|
|
1105
|
-
...
|
|
1106
|
-
...
|
|
1176
|
+
...default13.configs["vue3-essential"].rules,
|
|
1177
|
+
...default13.configs["vue3-strongly-recommended"].rules,
|
|
1178
|
+
...default13.configs["vue3-recommended"].rules
|
|
1107
1179
|
} : {
|
|
1108
|
-
...
|
|
1109
|
-
...
|
|
1110
|
-
...
|
|
1180
|
+
...default13.configs.essential.rules,
|
|
1181
|
+
...default13.configs["strongly-recommended"].rules,
|
|
1182
|
+
...default13.configs.recommended.rules
|
|
1111
1183
|
},
|
|
1112
1184
|
"node/prefer-global/process": OFF,
|
|
1113
1185
|
"vue/array-bracket-spacing": ["error", "never"],
|
|
@@ -1198,42 +1270,72 @@ function vue(options = {}) {
|
|
|
1198
1270
|
"vue/space-in-parens": ["error", "never"],
|
|
1199
1271
|
"vue/space-infix-ops": "error",
|
|
1200
1272
|
"vue/space-unary-ops": ["error", { nonwords: false, words: true }],
|
|
1201
|
-
"vue/template-curly-spacing": "error"
|
|
1273
|
+
"vue/template-curly-spacing": "error",
|
|
1274
|
+
...overrides
|
|
1202
1275
|
}
|
|
1203
1276
|
}
|
|
1204
1277
|
];
|
|
1205
1278
|
}
|
|
1206
1279
|
|
|
1207
|
-
// src/configs/
|
|
1208
|
-
|
|
1209
|
-
{
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1280
|
+
// src/configs/yaml.ts
|
|
1281
|
+
function yaml(options = {}) {
|
|
1282
|
+
const {
|
|
1283
|
+
overrides = {}
|
|
1284
|
+
} = options;
|
|
1285
|
+
return [
|
|
1286
|
+
{
|
|
1287
|
+
plugins: {
|
|
1288
|
+
yaml: default14
|
|
1289
|
+
}
|
|
1216
1290
|
},
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1291
|
+
{
|
|
1292
|
+
files: [GLOB_YAML],
|
|
1293
|
+
languageOptions: {
|
|
1294
|
+
parser: default18
|
|
1295
|
+
},
|
|
1296
|
+
rules: {
|
|
1297
|
+
"style/spaced-comment": OFF,
|
|
1298
|
+
"yaml/block-mapping": "error",
|
|
1299
|
+
"yaml/block-mapping-question-indicator-newline": "error",
|
|
1300
|
+
"yaml/block-sequence": "error",
|
|
1301
|
+
"yaml/block-sequence-hyphen-indicator-newline": "error",
|
|
1302
|
+
"yaml/flow-mapping-curly-newline": "error",
|
|
1303
|
+
"yaml/flow-mapping-curly-spacing": "error",
|
|
1304
|
+
"yaml/flow-sequence-bracket-newline": "error",
|
|
1305
|
+
"yaml/flow-sequence-bracket-spacing": "error",
|
|
1306
|
+
"yaml/indent": ["error", 2],
|
|
1307
|
+
"yaml/key-spacing": "error",
|
|
1308
|
+
"yaml/no-empty-key": "error",
|
|
1309
|
+
"yaml/no-empty-sequence-entry": "error",
|
|
1310
|
+
"yaml/no-irregular-whitespace": "error",
|
|
1311
|
+
"yaml/no-tab-indent": "error",
|
|
1312
|
+
"yaml/plain-scalar": "error",
|
|
1313
|
+
"yaml/quotes": ["error", { avoidEscape: false, prefer: "single" }],
|
|
1314
|
+
"yaml/spaced-comment": "error",
|
|
1315
|
+
"yaml/vue-custom-block/no-parsing-error": "error",
|
|
1316
|
+
...overrides
|
|
1317
|
+
}
|
|
1223
1318
|
}
|
|
1224
|
-
|
|
1225
|
-
|
|
1319
|
+
];
|
|
1320
|
+
}
|
|
1226
1321
|
|
|
1227
1322
|
// src/configs/test.ts
|
|
1228
1323
|
function test(options = {}) {
|
|
1324
|
+
const {
|
|
1325
|
+
isInEditor = false,
|
|
1326
|
+
overrides = {}
|
|
1327
|
+
} = options;
|
|
1229
1328
|
return [
|
|
1230
1329
|
{
|
|
1231
|
-
files: GLOB_TESTS,
|
|
1232
1330
|
plugins: {
|
|
1233
|
-
"no-only-tests":
|
|
1234
|
-
}
|
|
1331
|
+
"no-only-tests": default15
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
files: GLOB_TESTS,
|
|
1235
1336
|
rules: {
|
|
1236
|
-
"no-only-tests/no-only-tests":
|
|
1337
|
+
"no-only-tests/no-only-tests": isInEditor ? OFF : "error",
|
|
1338
|
+
...overrides
|
|
1237
1339
|
}
|
|
1238
1340
|
}
|
|
1239
1341
|
];
|
|
@@ -1250,12 +1352,21 @@ var flatConfigProps = [
|
|
|
1250
1352
|
"rules",
|
|
1251
1353
|
"settings"
|
|
1252
1354
|
];
|
|
1355
|
+
var VuePackages = [
|
|
1356
|
+
"vue",
|
|
1357
|
+
"nuxt",
|
|
1358
|
+
"vitepress",
|
|
1359
|
+
"@slidev/cli"
|
|
1360
|
+
];
|
|
1253
1361
|
function lincy(options = {}, ...userConfigs) {
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1362
|
+
const {
|
|
1363
|
+
isInEditor = !!((process2.env.VSCODE_PID || process2.env.JETBRAINS_IDE) && !process2.env.CI),
|
|
1364
|
+
vue: enableVue = VuePackages.some((i) => isPackageExists(i)),
|
|
1365
|
+
typescript: enableTypeScript = isPackageExists("typescript"),
|
|
1366
|
+
stylistic: enableStylistic = true,
|
|
1367
|
+
gitignore: enableGitignore = true,
|
|
1368
|
+
overrides = {}
|
|
1369
|
+
} = options;
|
|
1259
1370
|
const configs = [];
|
|
1260
1371
|
if (enableGitignore) {
|
|
1261
1372
|
if (typeof enableGitignore !== "boolean") {
|
|
@@ -1266,45 +1377,64 @@ function lincy(options = {}, ...userConfigs) {
|
|
|
1266
1377
|
}
|
|
1267
1378
|
}
|
|
1268
1379
|
configs.push(
|
|
1269
|
-
ignores
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1380
|
+
ignores({
|
|
1381
|
+
ignores: overrides.ignores
|
|
1382
|
+
}),
|
|
1383
|
+
javascript({
|
|
1384
|
+
isInEditor,
|
|
1385
|
+
overrides: overrides.javascript
|
|
1386
|
+
}),
|
|
1387
|
+
comments(),
|
|
1388
|
+
node(),
|
|
1389
|
+
jsdoc(),
|
|
1390
|
+
imports(),
|
|
1391
|
+
unicorn()
|
|
1276
1392
|
);
|
|
1277
1393
|
const componentExts = [];
|
|
1278
1394
|
if (enableVue)
|
|
1279
1395
|
componentExts.push("vue");
|
|
1280
|
-
if (enableStylistic)
|
|
1281
|
-
configs.push(javascriptStylistic);
|
|
1282
1396
|
if (enableTypeScript) {
|
|
1283
|
-
configs.push(typescript({
|
|
1397
|
+
configs.push(typescript({
|
|
1398
|
+
componentExts,
|
|
1399
|
+
overrides: overrides.typescript
|
|
1400
|
+
}));
|
|
1284
1401
|
if (typeof enableTypeScript !== "boolean") {
|
|
1285
|
-
configs.push(
|
|
1402
|
+
configs.push(typescriptWithTypes({
|
|
1286
1403
|
...enableTypeScript,
|
|
1287
|
-
componentExts
|
|
1404
|
+
componentExts,
|
|
1405
|
+
overrides: overrides.typescriptWithTypes
|
|
1288
1406
|
}));
|
|
1289
1407
|
}
|
|
1290
|
-
if (enableStylistic)
|
|
1291
|
-
configs.push(typescriptStylistic);
|
|
1292
1408
|
}
|
|
1293
|
-
if (
|
|
1294
|
-
configs.push(
|
|
1295
|
-
if (
|
|
1296
|
-
configs.push(
|
|
1409
|
+
if (enableStylistic)
|
|
1410
|
+
configs.push(stylistic());
|
|
1411
|
+
if (options.test ?? true) {
|
|
1412
|
+
configs.push(test({
|
|
1413
|
+
isInEditor,
|
|
1414
|
+
overrides: overrides.test
|
|
1415
|
+
}));
|
|
1416
|
+
}
|
|
1417
|
+
if (enableVue) {
|
|
1418
|
+
configs.push(vue({
|
|
1419
|
+
overrides: overrides.vue,
|
|
1420
|
+
typescript: !!enableTypeScript
|
|
1421
|
+
}));
|
|
1422
|
+
}
|
|
1297
1423
|
if (options.jsonc ?? true) {
|
|
1298
1424
|
configs.push(
|
|
1299
|
-
jsonc,
|
|
1300
|
-
sortPackageJson,
|
|
1301
|
-
sortTsconfig
|
|
1425
|
+
jsonc(),
|
|
1426
|
+
sortPackageJson(),
|
|
1427
|
+
sortTsconfig()
|
|
1302
1428
|
);
|
|
1303
1429
|
}
|
|
1304
1430
|
if (options.yaml ?? true)
|
|
1305
|
-
configs.push(
|
|
1306
|
-
if (options.markdown ?? true)
|
|
1307
|
-
configs.push(markdown({
|
|
1431
|
+
configs.push(yaml());
|
|
1432
|
+
if (options.markdown ?? true) {
|
|
1433
|
+
configs.push(markdown({
|
|
1434
|
+
componentExts,
|
|
1435
|
+
overrides: overrides.markdown
|
|
1436
|
+
}));
|
|
1437
|
+
}
|
|
1308
1438
|
const fusedConfig = flatConfigProps.reduce((acc, key) => {
|
|
1309
1439
|
if (key in options)
|
|
1310
1440
|
acc[key] = options[key];
|
|
@@ -1312,54 +1442,77 @@ function lincy(options = {}, ...userConfigs) {
|
|
|
1312
1442
|
}, {});
|
|
1313
1443
|
if (Object.keys(fusedConfig).length)
|
|
1314
1444
|
configs.push([fusedConfig]);
|
|
1315
|
-
|
|
1445
|
+
const merged = combine(
|
|
1316
1446
|
...configs,
|
|
1317
1447
|
...userConfigs
|
|
1318
1448
|
);
|
|
1449
|
+
return merged;
|
|
1319
1450
|
}
|
|
1320
1451
|
|
|
1321
1452
|
// src/index.ts
|
|
1322
1453
|
var src_default = lincy;
|
|
1323
1454
|
export {
|
|
1455
|
+
GLOB_ALL_SRC,
|
|
1456
|
+
GLOB_CSS,
|
|
1457
|
+
GLOB_EXCLUDE,
|
|
1458
|
+
GLOB_HTML,
|
|
1459
|
+
GLOB_JS,
|
|
1460
|
+
GLOB_JSON,
|
|
1461
|
+
GLOB_JSON5,
|
|
1462
|
+
GLOB_JSONC,
|
|
1463
|
+
GLOB_JSX,
|
|
1464
|
+
GLOB_LESS,
|
|
1465
|
+
GLOB_MARKDOWN,
|
|
1466
|
+
GLOB_MARKDOWN_CODE,
|
|
1467
|
+
GLOB_SCSS,
|
|
1468
|
+
GLOB_SRC,
|
|
1469
|
+
GLOB_SRC_EXT,
|
|
1470
|
+
GLOB_STYLE,
|
|
1471
|
+
GLOB_TESTS,
|
|
1472
|
+
GLOB_TS,
|
|
1473
|
+
GLOB_TSX,
|
|
1474
|
+
GLOB_VUE,
|
|
1475
|
+
GLOB_YAML,
|
|
1324
1476
|
combine,
|
|
1325
1477
|
comments,
|
|
1326
1478
|
src_default as default,
|
|
1327
1479
|
ignores,
|
|
1328
1480
|
imports,
|
|
1329
1481
|
javascript,
|
|
1330
|
-
javascriptStylistic,
|
|
1331
1482
|
jsdoc,
|
|
1332
1483
|
jsonc,
|
|
1333
1484
|
lincy,
|
|
1334
1485
|
markdown,
|
|
1335
1486
|
node,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1487
|
+
default19 as parserJsonc,
|
|
1488
|
+
default16 as parserTs,
|
|
1489
|
+
default17 as parserVue,
|
|
1490
|
+
default18 as parserYaml,
|
|
1340
1491
|
default2 as pluginAntfu,
|
|
1341
1492
|
default3 as pluginComments,
|
|
1342
1493
|
default4 as pluginImport,
|
|
1343
1494
|
default5 as pluginJsdoc,
|
|
1344
1495
|
default6 as pluginJsonc,
|
|
1345
1496
|
default7 as pluginMarkdown,
|
|
1346
|
-
|
|
1497
|
+
default15 as pluginNoOnlyTests,
|
|
1347
1498
|
default8 as pluginNode,
|
|
1348
|
-
default9 as
|
|
1349
|
-
default10 as
|
|
1350
|
-
default11 as
|
|
1351
|
-
default12 as
|
|
1352
|
-
default13 as
|
|
1353
|
-
default14 as
|
|
1354
|
-
|
|
1499
|
+
default9 as pluginStylistic,
|
|
1500
|
+
default10 as pluginTs,
|
|
1501
|
+
default11 as pluginUnicorn,
|
|
1502
|
+
default12 as pluginUnusedImports,
|
|
1503
|
+
default13 as pluginVue,
|
|
1504
|
+
default14 as pluginYaml,
|
|
1505
|
+
recordRulesState,
|
|
1506
|
+
recordRulesStateConfigs,
|
|
1355
1507
|
renameRules,
|
|
1356
1508
|
sortPackageJson,
|
|
1357
1509
|
sortTsconfig,
|
|
1510
|
+
stylistic,
|
|
1358
1511
|
test,
|
|
1359
1512
|
typescript,
|
|
1360
|
-
|
|
1361
|
-
typescriptWithLanguageServer,
|
|
1513
|
+
typescriptWithTypes,
|
|
1362
1514
|
unicorn,
|
|
1363
1515
|
vue,
|
|
1364
|
-
|
|
1516
|
+
warnUnnecessaryOffRules,
|
|
1517
|
+
yaml
|
|
1365
1518
|
};
|