@coderwyd/eslint-config 1.0.9 → 1.1.0-beta.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/dist/index.js ADDED
@@ -0,0 +1,1316 @@
1
+ // src/factory.ts
2
+ import process3 from "process";
3
+ import { isPackageExists } from "local-pkg";
4
+
5
+ // src/flags.ts
6
+ var OFF = 0;
7
+
8
+ // src/plugins.ts
9
+ import { default as default2 } from "eslint-plugin-antfu";
10
+ import { default as default3 } from "eslint-plugin-eslint-comments";
11
+ import { default as default4 } from "eslint-plugin-i";
12
+ import { default as default5 } from "eslint-plugin-jsdoc";
13
+ import { default as default6 } from "eslint-plugin-jsonc";
14
+ import { default as default7 } from "eslint-plugin-markdown";
15
+ import { default as default8 } from "eslint-plugin-n";
16
+ import { default as default9 } from "@stylistic/eslint-plugin-js";
17
+ import { default as default10 } from "@stylistic/eslint-plugin-ts";
18
+ import { default as default11 } from "@typescript-eslint/eslint-plugin";
19
+ import { default as default12 } from "eslint-plugin-unicorn";
20
+ import { default as default13 } from "eslint-plugin-unused-imports";
21
+ import { default as default14 } from "eslint-plugin-vue";
22
+ import { default as default15 } from "eslint-plugin-yml";
23
+ import { default as default16 } from "eslint-plugin-no-only-tests";
24
+ import { default as default17 } from "eslint-plugin-react";
25
+ import { default as default18 } from "eslint-plugin-react-hooks";
26
+ import { default as default19 } from "@typescript-eslint/parser";
27
+ import { default as default20 } from "vue-eslint-parser";
28
+ import { default as default21 } from "yaml-eslint-parser";
29
+ import { default as default22 } from "jsonc-eslint-parser";
30
+
31
+ // src/configs/comments.ts
32
+ var comments = [
33
+ {
34
+ plugins: {
35
+ "eslint-comments": default3
36
+ },
37
+ rules: {
38
+ ...default3.configs.recommended.rules,
39
+ "eslint-comments/disable-enable-pair": OFF
40
+ }
41
+ }
42
+ ];
43
+
44
+ // src/globs.ts
45
+ var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
46
+ var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
47
+ var GLOB_JSX = "**/*.?([cm])jsx";
48
+ var GLOB_TS = "**/*.?([cm])ts";
49
+ var GLOB_TSX = "**/*.?([cm])tsx";
50
+ var GLOB_JSON = "**/*.json";
51
+ var GLOB_JSON5 = "**/*.json5";
52
+ var GLOB_JSONC = "**/*.jsonc";
53
+ var GLOB_MARKDOWN = "**/*.md";
54
+ var GLOB_VUE = "**/*.vue";
55
+ var GLOB_YAML = "**/*.y?(a)ml";
56
+ var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
57
+ var GLOB_TESTS = [
58
+ `**/__tests__/**/*.${GLOB_SRC_EXT}`,
59
+ `**/*.spec.${GLOB_SRC_EXT}`,
60
+ `**/*.test.${GLOB_SRC_EXT}`
61
+ ];
62
+ var GLOB_EXCLUDE = [
63
+ "**/node_modules",
64
+ "**/dist",
65
+ "**/package-lock.json",
66
+ "**/yarn.lock",
67
+ "**/pnpm-lock.yaml",
68
+ "**/output",
69
+ "**/coverage",
70
+ "**/temp",
71
+ "**/.vitepress/cache",
72
+ "**/.nuxt",
73
+ "**/.vercel",
74
+ "**/.changeset",
75
+ "**/.idea",
76
+ "**/.output",
77
+ "**/.vite-inspect",
78
+ "**/CHANGELOG*.md",
79
+ "**/*.min.*",
80
+ "**/LICENSE*",
81
+ "**/__snapshots__",
82
+ "**/auto-import?(s).d.ts",
83
+ "**/components.d.ts"
84
+ ];
85
+
86
+ // src/configs/ignores.ts
87
+ var ignores = [
88
+ { ignores: GLOB_EXCLUDE }
89
+ ];
90
+
91
+ // src/configs/imports.ts
92
+ var imports = [
93
+ {
94
+ plugins: {
95
+ import: default4
96
+ },
97
+ rules: {
98
+ "import/export": "error",
99
+ "import/first": "error",
100
+ "import/newline-after-import": ["error", { considerComments: true, count: 1 }],
101
+ "import/no-duplicates": "error",
102
+ "import/no-mutable-exports": "error",
103
+ "import/no-named-default": "error",
104
+ "import/no-self-import": "error",
105
+ "import/no-webpack-loader-syntax": "error",
106
+ "import/order": "error"
107
+ }
108
+ }
109
+ ];
110
+
111
+ // src/configs/javascript.ts
112
+ import globals from "globals";
113
+ function javascript(options = {}) {
114
+ return [
115
+ {
116
+ languageOptions: {
117
+ ecmaVersion: 2022,
118
+ globals: {
119
+ ...globals.browser,
120
+ ...globals.es2021,
121
+ ...globals.node,
122
+ document: "readonly",
123
+ navigator: "readonly",
124
+ window: "readonly"
125
+ },
126
+ parserOptions: {
127
+ ecmaFeatures: {
128
+ jsx: true
129
+ },
130
+ ecmaVersion: 2022,
131
+ sourceType: "module"
132
+ },
133
+ sourceType: "module"
134
+ },
135
+ plugins: {
136
+ "antfu": default2,
137
+ "unused-imports": default13
138
+ },
139
+ rules: {
140
+ "accessor-pairs": ["error", { enforceForClassMembers: true, setWithoutGet: true }],
141
+ "antfu/import-dedupe": "error",
142
+ "antfu/no-import-node-modules-by-path": "error",
143
+ "antfu/top-level-function": "error",
144
+ "array-callback-return": "error",
145
+ "arrow-parens": ["error", "as-needed", { requireForBlockBody: true }],
146
+ "block-scoped-var": "error",
147
+ "camelcase": OFF,
148
+ "complexity": OFF,
149
+ "consistent-return": OFF,
150
+ "constructor-super": "error",
151
+ "default-case-last": "error",
152
+ "dot-notation": ["error", { allowKeywords: true }],
153
+ "eol-last": "error",
154
+ "eqeqeq": ["error", "smart"],
155
+ "max-statements-per-line": ["error", { max: 1 }],
156
+ "new-cap": ["error", { capIsNew: false, newIsCap: true, properties: true }],
157
+ "new-parens": "error",
158
+ "no-alert": "warn",
159
+ "no-array-constructor": "error",
160
+ "no-async-promise-executor": "error",
161
+ "no-caller": "error",
162
+ "no-case-declarations": "error",
163
+ "no-class-assign": "error",
164
+ "no-compare-neg-zero": "error",
165
+ "no-cond-assign": ["error", "always"],
166
+ "no-console": ["error", { allow: ["warn", "error"] }],
167
+ "no-const-assign": "error",
168
+ "no-constant-condition": "warn",
169
+ "no-control-regex": "error",
170
+ "no-debugger": "error",
171
+ "no-delete-var": "error",
172
+ "no-dupe-args": "error",
173
+ "no-dupe-class-members": "error",
174
+ "no-dupe-keys": "error",
175
+ "no-duplicate-case": "error",
176
+ "no-empty": ["error", { allowEmptyCatch: true }],
177
+ "no-empty-character-class": "error",
178
+ "no-empty-pattern": "error",
179
+ "no-eval": "error",
180
+ "no-ex-assign": "error",
181
+ "no-extend-native": "error",
182
+ "no-extra-bind": "error",
183
+ "no-extra-boolean-cast": "error",
184
+ "no-extra-parens": ["error", "functions"],
185
+ "no-fallthrough": "error",
186
+ "no-floating-decimal": "error",
187
+ "no-func-assign": "error",
188
+ "no-global-assign": "error",
189
+ "no-implied-eval": "error",
190
+ "no-import-assign": "error",
191
+ "no-invalid-regexp": "error",
192
+ "no-invalid-this": "error",
193
+ "no-irregular-whitespace": "error",
194
+ "no-iterator": "error",
195
+ "no-labels": ["error", { allowLoop: false, allowSwitch: false }],
196
+ "no-lone-blocks": "error",
197
+ "no-loss-of-precision": "error",
198
+ "no-misleading-character-class": "error",
199
+ "no-mixed-operators": ["error", {
200
+ allowSamePrecedence: true,
201
+ groups: [
202
+ ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
203
+ ["&&", "||"],
204
+ ["in", "instanceof"]
205
+ ]
206
+ }],
207
+ "no-multi-str": "error",
208
+ "no-new": "error",
209
+ "no-new-func": "error",
210
+ "no-new-object": "error",
211
+ "no-new-symbol": "error",
212
+ "no-new-wrappers": "error",
213
+ "no-obj-calls": "error",
214
+ "no-octal": "error",
215
+ "no-octal-escape": "error",
216
+ "no-param-reassign": OFF,
217
+ "no-proto": "error",
218
+ "no-prototype-builtins": "error",
219
+ "no-redeclare": ["error", { builtinGlobals: false }],
220
+ "no-regex-spaces": "error",
221
+ "no-restricted-globals": [
222
+ "error",
223
+ { message: "Use `globalThis` instead.", name: "global" },
224
+ { message: "Use `globalThis` instead.", name: "self" }
225
+ ],
226
+ "no-restricted-properties": [
227
+ "error",
228
+ { message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.", property: "__proto__" },
229
+ { message: "Use `Object.defineProperty` instead.", property: "__defineGetter__" },
230
+ { message: "Use `Object.defineProperty` instead.", property: "__defineSetter__" },
231
+ { message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
232
+ { message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
233
+ ],
234
+ "no-restricted-syntax": [
235
+ "error",
236
+ "DebuggerStatement",
237
+ "LabeledStatement",
238
+ "WithStatement"
239
+ ],
240
+ "no-return-assign": OFF,
241
+ "no-return-await": OFF,
242
+ "no-self-assign": ["error", { props: true }],
243
+ "no-self-compare": "error",
244
+ "no-sequences": "error",
245
+ "no-shadow-restricted-names": "error",
246
+ "no-sparse-arrays": "error",
247
+ "no-template-curly-in-string": "error",
248
+ "no-this-before-super": "error",
249
+ "no-throw-literal": "error",
250
+ "no-undef": "error",
251
+ "no-undef-init": "error",
252
+ "no-unexpected-multiline": "error",
253
+ "no-unmodified-loop-condition": "error",
254
+ "no-unneeded-ternary": ["error", { defaultAssignment: false }],
255
+ "no-unreachable": "error",
256
+ "no-unreachable-loop": "error",
257
+ "no-unsafe-finally": "error",
258
+ "no-unsafe-negation": "error",
259
+ "no-unused-expressions": ["error", {
260
+ allowShortCircuit: true,
261
+ allowTaggedTemplates: true,
262
+ allowTernary: true
263
+ }],
264
+ "no-unused-vars": ["error", {
265
+ args: "none",
266
+ caughtErrors: "none",
267
+ ignoreRestSiblings: true,
268
+ vars: "all"
269
+ }],
270
+ "no-use-before-define": ["error", { classes: false, functions: false, variables: true }],
271
+ "no-useless-backreference": "error",
272
+ "no-useless-call": "error",
273
+ "no-useless-catch": "error",
274
+ "no-useless-computed-key": "error",
275
+ "no-useless-constructor": "error",
276
+ "no-useless-escape": OFF,
277
+ "no-useless-rename": "error",
278
+ "no-useless-return": "error",
279
+ "no-var": "error",
280
+ "no-void": "error",
281
+ "no-with": "error",
282
+ "object-shorthand": [
283
+ "error",
284
+ "always",
285
+ {
286
+ avoidQuotes: true,
287
+ ignoreConstructors: false
288
+ }
289
+ ],
290
+ "one-var": ["error", { initialized: "never" }],
291
+ "prefer-arrow-callback": [
292
+ "error",
293
+ {
294
+ allowNamedFunctions: false,
295
+ allowUnboundThis: true
296
+ }
297
+ ],
298
+ "prefer-const": [
299
+ "error",
300
+ {
301
+ destructuring: "all",
302
+ ignoreReadBeforeAssign: true
303
+ }
304
+ ],
305
+ "prefer-exponentiation-operator": "error",
306
+ "prefer-promise-reject-errors": "error",
307
+ "prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
308
+ "prefer-rest-params": "error",
309
+ "prefer-spread": "error",
310
+ "prefer-template": "error",
311
+ "quote-props": ["error", "consistent-as-needed"],
312
+ "require-await": OFF,
313
+ "sort-imports": [
314
+ "error",
315
+ {
316
+ allowSeparatedGroups: false,
317
+ ignoreCase: false,
318
+ ignoreDeclarationSort: true,
319
+ ignoreMemberSort: false,
320
+ memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
321
+ }
322
+ ],
323
+ "symbol-description": "error",
324
+ "unicode-bom": ["error", "never"],
325
+ "unused-imports/no-unused-imports": options.isInEditor ? OFF : "error",
326
+ "unused-imports/no-unused-vars": [
327
+ "warn",
328
+ { args: "after-used", argsIgnorePattern: "^_", vars: "all", varsIgnorePattern: "^_" }
329
+ ],
330
+ "use-isnan": ["error", { enforceForIndexOf: true, enforceForSwitchCase: true }],
331
+ "valid-typeof": ["error", { requireStringLiterals: true }],
332
+ "vars-on-top": "error",
333
+ "wrap-iife": ["error", "any", { functionPrototypeMethods: true }],
334
+ "yoda": ["error", "never"]
335
+ }
336
+ },
337
+ {
338
+ files: ["scripts/**/*.*", "cli.*"],
339
+ rules: {
340
+ "no-console": OFF
341
+ }
342
+ }
343
+ ];
344
+ }
345
+
346
+ // src/configs/jsdoc.ts
347
+ var jsdoc = [
348
+ {
349
+ plugins: {
350
+ jsdoc: default5
351
+ },
352
+ rules: {
353
+ ...default5.configs["flat/recommended-typescript"].rules,
354
+ "jsdoc/check-tag-names": OFF,
355
+ "jsdoc/check-values": OFF,
356
+ "jsdoc/no-undefined-types": OFF,
357
+ "jsdoc/require-jsdoc": OFF,
358
+ "jsdoc/require-param": OFF,
359
+ "jsdoc/require-param-description": OFF,
360
+ "jsdoc/require-param-type": OFF,
361
+ "jsdoc/require-returns": OFF,
362
+ "jsdoc/require-returns-type": OFF,
363
+ "jsdoc/require-throws": OFF,
364
+ "jsdoc/require-yields": OFF,
365
+ "jsdoc/tag-lines": OFF
366
+ }
367
+ }
368
+ ];
369
+
370
+ // src/configs/jsonc.ts
371
+ var jsonc = [
372
+ {
373
+ files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
374
+ languageOptions: {
375
+ parser: default22
376
+ },
377
+ plugins: {
378
+ jsonc: default6
379
+ },
380
+ rules: {
381
+ ...default6.configs["recommended-with-jsonc"].rules,
382
+ "jsonc/array-bracket-spacing": ["error", "never"],
383
+ "jsonc/comma-dangle": ["error", "never"],
384
+ "jsonc/comma-style": ["error", "last"],
385
+ "jsonc/indent": ["error", 2],
386
+ "jsonc/key-spacing": ["error", { afterColon: true, beforeColon: false }],
387
+ "jsonc/no-octal-escape": "error",
388
+ "jsonc/object-curly-newline": ["error", { consistent: true, multiline: true }],
389
+ "jsonc/object-curly-spacing": ["error", "always"],
390
+ "jsonc/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }]
391
+ }
392
+ }
393
+ ];
394
+
395
+ // src/configs/markdown.ts
396
+ function markdown(options = {}) {
397
+ const {
398
+ componentExts = []
399
+ } = options;
400
+ return [
401
+ {
402
+ files: [GLOB_MARKDOWN],
403
+ plugins: {
404
+ markdown: default7
405
+ },
406
+ processor: "markdown/markdown"
407
+ },
408
+ {
409
+ files: [
410
+ GLOB_MARKDOWN_CODE,
411
+ ...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
412
+ ],
413
+ languageOptions: {
414
+ parserOptions: {
415
+ ecmaFeatures: {
416
+ impliedStrict: true
417
+ }
418
+ }
419
+ },
420
+ plugins: {
421
+ ts: default11
422
+ },
423
+ rules: {
424
+ ...default7.configs.recommended.overrides[1].rules,
425
+ "antfu/no-cjs-exports": OFF,
426
+ "antfu/no-ts-export-equal": OFF,
427
+ "import/no-unresolved": OFF,
428
+ "no-alert": OFF,
429
+ "no-console": OFF,
430
+ "no-restricted-imports": OFF,
431
+ "no-undef": OFF,
432
+ "no-unused-expressions": OFF,
433
+ "no-unused-vars": OFF,
434
+ "node/prefer-global/process": OFF,
435
+ "ts/comma-dangle": OFF,
436
+ "ts/consistent-type-imports": OFF,
437
+ "ts/no-namespace": OFF,
438
+ "ts/no-redeclare": OFF,
439
+ "ts/no-require-imports": OFF,
440
+ "ts/no-unused-vars": OFF,
441
+ "ts/no-use-before-define": OFF,
442
+ "ts/no-var-requires": OFF,
443
+ "unused-imports/no-unused-imports": OFF,
444
+ "unused-imports/no-unused-vars": OFF
445
+ }
446
+ }
447
+ ];
448
+ }
449
+
450
+ // src/configs/node.ts
451
+ var node = [
452
+ {
453
+ plugins: {
454
+ node: default8
455
+ },
456
+ rules: {
457
+ "node/handle-callback-err": ["error", "^(err|error)$"],
458
+ "node/no-deprecated-api": "error",
459
+ "node/no-exports-assign": "error",
460
+ "node/no-new-require": "error",
461
+ "node/no-path-concat": "error",
462
+ "node/prefer-global/buffer": ["error", "never"],
463
+ "node/prefer-global/process": ["error", "never"],
464
+ "node/process-exit-as-throw": "error"
465
+ }
466
+ }
467
+ ];
468
+
469
+ // src/configs/sort.ts
470
+ var sortPackageJson = [
471
+ {
472
+ files: ["**/package.json"],
473
+ rules: {
474
+ "jsonc/sort-array-values": [
475
+ "error",
476
+ {
477
+ order: { type: "asc" },
478
+ pathPattern: "^files$"
479
+ }
480
+ ],
481
+ "jsonc/sort-keys": [
482
+ "error",
483
+ {
484
+ order: [
485
+ "publisher",
486
+ "name",
487
+ "displayName",
488
+ "type",
489
+ "version",
490
+ "private",
491
+ "packageManager",
492
+ "description",
493
+ "author",
494
+ "license",
495
+ "funding",
496
+ "homepage",
497
+ "repository",
498
+ "bugs",
499
+ "keywords",
500
+ "categories",
501
+ "sideEffects",
502
+ "exports",
503
+ "main",
504
+ "module",
505
+ "unpkg",
506
+ "jsdelivr",
507
+ "types",
508
+ "typesVersions",
509
+ "bin",
510
+ "icon",
511
+ "files",
512
+ "engines",
513
+ "activationEvents",
514
+ "contributes",
515
+ "scripts",
516
+ "peerDependencies",
517
+ "peerDependenciesMeta",
518
+ "dependencies",
519
+ "optionalDependencies",
520
+ "devDependencies",
521
+ "pnpm",
522
+ "overrides",
523
+ "resolutions",
524
+ "husky",
525
+ "simple-git-hooks",
526
+ "lint-staged",
527
+ "eslintConfig"
528
+ ],
529
+ pathPattern: "^$"
530
+ },
531
+ {
532
+ order: { type: "asc" },
533
+ pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$"
534
+ },
535
+ {
536
+ order: { type: "asc" },
537
+ pathPattern: "^resolutions$"
538
+ },
539
+ {
540
+ order: { type: "asc" },
541
+ pathPattern: "^pnpm.overrides$"
542
+ },
543
+ {
544
+ order: [
545
+ "types",
546
+ "import",
547
+ "require",
548
+ "default"
549
+ ],
550
+ pathPattern: "^exports.*$"
551
+ }
552
+ ]
553
+ }
554
+ }
555
+ ];
556
+ var sortTsconfig = [
557
+ {
558
+ files: ["**/tsconfig.json", "**/tsconfig.*.json"],
559
+ rules: {
560
+ "jsonc/sort-keys": [
561
+ "error",
562
+ {
563
+ order: [
564
+ "extends",
565
+ "compilerOptions",
566
+ "references",
567
+ "files",
568
+ "include",
569
+ "exclude"
570
+ ],
571
+ pathPattern: "^$"
572
+ },
573
+ {
574
+ order: [
575
+ /* Projects */
576
+ "incremental",
577
+ "composite",
578
+ "tsBuildInfoFile",
579
+ "disableSourceOfProjectReferenceRedirect",
580
+ "disableSolutionSearching",
581
+ "disableReferencedProjectLoad",
582
+ /* Language and Environment */
583
+ "target",
584
+ "lib",
585
+ "jsx",
586
+ "experimentalDecorators",
587
+ "emitDecoratorMetadata",
588
+ "jsxFactory",
589
+ "jsxFragmentFactory",
590
+ "jsxImportSource",
591
+ "reactNamespace",
592
+ "noLib",
593
+ "useDefineForClassFields",
594
+ "moduleDetection",
595
+ /* Modules */
596
+ "module",
597
+ "rootDir",
598
+ "moduleResolution",
599
+ "baseUrl",
600
+ "paths",
601
+ "rootDirs",
602
+ "typeRoots",
603
+ "types",
604
+ "allowUmdGlobalAccess",
605
+ "moduleSuffixes",
606
+ "allowImportingTsExtensions",
607
+ "resolvePackageJsonExports",
608
+ "resolvePackageJsonImports",
609
+ "customConditions",
610
+ "resolveJsonModule",
611
+ "allowArbitraryExtensions",
612
+ "noResolve",
613
+ /* JavaScript Support */
614
+ "allowJs",
615
+ "checkJs",
616
+ "maxNodeModuleJsDepth",
617
+ /* Emit */
618
+ "declaration",
619
+ "declarationMap",
620
+ "emitDeclarationOnly",
621
+ "sourceMap",
622
+ "inlineSourceMap",
623
+ "outFile",
624
+ "outDir",
625
+ "removeComments",
626
+ "noEmit",
627
+ "importHelpers",
628
+ "importsNotUsedAsValues",
629
+ "downlevelIteration",
630
+ "sourceRoot",
631
+ "mapRoot",
632
+ "inlineSources",
633
+ "emitBOM",
634
+ "newLine",
635
+ "stripInternal",
636
+ "noEmitHelpers",
637
+ "noEmitOnError",
638
+ "preserveConstEnums",
639
+ "declarationDir",
640
+ "preserveValueImports",
641
+ /* Interop Constraints */
642
+ "isolatedModules",
643
+ "verbatimModuleSyntax",
644
+ "allowSyntheticDefaultImports",
645
+ "esModuleInterop",
646
+ "preserveSymlinks",
647
+ "forceConsistentCasingInFileNames",
648
+ /* Type Checking */
649
+ "strict",
650
+ "strictBindCallApply",
651
+ "strictFunctionTypes",
652
+ "strictNullChecks",
653
+ "strictPropertyInitialization",
654
+ "allowUnreachableCode",
655
+ "allowUnusedLabels",
656
+ "alwaysStrict",
657
+ "exactOptionalPropertyTypes",
658
+ "noFallthroughCasesInSwitch",
659
+ "noImplicitAny",
660
+ "noImplicitOverride",
661
+ "noImplicitReturns",
662
+ "noImplicitThis",
663
+ "noPropertyAccessFromIndexSignature",
664
+ "noUncheckedIndexedAccess",
665
+ "noUnusedLocals",
666
+ "noUnusedParameters",
667
+ "useUnknownInCatchVariables",
668
+ /* Completeness */
669
+ "skipDefaultLibCheck",
670
+ "skipLibCheck"
671
+ ],
672
+ pathPattern: "^compilerOptions$"
673
+ }
674
+ ]
675
+ }
676
+ }
677
+ ];
678
+
679
+ // src/configs/stylistic.ts
680
+ import { packages } from "@eslint-stylistic/metadata";
681
+ var tsPackage = packages.find((i) => i.shortId === "ts");
682
+ var javascriptStylistic = [
683
+ {
684
+ plugins: {
685
+ style: default9
686
+ },
687
+ rules: {
688
+ "antfu/if-newline": "error",
689
+ "comma-dangle": ["error", "always-multiline"],
690
+ "curly": ["error", "multi-or-nest", "consistent"],
691
+ "quotes": ["error", "single"],
692
+ "semi": ["error", "never"],
693
+ "style/array-bracket-spacing": ["error", "never"],
694
+ "style/arrow-spacing": ["error", { after: true, before: true }],
695
+ "style/block-spacing": ["error", "always"],
696
+ "style/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
697
+ "style/comma-spacing": ["error", { after: true, before: false }],
698
+ "style/comma-style": ["error", "last"],
699
+ "style/computed-property-spacing": ["error", "never", { enforceForClassMembers: true }],
700
+ "style/dot-location": ["error", "property"],
701
+ "style/func-call-spacing": OFF,
702
+ "style/generator-star-spacing": OFF,
703
+ "style/indent": ["error", 2, {
704
+ ArrayExpression: 1,
705
+ CallExpression: { arguments: 1 },
706
+ FunctionDeclaration: { body: 1, parameters: 1 },
707
+ FunctionExpression: { body: 1, parameters: 1 },
708
+ ImportDeclaration: 1,
709
+ MemberExpression: 1,
710
+ ObjectExpression: 1,
711
+ SwitchCase: 1,
712
+ VariableDeclarator: 1,
713
+ flatTernaryExpressions: false,
714
+ ignoreComments: false,
715
+ ignoredNodes: [
716
+ "TemplateLiteral *",
717
+ "JSXElement",
718
+ "JSXElement > *",
719
+ "JSXAttribute",
720
+ "JSXIdentifier",
721
+ "JSXNamespacedName",
722
+ "JSXMemberExpression",
723
+ "JSXSpreadAttribute",
724
+ "JSXExpressionContainer",
725
+ "JSXOpeningElement",
726
+ "JSXClosingElement",
727
+ "JSXFragment",
728
+ "JSXOpeningFragment",
729
+ "JSXClosingFragment",
730
+ "JSXText",
731
+ "JSXEmptyExpression",
732
+ "JSXSpreadChild",
733
+ "TSTypeParameterInstantiation",
734
+ "FunctionExpression > .params[decorators.length > 0]",
735
+ "FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
736
+ "ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
737
+ ],
738
+ offsetTernaryExpressions: true,
739
+ outerIIFEBody: 1
740
+ }],
741
+ "style/key-spacing": ["error", { afterColon: true, beforeColon: false }],
742
+ "style/keyword-spacing": ["error", { after: true, before: true }],
743
+ "style/lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
744
+ "style/multiline-ternary": ["error", "always-multiline"],
745
+ "style/no-mixed-spaces-and-tabs": "error",
746
+ "style/no-multi-spaces": "error",
747
+ "style/no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
748
+ "style/no-tabs": "error",
749
+ "style/no-trailing-spaces": "error",
750
+ "style/no-whitespace-before-property": "error",
751
+ "style/object-curly-newline": OFF,
752
+ "style/object-curly-spacing": ["error", "always"],
753
+ "style/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
754
+ "style/operator-linebreak": ["error", "before"],
755
+ "style/padded-blocks": ["error", { blocks: "never", classes: "never", switches: "never" }],
756
+ "style/rest-spread-spacing": ["error", "never"],
757
+ "style/semi-spacing": ["error", { after: true, before: false }],
758
+ "style/space-before-blocks": ["error", "always"],
759
+ "style/space-before-function-paren": ["error", { anonymous: "always", asyncArrow: "always", named: "never" }],
760
+ "style/space-in-parens": ["error", "never"],
761
+ "style/space-infix-ops": "error",
762
+ "style/space-unary-ops": ["error", { nonwords: false, words: true }],
763
+ "style/spaced-comment": ["error", "always", {
764
+ block: {
765
+ balanced: true,
766
+ exceptions: ["*"],
767
+ markers: ["!"]
768
+ },
769
+ line: {
770
+ exceptions: ["/", "#"],
771
+ markers: ["/"]
772
+ }
773
+ }],
774
+ "style/template-curly-spacing": "error",
775
+ "style/template-tag-spacing": ["error", "never"],
776
+ "style/yield-star-spacing": ["error", "both"]
777
+ }
778
+ }
779
+ ];
780
+ var typescriptStylistic = [
781
+ {
782
+ plugins: {
783
+ "style-ts": default10,
784
+ "ts": default11
785
+ },
786
+ rules: {
787
+ ...stylisticJsToTS(javascriptStylistic[0].rules),
788
+ "comma-dangle": OFF,
789
+ "quotes": OFF,
790
+ "semi": OFF,
791
+ "style-ts/member-delimiter-style": ["error", { multiline: { delimiter: "none" } }],
792
+ "style-ts/type-annotation-spacing": ["error", {}],
793
+ "ts/comma-dangle": ["error", "always-multiline"],
794
+ "ts/quotes": ["error", "single"],
795
+ "ts/semi": ["error", "never"]
796
+ }
797
+ }
798
+ ];
799
+ function stylisticJsToTS(input) {
800
+ return {
801
+ // turn off all stylistic rules from style
802
+ ...Object.fromEntries(
803
+ Object.entries(input).map(([key]) => {
804
+ if (!key.startsWith("style/"))
805
+ return null;
806
+ const basename = key.replace("style/", "");
807
+ if (tsPackage.rules.find((i) => i.name === basename))
808
+ return [key, OFF];
809
+ return null;
810
+ }).filter(Boolean)
811
+ ),
812
+ // rename all stylistic rules from style to style/ts
813
+ ...Object.fromEntries(
814
+ Object.entries(input).map(([key, value]) => {
815
+ if (!key.startsWith("style/"))
816
+ return null;
817
+ const basename = key.replace("style/", "");
818
+ return tsPackage.rules.find((i) => i.name === basename) ? [`style-ts/${basename}`, value] : null;
819
+ }).filter(Boolean)
820
+ )
821
+ };
822
+ }
823
+
824
+ // src/configs/typescript.ts
825
+ import process from "process";
826
+
827
+ // src/utils.ts
828
+ function combine(...configs) {
829
+ return configs.flatMap((config) => Array.isArray(config) ? config : [config]);
830
+ }
831
+ function renameRules(rules, from, to) {
832
+ return Object.fromEntries(
833
+ Object.entries(rules).map(([key, value]) => {
834
+ if (key.startsWith(from))
835
+ return [to + key.slice(from.length), value];
836
+ return [key, value];
837
+ })
838
+ );
839
+ }
840
+
841
+ // src/configs/typescript.ts
842
+ function typescript(options) {
843
+ const {
844
+ componentExts = []
845
+ } = options ?? {};
846
+ return [
847
+ {
848
+ files: [
849
+ GLOB_TS,
850
+ GLOB_TSX,
851
+ ...componentExts.map((ext) => `**/*.${ext}`)
852
+ ],
853
+ languageOptions: {
854
+ parser: default19,
855
+ parserOptions: {
856
+ sourceType: "module"
857
+ }
858
+ },
859
+ plugins: {
860
+ antfu: default2,
861
+ import: default4,
862
+ ts: default11
863
+ },
864
+ rules: {
865
+ ...renameRules(
866
+ default11.configs["eslint-recommended"].overrides[0].rules,
867
+ "@typescript-eslint/",
868
+ "ts/"
869
+ ),
870
+ ...renameRules(
871
+ default11.configs.strict.rules,
872
+ "@typescript-eslint/",
873
+ "ts/"
874
+ ),
875
+ "antfu/generic-spacing": "error",
876
+ "antfu/named-tuple-spacing": "error",
877
+ "antfu/no-cjs-exports": "error",
878
+ "antfu/no-const-enum": "error",
879
+ "antfu/no-ts-export-equal": "error",
880
+ "no-dupe-class-members": OFF,
881
+ "no-extra-parens": OFF,
882
+ "no-invalid-this": OFF,
883
+ "no-loss-of-precision": OFF,
884
+ "no-redeclare": OFF,
885
+ "no-use-before-define": OFF,
886
+ "no-useless-constructor": OFF,
887
+ // TS
888
+ "ts/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
889
+ "ts/ban-ts-ignore": OFF,
890
+ "ts/consistent-indexed-object-style": OFF,
891
+ "ts/consistent-type-definitions": ["error", "interface"],
892
+ "ts/consistent-type-imports": ["error", { disallowTypeAnnotations: false, prefer: "type-imports" }],
893
+ "ts/explicit-function-return-type": OFF,
894
+ "ts/explicit-member-accessibility": OFF,
895
+ "ts/explicit-module-boundary-types": OFF,
896
+ "ts/naming-convention": OFF,
897
+ "ts/no-dupe-class-members": "error",
898
+ "ts/no-empty-function": OFF,
899
+ "ts/no-empty-interface": OFF,
900
+ "ts/no-explicit-any": OFF,
901
+ "ts/no-extra-parens": ["error", "functions"],
902
+ "ts/no-invalid-this": "error",
903
+ "ts/no-loss-of-precision": "error",
904
+ "ts/no-invalid-void-type": OFF,
905
+ "ts/no-non-null-assertion": OFF,
906
+ "ts/no-redeclare": "error",
907
+ "ts/no-require-imports": "error",
908
+ "ts/no-unused-vars": OFF,
909
+ "ts/no-use-before-define": ["error", { classes: false, functions: false, variables: true }],
910
+ "ts/parameter-properties": OFF,
911
+ "ts/prefer-ts-expect-error": "error",
912
+ "ts/triple-slash-reference": OFF
913
+ }
914
+ },
915
+ {
916
+ files: ["**/*.d.ts"],
917
+ rules: {
918
+ "eslint-comments/no-unlimited-disable": OFF,
919
+ "import/no-duplicates": OFF,
920
+ "unused-imports/no-unused-vars": OFF
921
+ }
922
+ },
923
+ {
924
+ files: GLOB_TESTS,
925
+ rules: {
926
+ "no-unused-expressions": OFF
927
+ }
928
+ },
929
+ {
930
+ files: [GLOB_JSX],
931
+ rules: {
932
+ "ts/no-require-imports": OFF,
933
+ "ts/no-var-requires": OFF
934
+ }
935
+ }
936
+ ];
937
+ }
938
+ function typescriptWithLanguageServer(options) {
939
+ const {
940
+ componentExts = [],
941
+ tsconfigPath,
942
+ tsconfigRootDir = process.cwd()
943
+ } = options;
944
+ return [
945
+ {
946
+ files: [
947
+ GLOB_TS,
948
+ GLOB_TSX,
949
+ ...componentExts.map((ext) => `**/*.${ext}`)
950
+ ],
951
+ ignores: ["**/*.md/*.*"],
952
+ languageOptions: {
953
+ parser: default19,
954
+ parserOptions: {
955
+ project: [tsconfigPath],
956
+ tsconfigRootDir
957
+ }
958
+ },
959
+ plugins: {
960
+ ts: default11
961
+ },
962
+ rules: {
963
+ "dot-notation": OFF,
964
+ "no-implied-eval": OFF,
965
+ "no-throw-literal": OFF,
966
+ "require-await": OFF,
967
+ "ts/await-thenable": "error",
968
+ "ts/dot-notation": ["error", { allowKeywords: true }],
969
+ "ts/no-floating-promises": "error",
970
+ "ts/no-for-in-array": "error",
971
+ "ts/no-implied-eval": "error",
972
+ "ts/no-misused-promises": "error",
973
+ "ts/no-throw-literal": "error",
974
+ "ts/no-unnecessary-type-assertion": "error",
975
+ "ts/no-unsafe-argument": "error",
976
+ "ts/no-unsafe-assignment": "error",
977
+ "ts/no-unsafe-call": "error",
978
+ "ts/no-unsafe-member-access": "error",
979
+ "ts/no-unsafe-return": "error",
980
+ "ts/require-await": "error",
981
+ "ts/restrict-plus-operands": "error",
982
+ "ts/restrict-template-expressions": "error",
983
+ "ts/unbound-method": "error"
984
+ }
985
+ }
986
+ ];
987
+ }
988
+
989
+ // src/configs/unicorn.ts
990
+ var unicorn = [
991
+ {
992
+ plugins: {
993
+ unicorn: default12
994
+ },
995
+ rules: {
996
+ // Pass error message when throwing errors
997
+ "unicorn/error-message": "error",
998
+ // Uppercase regex escapes
999
+ "unicorn/escape-case": "error",
1000
+ // Array.isArray instead of instanceof
1001
+ "unicorn/no-instanceof-array": "error",
1002
+ // Ban `new Array` as `Array` constructor's params are ambiguous
1003
+ "unicorn/no-new-array": "error",
1004
+ // Prevent deprecated `new Buffer()`
1005
+ "unicorn/no-new-buffer": "error",
1006
+ // Keep regex literals safe!
1007
+ "unicorn/no-unsafe-regex": "error",
1008
+ // Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error')
1009
+ "unicorn/number-literal-case": "error",
1010
+ // includes over indexOf when checking for existence
1011
+ "unicorn/prefer-includes": "error",
1012
+ // Prefer using the node: protocol
1013
+ "unicorn/prefer-node-protocol": "error",
1014
+ // Prefer using number properties like `Number.isNaN` rather than `isNaN`
1015
+ "unicorn/prefer-number-properties": "error",
1016
+ // String methods startsWith/endsWith instead of more complicated stuff
1017
+ "unicorn/prefer-string-starts-ends-with": "error",
1018
+ // textContent instead of innerText
1019
+ "unicorn/prefer-text-content": "error",
1020
+ // Enforce throwing type error when throwing error while checking typeof
1021
+ "unicorn/prefer-type-error": "error",
1022
+ // Use new when throwing error
1023
+ "unicorn/throw-new-error": "error"
1024
+ }
1025
+ }
1026
+ ];
1027
+
1028
+ // src/configs/vue.ts
1029
+ import process2 from "process";
1030
+ import { getPackageInfoSync } from "local-pkg";
1031
+ function getVueVersion() {
1032
+ const pkg = getPackageInfoSync("vue", { paths: [process2.cwd()] });
1033
+ if (pkg && typeof pkg.version === "string" && !Number.isNaN(+pkg.version[0]))
1034
+ return +pkg.version[0];
1035
+ return 3;
1036
+ }
1037
+ var isVue3 = getVueVersion() === 3;
1038
+ var vue3Rules = {
1039
+ ...default14.configs.base.rules,
1040
+ ...default14.configs["vue3-essential"].rules,
1041
+ ...default14.configs["vue3-strongly-recommended"].rules,
1042
+ ...default14.configs["vue3-recommended"].rules
1043
+ };
1044
+ var vue2Rules = {
1045
+ ...default14.configs.base.rules,
1046
+ ...default14.configs.essential.rules,
1047
+ ...default14.configs["strongly-recommended"].rules,
1048
+ ...default14.configs.recommended.rules
1049
+ };
1050
+ function vue(options = {}) {
1051
+ return [
1052
+ {
1053
+ files: [GLOB_VUE],
1054
+ languageOptions: {
1055
+ parser: default20,
1056
+ parserOptions: {
1057
+ ecmaFeatures: {
1058
+ jsx: true
1059
+ },
1060
+ extraFileExtensions: [".vue"],
1061
+ parser: options.typescript ? default19 : null,
1062
+ sourceType: "module"
1063
+ }
1064
+ },
1065
+ plugins: {
1066
+ vue: default14
1067
+ },
1068
+ processor: default14.processors[".vue"],
1069
+ rules: {
1070
+ ...isVue3 ? vue3Rules : vue2Rules,
1071
+ "vue/array-bracket-spacing": ["error", "never"],
1072
+ "vue/arrow-spacing": ["error", { after: true, before: true }],
1073
+ "vue/block-order": ["error", {
1074
+ order: ["script", "template", "style"]
1075
+ }],
1076
+ "vue/block-spacing": ["error", "always"],
1077
+ "vue/block-tag-newline": ["error", {
1078
+ multiline: "always",
1079
+ singleline: "always"
1080
+ }],
1081
+ "vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
1082
+ "vue/comma-dangle": ["error", "always-multiline"],
1083
+ "vue/comma-spacing": ["error", { after: true, before: false }],
1084
+ "vue/comma-style": ["error", "last"],
1085
+ "vue/component-name-in-template-casing": ["error", "PascalCase"],
1086
+ "vue/component-options-name-casing": ["error", "PascalCase"],
1087
+ "vue/custom-event-name-casing": ["error", "camelCase"],
1088
+ "vue/define-macros-order": ["error", {
1089
+ order: ["defineOptions", "defineProps", "defineEmits", "defineSlots"]
1090
+ }],
1091
+ "vue/dot-location": ["error", "property"],
1092
+ "vue/dot-notation": ["error", { allowKeywords: true }],
1093
+ "vue/eqeqeq": ["error", "smart"],
1094
+ "vue/html-comment-content-spacing": ["error", "always", {
1095
+ exceptions: ["-"]
1096
+ }],
1097
+ "vue/key-spacing": ["error", { afterColon: true, beforeColon: false }],
1098
+ "vue/keyword-spacing": ["error", { after: true, before: true }],
1099
+ "vue/max-attributes-per-line": OFF,
1100
+ "vue/multi-word-component-names": OFF,
1101
+ "vue/no-constant-condition": "warn",
1102
+ "vue/no-dupe-keys": OFF,
1103
+ "vue/no-empty-pattern": "error",
1104
+ "vue/no-extra-parens": ["error", "functions"],
1105
+ "vue/no-irregular-whitespace": "error",
1106
+ "vue/no-loss-of-precision": "error",
1107
+ "vue/no-restricted-syntax": [
1108
+ "error",
1109
+ "DebuggerStatement",
1110
+ "LabeledStatement",
1111
+ "WithStatement"
1112
+ ],
1113
+ "vue/no-restricted-v-bind": ["error", "/^v-/"],
1114
+ // reactivity transform
1115
+ "vue/no-setup-props-reactivity-loss": OFF,
1116
+ "vue/no-sparse-arrays": "error",
1117
+ "vue/no-unused-refs": "error",
1118
+ "vue/no-useless-v-bind": "error",
1119
+ "vue/no-v-html": OFF,
1120
+ "vue/no-v-text-v-html-on-component": OFF,
1121
+ "vue/object-curly-newline": OFF,
1122
+ "vue/object-curly-spacing": ["error", "always"],
1123
+ "vue/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
1124
+ "vue/object-shorthand": [
1125
+ "error",
1126
+ "always",
1127
+ {
1128
+ avoidQuotes: true,
1129
+ ignoreConstructors: false
1130
+ }
1131
+ ],
1132
+ "vue/operator-linebreak": ["error", "before"],
1133
+ "vue/padding-line-between-blocks": ["error", "always"],
1134
+ "vue/prefer-separate-static-class": "error",
1135
+ "vue/prefer-template": "error",
1136
+ "vue/quote-props": ["error", "consistent-as-needed"],
1137
+ "vue/require-default-prop": OFF,
1138
+ "vue/require-prop-types": OFF,
1139
+ "vue/space-in-parens": ["error", "never"],
1140
+ "vue/space-infix-ops": "error",
1141
+ "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
1142
+ "vue/template-curly-spacing": "error"
1143
+ }
1144
+ }
1145
+ ];
1146
+ }
1147
+
1148
+ // src/configs/yml.ts
1149
+ var yml = [
1150
+ {
1151
+ files: [GLOB_YAML],
1152
+ languageOptions: {
1153
+ parser: default21
1154
+ },
1155
+ plugins: {
1156
+ yml: default15
1157
+ },
1158
+ rules: {
1159
+ ...default15.configs.standard.rules,
1160
+ "style/spaced-comment": OFF,
1161
+ "yml/no-empty-document": OFF,
1162
+ "yml/no-empty-mapping-value": OFF,
1163
+ "yml/quotes": ["error", { avoidEscape: false, prefer: "single" }]
1164
+ }
1165
+ }
1166
+ ];
1167
+
1168
+ // src/configs/test.ts
1169
+ function test(options = {}) {
1170
+ return [
1171
+ {
1172
+ files: GLOB_TESTS,
1173
+ plugins: {
1174
+ "no-only-tests": default16
1175
+ },
1176
+ rules: {
1177
+ "no-only-tests/no-only-tests": options.isInEditor ? OFF : "error"
1178
+ }
1179
+ }
1180
+ ];
1181
+ }
1182
+
1183
+ // src/configs/react.ts
1184
+ function react(options = {}) {
1185
+ return [
1186
+ {
1187
+ files: [GLOB_JSX, GLOB_TSX],
1188
+ languageOptions: {
1189
+ parser: options.typescript ? default19 : null,
1190
+ parserOptions: {
1191
+ sourceType: "module"
1192
+ }
1193
+ },
1194
+ plugins: {
1195
+ "react": default17,
1196
+ "react-hooks": default18
1197
+ },
1198
+ settings: {
1199
+ react: {
1200
+ version: "detect"
1201
+ }
1202
+ },
1203
+ rules: {
1204
+ "jsx-quotes": ["error", "prefer-double"],
1205
+ ...default17.configs.recommended.rules,
1206
+ "react/react-in-jsx-scope": "off",
1207
+ ...default18.configs.recommended.rules
1208
+ }
1209
+ }
1210
+ ];
1211
+ }
1212
+
1213
+ // src/factory.ts
1214
+ function coderwyd(options = {}, ...userConfigs) {
1215
+ const isInEditor = options.isInEditor ?? !!((process3.env.VSCODE_PID || process3.env.JETBRAINS_IDE) && !process3.env.CI);
1216
+ const enableVue = options.vue ?? (isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("@slidev/cli"));
1217
+ const enableReact = options.vue ?? (isPackageExists("react") || isPackageExists("next"));
1218
+ const enableTypeScript = options.typescript ?? isPackageExists("typescript");
1219
+ const enableStylistic = options.stylistic ?? true;
1220
+ const configs = [
1221
+ ignores,
1222
+ javascript({ isInEditor }),
1223
+ comments,
1224
+ node,
1225
+ jsdoc,
1226
+ imports,
1227
+ unicorn
1228
+ ];
1229
+ const componentExts = [];
1230
+ if (enableVue)
1231
+ componentExts.push("vue");
1232
+ if (enableStylistic)
1233
+ configs.push(javascriptStylistic);
1234
+ if (enableTypeScript) {
1235
+ configs.push(typescript({ componentExts }));
1236
+ if (typeof enableTypeScript !== "boolean") {
1237
+ configs.push(typescriptWithLanguageServer({
1238
+ ...enableTypeScript,
1239
+ componentExts
1240
+ }));
1241
+ }
1242
+ if (enableStylistic)
1243
+ configs.push(typescriptStylistic);
1244
+ }
1245
+ if (options.test ?? true)
1246
+ configs.push(test({ isInEditor }));
1247
+ if (enableVue)
1248
+ configs.push(vue({ typescript: !!enableTypeScript }));
1249
+ if (enableReact)
1250
+ configs.push(react({ typescript: !!enableTypeScript }));
1251
+ if (options.jsonc ?? true) {
1252
+ configs.push(
1253
+ jsonc,
1254
+ sortPackageJson,
1255
+ sortTsconfig
1256
+ );
1257
+ }
1258
+ if (options.yaml ?? true)
1259
+ configs.push(yml);
1260
+ if (options.markdown ?? true)
1261
+ configs.push(markdown({ componentExts }));
1262
+ return combine(
1263
+ ...configs,
1264
+ ...userConfigs
1265
+ );
1266
+ }
1267
+
1268
+ // src/index.ts
1269
+ var src_default = coderwyd;
1270
+ export {
1271
+ coderwyd,
1272
+ combine,
1273
+ comments,
1274
+ src_default as default,
1275
+ getVueVersion,
1276
+ ignores,
1277
+ imports,
1278
+ javascript,
1279
+ javascriptStylistic,
1280
+ jsdoc,
1281
+ jsonc,
1282
+ markdown,
1283
+ node,
1284
+ default22 as parserJsonc,
1285
+ default19 as parserTs,
1286
+ default20 as parserVue,
1287
+ default21 as parserYml,
1288
+ default2 as pluginAntfu,
1289
+ default3 as pluginComments,
1290
+ default4 as pluginImport,
1291
+ default5 as pluginJsdoc,
1292
+ default6 as pluginJsonc,
1293
+ default7 as pluginMarkdown,
1294
+ default16 as pluginNoOnlyTests,
1295
+ default8 as pluginNode,
1296
+ default17 as pluginReact,
1297
+ default18 as pluginReactHooks,
1298
+ default9 as pluginStylisticJs,
1299
+ default10 as pluginStylisticTs,
1300
+ default11 as pluginTs,
1301
+ default12 as pluginUnicorn,
1302
+ default13 as pluginUnusedImports,
1303
+ default14 as pluginVue,
1304
+ default15 as pluginYml,
1305
+ react,
1306
+ renameRules,
1307
+ sortPackageJson,
1308
+ sortTsconfig,
1309
+ test,
1310
+ typescript,
1311
+ typescriptStylistic,
1312
+ typescriptWithLanguageServer,
1313
+ unicorn,
1314
+ vue,
1315
+ yml
1316
+ };