@exbotanical/eslint-config 1.0.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,2117 @@
1
+ // src/factory.ts
2
+ import { isPackageExists as isPackageExists3 } from "local-pkg";
3
+
4
+ // src/configs/comments.ts
5
+ import plugin from "@eslint-community/eslint-plugin-eslint-comments";
6
+ var NAMESPACE = "exbotanical/comments";
7
+ async function comments() {
8
+ return [
9
+ {
10
+ name: `${NAMESPACE}/rules`,
11
+ plugins: {
12
+ comments: plugin
13
+ },
14
+ rules: {
15
+ "comments/no-aggregating-enable": ["error"],
16
+ "comments/no-duplicate-disable": ["error"],
17
+ "comments/no-unlimited-disable": ["error"],
18
+ "comments/no-unused-enable": ["error"],
19
+ "comments/no-unused-disable": ["error"],
20
+ "comments/require-description": ["warn"]
21
+ }
22
+ }
23
+ ];
24
+ }
25
+
26
+ // src/filepaths.ts
27
+ var GLOB_JSX = "**/*.?([cm])jsx";
28
+ var GLOB_TS = "**/*.?([cm])ts";
29
+ var GLOB_TSX = "**/*.?([cm])tsx";
30
+ var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
31
+ var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
32
+ var GLOB_JSON = "**/*.json";
33
+ var GLOB_JSON5 = "**/*.json5";
34
+ var GLOB_JSONC = "**/*.jsonc";
35
+ var GLOB_MARKDOWN = "**/*.md";
36
+ var GLOB_VUE = "**/*.vue";
37
+ var GLOB_YAML = "**/*.y?(a)ml";
38
+ var GLOB_TOML = "**/*.toml";
39
+ var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
40
+ var GLOB_TESTS = [
41
+ `**/__tests__/**/*.${GLOB_SRC_EXT}`,
42
+ `**/*.spec.${GLOB_SRC_EXT}`,
43
+ `**/*.test.${GLOB_SRC_EXT}`,
44
+ `**/*.bench.${GLOB_SRC_EXT}`,
45
+ `**/*.benchmark.${GLOB_SRC_EXT}`
46
+ ];
47
+ var GLOB_EXCLUDES = [
48
+ "**/node_modules",
49
+ "**/dist",
50
+ "**/package-lock.json",
51
+ "**/yarn.lock",
52
+ "**/pnpm-lock.yaml",
53
+ "**/bun.lockb",
54
+ "**/output",
55
+ "**/coverage",
56
+ "**/temp",
57
+ "**/.temp",
58
+ "**/tmp",
59
+ "**/.tmp",
60
+ "**/.history",
61
+ "**/.vitepress/cache",
62
+ "**/.next",
63
+ "**/.vercel",
64
+ "**/.changeset",
65
+ "**/.idea",
66
+ "**/.cache",
67
+ "**/.output",
68
+ "**/.yarn",
69
+ "**/CHANGELOG*.md",
70
+ "**/*.min.*",
71
+ "**/LICENSE*",
72
+ "**/__snapshots__"
73
+ ];
74
+
75
+ // src/configs/disables.ts
76
+ var NAMESPACE2 = "exbotanical/disables";
77
+ async function disables() {
78
+ return [
79
+ {
80
+ name: `${NAMESPACE2}/scripts`,
81
+ files: [
82
+ `**/scripts/${GLOB_SRC}`,
83
+ "**/bin/**/*",
84
+ `**/bin.${GLOB_SRC_EXT}`
85
+ ],
86
+ rules: {
87
+ "no-console": "off",
88
+ "ts/explicit-function-return-type": "off"
89
+ }
90
+ },
91
+ {
92
+ name: `${NAMESPACE2}/dts`,
93
+ files: ["**/*.d.?([cm])ts"],
94
+ rules: {
95
+ "eslint-comments/no-unlimited-disable": "off",
96
+ "import/no-duplicates": "off",
97
+ "no-restricted-syntax": "off",
98
+ "unused-imports/no-unused-vars": "off"
99
+ }
100
+ },
101
+ {
102
+ name: `${NAMESPACE2}/cjs`,
103
+ files: ["**/*.js", "**/*.cjs"],
104
+ rules: {
105
+ "ts/no-require-imports": "off"
106
+ }
107
+ },
108
+ {
109
+ name: `${NAMESPACE2}/config-files`,
110
+ files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],
111
+ rules: {
112
+ "no-console": "off",
113
+ "ts/explicit-function-return-type": "off"
114
+ }
115
+ }
116
+ ];
117
+ }
118
+
119
+ // src/configs/ignores.ts
120
+ var NAMESPACE3 = "exbotanical/ignores";
121
+ async function ignores({ files = [] } = {}) {
122
+ return [
123
+ {
124
+ name: NAMESPACE3,
125
+ ignores: [...GLOB_EXCLUDES, ...files]
126
+ }
127
+ ];
128
+ }
129
+
130
+ // src/configs/imports.ts
131
+ import plugin2 from "eslint-plugin-import";
132
+ var NAMESPACE4 = "exbotanical/imports";
133
+ async function imports() {
134
+ return [
135
+ {
136
+ name: `${NAMESPACE4}/rules`,
137
+ plugins: {
138
+ import: plugin2
139
+ },
140
+ rules: {
141
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
142
+ "import/first": "error",
143
+ "import/no-duplicates": "error",
144
+ "import/no-mutable-exports": "error",
145
+ "import/no-named-default": "error",
146
+ "import/no-self-import": "error",
147
+ "import/no-webpack-loader-syntax": "error",
148
+ "import/newline-after-import": ["error", { count: 1 }],
149
+ "import/no-unresolved": "off",
150
+ "import/order": [
151
+ "error",
152
+ {
153
+ "alphabetize": {
154
+ caseInsensitive: true,
155
+ order: "asc"
156
+ },
157
+ "groups": [
158
+ "builtin",
159
+ "external",
160
+ "internal",
161
+ "parent",
162
+ "sibling",
163
+ "index",
164
+ "object",
165
+ "type"
166
+ ],
167
+ "newlines-between": "always",
168
+ "pathGroups": [
169
+ {
170
+ group: "external",
171
+ pattern: "{vue,@vue/**}",
172
+ position: "before"
173
+ },
174
+ {
175
+ group: "external",
176
+ pattern: "{react,@react/**}",
177
+ position: "before"
178
+ },
179
+ {
180
+ group: "internal",
181
+ pattern: "@/**",
182
+ position: "before"
183
+ },
184
+ {
185
+ group: "internal",
186
+ pattern: "@@/**",
187
+ position: "before"
188
+ }
189
+ ]
190
+ }
191
+ ]
192
+ }
193
+ }
194
+ ];
195
+ }
196
+
197
+ // src/configs/javascript.ts
198
+ import pluginUnusedImports from "eslint-plugin-unused-imports";
199
+ import globals from "globals";
200
+
201
+ // src/common.ts
202
+ var VAR_IGNORE_PATTERN = "^_";
203
+
204
+ // src/configs/javascript.ts
205
+ var NAMESPACE5 = "exbotanical/javascript";
206
+ async function javascript({ overrides = {} } = {}) {
207
+ return [
208
+ {
209
+ name: `${NAMESPACE5}/setup`,
210
+ languageOptions: {
211
+ ecmaVersion: "latest",
212
+ globals: {
213
+ ...globals.browser,
214
+ ...globals.node,
215
+ ...globals.es2021,
216
+ document: "readonly",
217
+ navigator: "readonly",
218
+ window: "readonly"
219
+ },
220
+ parserOptions: {
221
+ ecmaFeatures: { jsx: true, impliedStrict: true },
222
+ ecmaVersion: "latest",
223
+ sourceType: "module"
224
+ },
225
+ sourceType: "module"
226
+ },
227
+ linterOptions: {
228
+ reportUnusedDisableDirectives: "error",
229
+ reportUnusedInlineConfigs: "error"
230
+ }
231
+ },
232
+ {
233
+ name: `${NAMESPACE5}/rules`,
234
+ plugins: {
235
+ "unused-imports": pluginUnusedImports
236
+ },
237
+ rules: {
238
+ "array-callback-return": ["error"],
239
+ "constructor-super": ["error"],
240
+ "for-direction": ["error"],
241
+ "getter-return": ["error"],
242
+ "no-async-promise-executor": ["error"],
243
+ "no-class-assign": ["error"],
244
+ "no-compare-neg-zero": ["error"],
245
+ "no-cond-assign": ["error", "except-parens"],
246
+ "no-const-assign": ["error"],
247
+ "no-constant-binary-expression": ["error"],
248
+ "no-constant-condition": ["error"],
249
+ "no-constructor-return": ["error"],
250
+ "no-control-regex": ["error"],
251
+ "no-debugger": ["error"],
252
+ "no-dupe-args": ["error"],
253
+ "no-dupe-class-members": ["error"],
254
+ "no-dupe-else-if": ["error"],
255
+ "no-dupe-keys": ["error"],
256
+ "no-duplicate-case": ["error"],
257
+ "no-duplicate-imports": ["error"],
258
+ "no-empty-character-class": ["error"],
259
+ "no-empty-pattern": ["error"],
260
+ "no-unsafe-finally": ["error"],
261
+ "no-unreachable-loop": ["error"],
262
+ "no-unreachable": ["error"],
263
+ "no-unmodified-loop-condition": ["error"],
264
+ "no-unexpected-multiline": ["error"],
265
+ "no-undef": ["error"],
266
+ "no-this-before-super": ["error"],
267
+ "no-template-curly-in-string": ["error"],
268
+ "no-sparse-arrays": ["error"],
269
+ "no-setter-return": ["error"],
270
+ "no-self-compare": ["error"],
271
+ "no-self-assign": ["error", { props: true }],
272
+ "no-prototype-builtins": ["error"],
273
+ "no-promise-executor-return": ["error"],
274
+ "no-obj-calls": ["error"],
275
+ "no-new-native-nonconstructor": ["error"],
276
+ "no-misleading-character-class": ["error"],
277
+ "no-loss-of-precision": ["error"],
278
+ "no-irregular-whitespace": ["error"],
279
+ "no-invalid-regexp": ["error"],
280
+ "no-import-assign": ["error"],
281
+ "no-func-assign": ["error"],
282
+ "no-fallthrough": ["warn"],
283
+ "no-ex-assign": ["error"],
284
+ "no-unsafe-negation": ["error"],
285
+ "no-unsafe-optional-chaining": ["error"],
286
+ "no-unused-private-class-members": ["error"],
287
+ "no-unused-vars": [
288
+ "error",
289
+ {
290
+ vars: "all",
291
+ args: "all",
292
+ argsIgnorePattern: VAR_IGNORE_PATTERN,
293
+ caughtErrorsIgnorePattern: VAR_IGNORE_PATTERN,
294
+ destructuredArrayIgnorePattern: VAR_IGNORE_PATTERN,
295
+ reportUsedIgnorePattern: true
296
+ }
297
+ ],
298
+ "no-use-before-define": [
299
+ "error",
300
+ { classes: false, functions: false, variables: true }
301
+ ],
302
+ "no-useless-assignment": ["error"],
303
+ "no-useless-backreference": ["error"],
304
+ "require-atomic-updates": ["error"],
305
+ "use-isnan": [
306
+ "error",
307
+ { enforceForIndexOf: true, enforceForSwitchCase: true }
308
+ ],
309
+ "valid-typeof": ["error", { requireStringLiterals: true }],
310
+ "class-methods-use-this": ["warn"],
311
+ "consistent-return": ["error"],
312
+ "curly": ["error", "multi-line"],
313
+ "default-case": [
314
+ "error",
315
+ {
316
+ commentPattern: String.raw`^skip\sdefault`
317
+ }
318
+ ],
319
+ "default-case-last": ["error"],
320
+ "dot-notation": ["error", { allowKeywords: true }],
321
+ "eqeqeq": ["error", "smart"],
322
+ "func-names": ["error", "as-needed"],
323
+ "accessor-pairs": [
324
+ "error",
325
+ { enforceForClassMembers: true, setWithoutGet: true }
326
+ ],
327
+ "arrow-body-style": ["error", "as-needed"],
328
+ "block-scoped-var": ["error"],
329
+ "camelcase": [
330
+ "error",
331
+ {
332
+ ignoreImports: true
333
+ }
334
+ ],
335
+ "capitalized-comments": [
336
+ "error",
337
+ "always",
338
+ {
339
+ ignoreInlineComments: true,
340
+ ignoreConsecutiveComments: true
341
+ }
342
+ ],
343
+ "grouped-accessor-pairs": ["error", "getBeforeSet"],
344
+ "max-params": ["warn", { max: 5 }],
345
+ "new-cap": [
346
+ "error",
347
+ { capIsNew: false, newIsCap: true, properties: true }
348
+ ],
349
+ "no-alert": ["error"],
350
+ "no-array-constructor": ["error"],
351
+ "no-caller": ["error"],
352
+ "no-case-declarations": ["warn"],
353
+ "no-console": ["error", { allow: ["warn", "error"] }],
354
+ "no-delete-var": ["error"],
355
+ "no-else-return": ["error"],
356
+ "no-empty": ["error", { allowEmptyCatch: true }],
357
+ "no-eval": ["error"],
358
+ "no-extra-bind": ["error"],
359
+ "no-extend-native": ["error"],
360
+ "no-extra-boolean-cast": ["error"],
361
+ "no-global-assign": ["error"],
362
+ "no-implied-eval": ["error"],
363
+ "no-invalid-this": ["error"],
364
+ "no-iterator": ["error"],
365
+ "no-labels": ["error", { allowLoop: false, allowSwitch: false }],
366
+ "no-lone-blocks": ["error"],
367
+ "no-multi-str": ["error"],
368
+ "no-new": ["error"],
369
+ "no-new-func": ["error"],
370
+ "no-new-wrappers": ["error"],
371
+ "no-octal": ["error"],
372
+ "no-octal-escape": ["error"],
373
+ "no-param-reassign": ["error"],
374
+ "no-proto": ["error"],
375
+ "no-redeclare": ["error", { builtinGlobals: false }],
376
+ "no-regex-spaces": ["error"],
377
+ "no-restricted-globals": [
378
+ "error",
379
+ { message: "Use `globalThis` instead.", name: "global" },
380
+ { message: "Use `globalThis` instead.", name: "self" }
381
+ ],
382
+ "no-restricted-properties": [
383
+ "error",
384
+ {
385
+ message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
386
+ property: "__proto__"
387
+ },
388
+ {
389
+ message: "Use `Object.defineProperty` instead.",
390
+ property: "__defineGetter__"
391
+ },
392
+ {
393
+ message: "Use `Object.defineProperty` instead.",
394
+ property: "__defineSetter__"
395
+ },
396
+ {
397
+ message: "Use `Object.getOwnPropertyDescriptor` instead.",
398
+ property: "__lookupGetter__"
399
+ },
400
+ {
401
+ message: "Use `Object.getOwnPropertyDescriptor` instead.",
402
+ property: "__lookupSetter__"
403
+ }
404
+ ],
405
+ "no-restricted-syntax": [
406
+ "error",
407
+ "TSEnumDeclaration[const=true]",
408
+ "TSExportAssignment"
409
+ ],
410
+ "no-sequences": ["error"],
411
+ "no-shadow-restricted-names": ["error"],
412
+ "no-throw-literal": ["warn"],
413
+ "no-undef-init": ["error"],
414
+ "no-unneeded-ternary": ["error", { defaultAssignment: false }],
415
+ "no-unused-expressions": [
416
+ "error",
417
+ {
418
+ allowShortCircuit: true,
419
+ allowTaggedTemplates: true,
420
+ allowTernary: true
421
+ }
422
+ ],
423
+ "no-useless-call": ["error"],
424
+ "no-useless-catch": ["error"],
425
+ "no-useless-computed-key": ["error"],
426
+ "no-useless-constructor": ["error"],
427
+ "no-useless-return": ["error"],
428
+ "no-var": ["error"],
429
+ "no-with": ["error"],
430
+ "no-useless-escape": ["error"],
431
+ "object-shorthand": [
432
+ "error",
433
+ "always",
434
+ {
435
+ avoidQuotes: true,
436
+ ignoreConstructors: false
437
+ }
438
+ ],
439
+ "one-var": ["error", { initialized: "never", uninitialized: "never" }],
440
+ "prefer-arrow-callback": [
441
+ "error",
442
+ {
443
+ allowNamedFunctions: false,
444
+ allowUnboundThis: true
445
+ }
446
+ ],
447
+ "prefer-const": [
448
+ "error",
449
+ {
450
+ destructuring: "all",
451
+ ignoreReadBeforeAssign: true
452
+ }
453
+ ],
454
+ "prefer-exponentiation-operator": ["error"],
455
+ "prefer-promise-reject-errors": ["error"],
456
+ "prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
457
+ "prefer-rest-params": ["error"],
458
+ "prefer-spread": ["error"],
459
+ "prefer-template": ["error"],
460
+ "radix": ["error"],
461
+ "symbol-description": ["error"],
462
+ "vars-on-top": ["error"],
463
+ "yoda": ["error", "never"],
464
+ "unicode-bom": ["error", "never"]
465
+ },
466
+ ...overrides
467
+ }
468
+ ];
469
+ }
470
+
471
+ // src/utils.ts
472
+ import { fileURLToPath } from "node:url";
473
+ import { isPackageExists } from "local-pkg";
474
+ var parserPlain = {
475
+ meta: {
476
+ name: "parser-plain"
477
+ },
478
+ parseForESLint: (code) => ({
479
+ ast: {
480
+ body: [],
481
+ comments: [],
482
+ loc: { end: code.length, start: 0 },
483
+ range: [0, code.length],
484
+ tokens: [],
485
+ type: "Program"
486
+ },
487
+ scopeManager: null,
488
+ services: { isPlain: true },
489
+ visitorKeys: {
490
+ Program: []
491
+ }
492
+ })
493
+ };
494
+ async function interopDefault(module) {
495
+ const resolved = await module;
496
+ return resolved.default || resolved;
497
+ }
498
+ function renameRules(rules, map) {
499
+ return Object.fromEntries(
500
+ Object.entries(rules).map(([key, value]) => {
501
+ for (const [from, to] of Object.entries(map)) {
502
+ if (key.startsWith(`${from}/`))
503
+ return [to + key.slice(from.length), value];
504
+ }
505
+ return [key, value];
506
+ })
507
+ );
508
+ }
509
+ function mergeProcessors(processors) {
510
+ const cache = /* @__PURE__ */ new Map();
511
+ return {
512
+ meta: {
513
+ name: `merged-processor:${processors.map((processor) => processor.meta?.name || "unknown").join("+")}`
514
+ },
515
+ supportsAutofix: true,
516
+ preprocess(text, filename) {
517
+ const counts = [];
518
+ cache.set(filename, counts);
519
+ return processors.flatMap((processor) => {
520
+ const result = processor.preprocess?.(text, filename) || [];
521
+ counts.push(result.length);
522
+ return result;
523
+ });
524
+ },
525
+ postprocess(messages, filename) {
526
+ const counts = cache.get(filename);
527
+ cache.delete(filename);
528
+ let index = 0;
529
+ return processors.flatMap((processor, index_) => {
530
+ const msgs = messages.slice(index, index + counts[index_]);
531
+ index += counts[index_];
532
+ return processor.postprocess?.(msgs, filename) || [];
533
+ });
534
+ }
535
+ };
536
+ }
537
+ var processorPassThrough = {
538
+ meta: {
539
+ name: "pass-through"
540
+ },
541
+ preprocess(text) {
542
+ return [text];
543
+ },
544
+ postprocess(messages) {
545
+ return messages[0];
546
+ }
547
+ };
548
+ var scopeUrl = fileURLToPath(new URL(".", import.meta.url));
549
+
550
+ // src/configs/jsdoc.ts
551
+ var NAMESPACE6 = "exbotanical/jsdoc";
552
+ async function jsdoc() {
553
+ return [
554
+ {
555
+ name: `${NAMESPACE6}/rules`,
556
+ plugins: {
557
+ jsdoc: await interopDefault(import("eslint-plugin-jsdoc"))
558
+ },
559
+ rules: {
560
+ "jsdoc/check-access": ["warn"],
561
+ "jsdoc/check-param-names": ["warn"],
562
+ "jsdoc/check-property-names": ["warn"],
563
+ "jsdoc/check-types": ["warn"],
564
+ "jsdoc/empty-tags": ["warn"],
565
+ "jsdoc/implements-on-classes": ["warn"],
566
+ "jsdoc/no-defaults": ["warn"],
567
+ "jsdoc/no-multi-asterisks": ["warn"],
568
+ "jsdoc/require-param-name": ["warn"],
569
+ "jsdoc/require-property": ["warn"],
570
+ "jsdoc/require-property-description": ["warn"],
571
+ "jsdoc/require-property-name": ["warn"],
572
+ "jsdoc/require-returns-check": ["warn"],
573
+ "jsdoc/require-returns-description": ["warn"],
574
+ "jsdoc/require-yields-check": ["warn"],
575
+ "jsdoc/check-alignment": ["warn"],
576
+ "jsdoc/multiline-blocks": ["warn"]
577
+ }
578
+ }
579
+ ];
580
+ }
581
+
582
+ // src/defaults.ts
583
+ var STYLE_DEFAULTS = {
584
+ indent: 2,
585
+ jsx: true,
586
+ quotes: "single",
587
+ semi: false
588
+ };
589
+
590
+ // src/configs/jsonc.ts
591
+ var NAMESPACE7 = "exbotanical/jsonc";
592
+ async function jsonc({
593
+ files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
594
+ overrides = {}
595
+ } = {}, { indent } = STYLE_DEFAULTS) {
596
+ const [plugin4, parser] = await Promise.all([
597
+ interopDefault(import("eslint-plugin-jsonc")),
598
+ interopDefault(import("jsonc-eslint-parser"))
599
+ ]);
600
+ return [
601
+ {
602
+ name: `${NAMESPACE7}/setup`,
603
+ plugins: {
604
+ jsonc: plugin4
605
+ }
606
+ },
607
+ {
608
+ files,
609
+ languageOptions: {
610
+ parser
611
+ },
612
+ name: `${NAMESPACE7}/rules`,
613
+ rules: {
614
+ "jsonc/no-bigint-literals": "error",
615
+ "jsonc/no-binary-expression": "error",
616
+ "jsonc/no-binary-numeric-literals": "error",
617
+ "jsonc/no-dupe-keys": "error",
618
+ "jsonc/no-escape-sequence-in-identifier": "error",
619
+ "jsonc/no-floating-decimal": "error",
620
+ "jsonc/no-hexadecimal-numeric-literals": "error",
621
+ "jsonc/no-infinity": "error",
622
+ "jsonc/no-multi-str": "error",
623
+ "jsonc/no-nan": "error",
624
+ "jsonc/no-number-props": "error",
625
+ "jsonc/no-numeric-separators": "error",
626
+ "jsonc/no-octal": "error",
627
+ "jsonc/no-octal-escape": "error",
628
+ "jsonc/no-octal-numeric-literals": "error",
629
+ "jsonc/no-parenthesized": "error",
630
+ "jsonc/no-plus-sign": "error",
631
+ "jsonc/no-regexp-literals": "error",
632
+ "jsonc/no-sparse-arrays": "error",
633
+ "jsonc/no-template-literals": "error",
634
+ "jsonc/no-undefined-value": "error",
635
+ "jsonc/no-unicode-codepoint-escapes": "error",
636
+ "jsonc/no-useless-escape": "error",
637
+ "jsonc/space-unary-ops": "error",
638
+ "jsonc/valid-json-number": "error",
639
+ "jsonc/vue-custom-block/no-parsing-error": "error",
640
+ "jsonc/array-bracket-spacing": ["error", "never"],
641
+ "jsonc/comma-dangle": ["error", "never"],
642
+ "jsonc/comma-style": ["error", "last"],
643
+ "jsonc/indent": ["error", indent],
644
+ "jsonc/key-spacing": [
645
+ "error",
646
+ { afterColon: true, beforeColon: false }
647
+ ],
648
+ "jsonc/object-curly-newline": [
649
+ "error",
650
+ { consistent: true, multiline: true }
651
+ ],
652
+ "jsonc/object-curly-spacing": ["error", "always"],
653
+ "jsonc/object-property-newline": [
654
+ "error",
655
+ { allowMultiplePropertiesPerLine: true }
656
+ ],
657
+ "jsonc/quote-props": "error",
658
+ "jsonc/quotes": "error",
659
+ ...overrides
660
+ }
661
+ }
662
+ ];
663
+ }
664
+
665
+ // src/configs/jsx.ts
666
+ var NAMESPACE8 = "exbotanical/jsx";
667
+ async function jsx() {
668
+ return [
669
+ {
670
+ name: `${NAMESPACE8}/setup`,
671
+ files: [GLOB_JSX, GLOB_TSX],
672
+ languageOptions: {
673
+ parserOptions: {
674
+ ecmaFeatures: {
675
+ jsx: true
676
+ }
677
+ }
678
+ }
679
+ }
680
+ ];
681
+ }
682
+
683
+ // src/configs/markdown.ts
684
+ var NAMESPACE9 = "exbotanical/markdown";
685
+ async function markdown({
686
+ files = [GLOB_MARKDOWN],
687
+ overrides = {}
688
+ } = {}) {
689
+ const markdown2 = await interopDefault(import("@eslint/markdown"));
690
+ return [
691
+ {
692
+ name: `${NAMESPACE9}/setup`,
693
+ plugins: { markdown: markdown2 }
694
+ },
695
+ {
696
+ name: `${NAMESPACE9}/processor`,
697
+ files,
698
+ ignores: ["**/*.md/*.md"],
699
+ // `eslint-plugin-markdown` only creates virtual files for code blocks,
700
+ // but not the markdown file itself (we use passthrough for this).
701
+ processor: mergeProcessors([
702
+ markdown2.processors.markdown,
703
+ processorPassThrough
704
+ ])
705
+ },
706
+ {
707
+ name: `${NAMESPACE9}/parser`,
708
+ files,
709
+ languageOptions: {
710
+ parser: parserPlain
711
+ }
712
+ },
713
+ {
714
+ name: `${NAMESPACE9}/disables`,
715
+ files: [GLOB_MARKDOWN_CODE],
716
+ languageOptions: {
717
+ parserOptions: {
718
+ ecmaFeatures: { impliedStrict: true }
719
+ }
720
+ },
721
+ rules: {
722
+ "import/newline-after-import": "off",
723
+ "no-alert": "off",
724
+ "no-console": "off",
725
+ "no-labels": "off",
726
+ "no-lone-blocks": "off",
727
+ "no-restricted-syntax": "off",
728
+ "no-undef": "off",
729
+ "no-unused-expressions": "off",
730
+ "no-unused-labels": "off",
731
+ "no-unused-vars": "off",
732
+ "node/prefer-global/process": "off",
733
+ "style/comma-dangle": "off",
734
+ "style/eol-last": "off",
735
+ "ts/consistent-type-imports": "off",
736
+ "ts/explicit-function-return-type": "off",
737
+ "ts/no-namespace": "off",
738
+ "ts/no-redeclare": "off",
739
+ "ts/no-require-imports": "off",
740
+ "ts/no-unused-expressions": "off",
741
+ "ts/no-unused-vars": "off",
742
+ "ts/no-use-before-define": "off",
743
+ "unicode-bom": "off",
744
+ "unused-imports/no-unused-imports": "off",
745
+ "unused-imports/no-unused-vars": "off",
746
+ ...overrides
747
+ }
748
+ }
749
+ ];
750
+ }
751
+
752
+ // src/configs/misc/perfectionist.ts
753
+ import pluginPerfectionist from "eslint-plugin-perfectionist";
754
+ var NAMESPACE10 = "exbotanical/misc/perfectionist";
755
+ async function perfectionist() {
756
+ return [
757
+ {
758
+ name: `${NAMESPACE10}/setup`,
759
+ plugins: {
760
+ perfectionist: pluginPerfectionist
761
+ },
762
+ rules: {
763
+ "perfectionist/sort-exports": [
764
+ "error",
765
+ { order: "asc", type: "natural" }
766
+ ],
767
+ // 'perfectionist/sort-imports': [
768
+ // 'error',
769
+ // {
770
+ // groups: [
771
+ // 'type',
772
+ // ['parent-type', 'sibling-type', 'index-type', 'internal-type'],
773
+ // 'builtin',
774
+ // 'external',
775
+ // 'internal',
776
+ // ['parent', 'sibling', 'index'],
777
+ // 'side-effect',
778
+ // 'object',
779
+ // 'unknown',
780
+ // ],
781
+ // newlinesBetween: 'ignore',
782
+ // order: 'asc',
783
+ // type: 'natural',
784
+ // },
785
+ // ],
786
+ "perfectionist/sort-named-exports": [
787
+ "error",
788
+ { order: "asc", type: "natural" }
789
+ ]
790
+ // 'perfectionist/sort-named-imports': [
791
+ // 'error',
792
+ // { order: 'asc', type: 'natural' },
793
+ // ],
794
+ }
795
+ }
796
+ ];
797
+ }
798
+
799
+ // src/configs/misc/unicorn.ts
800
+ import pluginUnicorn from "eslint-plugin-unicorn";
801
+ var NAMESPACE11 = "exbotanical/misc/unicorn";
802
+ async function unicorn() {
803
+ return [
804
+ {
805
+ name: `${NAMESPACE11}/rules`,
806
+ plugins: {
807
+ unicorn: pluginUnicorn
808
+ },
809
+ rules: {
810
+ ...pluginUnicorn.configs.recommended.rules,
811
+ "unicorn/prevent-abbreviations": "off",
812
+ "unicorn/no-null": "off",
813
+ "unicorn/prefer-top-level-await": "off",
814
+ "unicorn/filename-case": "off"
815
+ }
816
+ }
817
+ ];
818
+ }
819
+
820
+ // src/configs/node.ts
821
+ import plugin3 from "eslint-plugin-n";
822
+ var NAMESPACE12 = "exbotanical/node";
823
+ async function node() {
824
+ return [
825
+ {
826
+ name: `${NAMESPACE12}/rules`,
827
+ plugins: {
828
+ node: plugin3
829
+ },
830
+ rules: {
831
+ "node/handle-callback-err": ["error", "^(err|error)$"],
832
+ "node/no-deprecated-api": "error",
833
+ "node/no-exports-assign": "error",
834
+ "node/no-new-require": "error",
835
+ "node/no-path-concat": "error",
836
+ "node/prefer-global/buffer": ["error", "never"],
837
+ "node/process-exit-as-throw": "error"
838
+ }
839
+ }
840
+ ];
841
+ }
842
+
843
+ // src/configs/package.json.ts
844
+ var NAMESPACE13 = "exbotanical/package.json";
845
+ async function packageJson() {
846
+ return [
847
+ {
848
+ name: `${NAMESPACE13}/rules`,
849
+ files: ["**/package.json"],
850
+ rules: {
851
+ "jsonc/sort-array-values": [
852
+ "error",
853
+ {
854
+ order: { type: "asc" },
855
+ pathPattern: "^files$"
856
+ }
857
+ ],
858
+ "jsonc/sort-keys": [
859
+ "error",
860
+ {
861
+ order: [
862
+ "publisher",
863
+ "name",
864
+ "displayName",
865
+ "type",
866
+ "version",
867
+ "private",
868
+ "packageManager",
869
+ "description",
870
+ "author",
871
+ "contributors",
872
+ "license",
873
+ "funding",
874
+ "homepage",
875
+ "repository",
876
+ "bugs",
877
+ "keywords",
878
+ "categories",
879
+ "sideEffects",
880
+ "exports",
881
+ "main",
882
+ "module",
883
+ "unpkg",
884
+ "jsdelivr",
885
+ "types",
886
+ "typesVersions",
887
+ "bin",
888
+ "icon",
889
+ "files",
890
+ "engines",
891
+ "activationEvents",
892
+ "contributes",
893
+ "scripts",
894
+ "peerDependencies",
895
+ "peerDependenciesMeta",
896
+ "dependencies",
897
+ "optionalDependencies",
898
+ "devDependencies",
899
+ "pnpm",
900
+ "overrides",
901
+ "resolutions",
902
+ "husky",
903
+ "simple-git-hooks",
904
+ "lint-staged",
905
+ "eslintConfig"
906
+ ],
907
+ pathPattern: "^$"
908
+ },
909
+ {
910
+ order: { type: "asc" },
911
+ pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"
912
+ },
913
+ {
914
+ order: { type: "asc" },
915
+ pathPattern: "^(?:resolutions|overrides|pnpm.overrides)$"
916
+ },
917
+ {
918
+ order: ["types", "import", "require", "default"],
919
+ pathPattern: "^exports.*$"
920
+ },
921
+ {
922
+ order: [
923
+ // Client hooks only
924
+ "pre-commit",
925
+ "prepare-commit-msg",
926
+ "commit-msg",
927
+ "post-commit",
928
+ "pre-rebase",
929
+ "post-rewrite",
930
+ "post-checkout",
931
+ "post-merge",
932
+ "pre-push",
933
+ "pre-auto-gc"
934
+ ],
935
+ pathPattern: "^(?:gitHooks|husky|simple-git-hooks)$"
936
+ }
937
+ ]
938
+ }
939
+ }
940
+ ];
941
+ }
942
+
943
+ // src/vendor/plugins/eslint-config-prettier.ts
944
+ var specialRule = 0;
945
+ var eslint_config_prettier_default = {
946
+ rules: {
947
+ // The following rules can be used in some cases. See the README for more
948
+ // information. These are marked with `0` instead of `"off"` so that a
949
+ // script can distinguish them. Note that there are a few more of these
950
+ // in the deprecated section below.
951
+ "curly": specialRule,
952
+ "no-unexpected-multiline": specialRule,
953
+ "style/lines-around-comment": specialRule,
954
+ "style/max-len": specialRule,
955
+ "style/no-confusing-arrow": specialRule,
956
+ "style/no-mixed-operators": specialRule,
957
+ "style/no-tabs": specialRule,
958
+ "style/quotes": specialRule,
959
+ "style/js/lines-around-comment": specialRule,
960
+ "style/js/max-len": specialRule,
961
+ "style/js/no-confusing-arrow": specialRule,
962
+ "style/js/no-mixed-operators": specialRule,
963
+ "style/js/no-tabs": specialRule,
964
+ "style/js/quotes": specialRule,
965
+ "style/ts/lines-around-comment": specialRule,
966
+ "style/ts/quotes": specialRule,
967
+ "ts/lines-around-comment": specialRule,
968
+ "ts/quotes": specialRule,
969
+ "babel/quotes": specialRule,
970
+ "unicorn/template-indent": specialRule,
971
+ "vue/html-self-closing": specialRule,
972
+ "vue/max-len": specialRule,
973
+ // The rest are rules that you never need to enable when using Prettier.
974
+ "@babel/object-curly-spacing": "off",
975
+ "@babel/semi": "off",
976
+ "style/array-bracket-newline": "off",
977
+ "style/array-bracket-spacing": "off",
978
+ "style/array-element-newline": "off",
979
+ "style/arrow-parens": "off",
980
+ "style/arrow-spacing": "off",
981
+ "style/block-spacing": "off",
982
+ "style/brace-style": "off",
983
+ "style/comma-dangle": "off",
984
+ "style/comma-spacing": "off",
985
+ "style/comma-style": "off",
986
+ "style/computed-property-spacing": "off",
987
+ "style/dot-location": "off",
988
+ "style/eol-last": "off",
989
+ "style/func-call-spacing": "off",
990
+ "style/function-call-argument-newline": "off",
991
+ "style/function-call-spacing": "off",
992
+ "style/function-paren-newline": "off",
993
+ "style/generator-star-spacing": "off",
994
+ "style/implicit-arrow-linebreak": "off",
995
+ "style/indent": "off",
996
+ "style/jsx-quotes": "off",
997
+ "style/key-spacing": "off",
998
+ "style/keyword-spacing": "off",
999
+ "style/linebreak-style": "off",
1000
+ "style/max-statements-per-line": "off",
1001
+ "style/multiline-ternary": "off",
1002
+ "style/new-parens": "off",
1003
+ "style/newline-per-chained-call": "off",
1004
+ "style/no-extra-parens": "off",
1005
+ "style/no-extra-semi": "off",
1006
+ "style/no-floating-decimal": "off",
1007
+ "style/no-mixed-spaces-and-tabs": "off",
1008
+ "style/no-multi-spaces": "off",
1009
+ "style/no-multiple-empty-lines": "off",
1010
+ "style/no-trailing-spaces": "off",
1011
+ "style/no-whitespace-before-property": "off",
1012
+ "style/nonblock-statement-body-position": "off",
1013
+ "style/object-curly-newline": "off",
1014
+ "style/object-curly-spacing": "off",
1015
+ "style/object-property-newline": "off",
1016
+ "style/one-var-declaration-per-line": "off",
1017
+ "style/operator-linebreak": "off",
1018
+ "style/padded-blocks": "off",
1019
+ "style/quote-props": "off",
1020
+ "style/rest-spread-spacing": "off",
1021
+ "style/semi": "off",
1022
+ "style/semi-spacing": "off",
1023
+ "style/semi-style": "off",
1024
+ "style/space-before-blocks": "off",
1025
+ "style/space-before-function-paren": "off",
1026
+ "style/space-in-parens": "off",
1027
+ "style/space-infix-ops": "off",
1028
+ "style/space-unary-ops": "off",
1029
+ "style/switch-colon-spacing": "off",
1030
+ "style/template-curly-spacing": "off",
1031
+ "style/template-tag-spacing": "off",
1032
+ "style/wrap-iife": "off",
1033
+ "style/wrap-regex": "off",
1034
+ "style/yield-star-spacing": "off",
1035
+ "style/member-delimiter-style": "off",
1036
+ "style/type-annotation-spacing": "off",
1037
+ "style/jsx-child-element-spacing": "off",
1038
+ "style/jsx-closing-bracket-location": "off",
1039
+ "style/jsx-closing-tag-location": "off",
1040
+ "style/jsx-curly-newline": "off",
1041
+ "style/jsx-curly-spacing": "off",
1042
+ "style/jsx-equals-spacing": "off",
1043
+ "style/jsx-first-prop-new-line": "off",
1044
+ "style/jsx-indent": "off",
1045
+ "style/jsx-indent-props": "off",
1046
+ "style/jsx-max-props-per-line": "off",
1047
+ "style/jsx-newline": "off",
1048
+ "style/jsx-one-expression-per-line": "off",
1049
+ "style/jsx-props-no-multi-spaces": "off",
1050
+ "style/jsx-tag-spacing": "off",
1051
+ "style/jsx-wrap-multilines": "off",
1052
+ "style/indent-binary-ops": "off",
1053
+ "style/type-generic-spacing": "off",
1054
+ "style/type-named-tuple-spacing": "off",
1055
+ "style/js/array-bracket-newline": "off",
1056
+ "style/js/array-bracket-spacing": "off",
1057
+ "style/js/array-element-newline": "off",
1058
+ "style/js/arrow-parens": "off",
1059
+ "style/js/arrow-spacing": "off",
1060
+ "style/js/block-spacing": "off",
1061
+ "style/js/brace-style": "off",
1062
+ "style/js/comma-dangle": "off",
1063
+ "style/js/comma-spacing": "off",
1064
+ "style/js/comma-style": "off",
1065
+ "style/js/computed-property-spacing": "off",
1066
+ "style/js/dot-location": "off",
1067
+ "style/js/eol-last": "off",
1068
+ "style/js/func-call-spacing": "off",
1069
+ "style/js/function-call-argument-newline": "off",
1070
+ "style/js/function-call-spacing": "off",
1071
+ "style/js/function-paren-newline": "off",
1072
+ "style/js/generator-star-spacing": "off",
1073
+ "style/js/implicit-arrow-linebreak": "off",
1074
+ "style/js/indent": "off",
1075
+ "style/js/jsx-quotes": "off",
1076
+ "style/js/key-spacing": "off",
1077
+ "style/js/keyword-spacing": "off",
1078
+ "style/js/linebreak-style": "off",
1079
+ "style/js/max-statements-per-line": "off",
1080
+ "style/js/multiline-ternary": "off",
1081
+ "style/js/new-parens": "off",
1082
+ "style/js/newline-per-chained-call": "off",
1083
+ "style/js/no-extra-parens": "off",
1084
+ "style/js/no-extra-semi": "off",
1085
+ "style/js/no-floating-decimal": "off",
1086
+ "style/js/no-mixed-spaces-and-tabs": "off",
1087
+ "style/js/no-multi-spaces": "off",
1088
+ "style/js/no-multiple-empty-lines": "off",
1089
+ "style/js/no-trailing-spaces": "off",
1090
+ "style/js/no-whitespace-before-property": "off",
1091
+ "style/js/nonblock-statement-body-position": "off",
1092
+ "style/js/object-curly-newline": "off",
1093
+ "style/js/object-curly-spacing": "off",
1094
+ "style/js/object-property-newline": "off",
1095
+ "style/js/one-var-declaration-per-line": "off",
1096
+ "style/js/operator-linebreak": "off",
1097
+ "style/js/padded-blocks": "off",
1098
+ "style/js/quote-props": "off",
1099
+ "style/js/rest-spread-spacing": "off",
1100
+ "style/js/semi": "off",
1101
+ "style/js/semi-spacing": "off",
1102
+ "style/js/semi-style": "off",
1103
+ "style/js/space-before-blocks": "off",
1104
+ "style/js/space-before-function-paren": "off",
1105
+ "style/js/space-in-parens": "off",
1106
+ "style/js/space-infix-ops": "off",
1107
+ "style/js/space-unary-ops": "off",
1108
+ "style/js/switch-colon-spacing": "off",
1109
+ "style/js/template-curly-spacing": "off",
1110
+ "style/js/template-tag-spacing": "off",
1111
+ "style/js/wrap-iife": "off",
1112
+ "style/js/wrap-regex": "off",
1113
+ "style/js/yield-star-spacing": "off",
1114
+ "style/ts/block-spacing": "off",
1115
+ "style/ts/brace-style": "off",
1116
+ "style/ts/comma-dangle": "off",
1117
+ "style/ts/comma-spacing": "off",
1118
+ "style/ts/func-call-spacing": "off",
1119
+ "style/ts/function-call-spacing": "off",
1120
+ "style/ts/indent": "off",
1121
+ "style/ts/key-spacing": "off",
1122
+ "style/ts/keyword-spacing": "off",
1123
+ "style/ts/member-delimiter-style": "off",
1124
+ "style/ts/no-extra-parens": "off",
1125
+ "style/ts/no-extra-semi": "off",
1126
+ "style/ts/object-curly-spacing": "off",
1127
+ "style/ts/semi": "off",
1128
+ "style/ts/space-before-blocks": "off",
1129
+ "style/ts/space-before-function-paren": "off",
1130
+ "style/ts/space-infix-ops": "off",
1131
+ "style/ts/type-annotation-spacing": "off",
1132
+ "style/jsx/jsx-child-element-spacing": "off",
1133
+ "style/jsx/jsx-closing-bracket-location": "off",
1134
+ "style/jsx/jsx-closing-tag-location": "off",
1135
+ "style/jsx/jsx-curly-newline": "off",
1136
+ "style/jsx/jsx-curly-spacing": "off",
1137
+ "style/jsx/jsx-equals-spacing": "off",
1138
+ "style/jsx/jsx-first-prop-new-line": "off",
1139
+ "style/jsx/jsx-indent": "off",
1140
+ "style/jsx/jsx-indent-props": "off",
1141
+ "style/jsx/jsx-max-props-per-line": "off",
1142
+ "ts/block-spacing": "off",
1143
+ "ts/brace-style": "off",
1144
+ "ts/comma-dangle": "off",
1145
+ "ts/comma-spacing": "off",
1146
+ "ts/func-call-spacing": "off",
1147
+ "ts/indent": "off",
1148
+ "ts/key-spacing": "off",
1149
+ "ts/keyword-spacing": "off",
1150
+ "ts/member-delimiter-style": "off",
1151
+ "ts/no-extra-parens": "off",
1152
+ "ts/no-extra-semi": "off",
1153
+ "ts/object-curly-spacing": "off",
1154
+ "ts/semi": "off",
1155
+ "ts/space-before-blocks": "off",
1156
+ "ts/space-before-function-paren": "off",
1157
+ "ts/space-infix-ops": "off",
1158
+ "ts/type-annotation-spacing": "off",
1159
+ "babel/object-curly-spacing": "off",
1160
+ "babel/semi": "off",
1161
+ "flowtype/boolean-style": "off",
1162
+ "flowtype/delimiter-dangle": "off",
1163
+ "flowtype/generic-spacing": "off",
1164
+ "flowtype/object-type-curly-spacing": "off",
1165
+ "flowtype/object-type-delimiter": "off",
1166
+ "flowtype/quotes": "off",
1167
+ "flowtype/semi": "off",
1168
+ "flowtype/space-after-type-colon": "off",
1169
+ "flowtype/space-before-generic-bracket": "off",
1170
+ "flowtype/space-before-type-colon": "off",
1171
+ "flowtype/union-intersection-spacing": "off",
1172
+ "react/jsx-child-element-spacing": "off",
1173
+ "react/jsx-closing-bracket-location": "off",
1174
+ "react/jsx-closing-tag-location": "off",
1175
+ "react/jsx-curly-newline": "off",
1176
+ "react/jsx-curly-spacing": "off",
1177
+ "react/jsx-equals-spacing": "off",
1178
+ "react/jsx-first-prop-new-line": "off",
1179
+ "react/jsx-indent": "off",
1180
+ "react/jsx-indent-props": "off",
1181
+ "react/jsx-max-props-per-line": "off",
1182
+ "react/jsx-newline": "off",
1183
+ "react/jsx-one-expression-per-line": "off",
1184
+ "react/jsx-props-no-multi-spaces": "off",
1185
+ "react/jsx-tag-spacing": "off",
1186
+ "react/jsx-wrap-multilines": "off",
1187
+ "standard/array-bracket-even-spacing": "off",
1188
+ "standard/computed-property-even-spacing": "off",
1189
+ "standard/object-curly-even-spacing": "off",
1190
+ "unicorn/empty-brace-spaces": "off",
1191
+ "unicorn/no-nested-ternary": "off",
1192
+ "unicorn/number-literal-case": "off",
1193
+ "vue/array-bracket-newline": "off",
1194
+ "vue/array-bracket-spacing": "off",
1195
+ "vue/array-element-newline": "off",
1196
+ "vue/arrow-spacing": "off",
1197
+ "vue/block-spacing": "off",
1198
+ "vue/block-tag-newline": "off",
1199
+ "vue/brace-style": "off",
1200
+ "vue/comma-dangle": "off",
1201
+ "vue/comma-spacing": "off",
1202
+ "vue/comma-style": "off",
1203
+ "vue/dot-location": "off",
1204
+ "vue/func-call-spacing": "off",
1205
+ "vue/html-closing-bracket-newline": "off",
1206
+ "vue/html-closing-bracket-spacing": "off",
1207
+ "vue/html-end-tags": "off",
1208
+ "vue/html-indent": "off",
1209
+ "vue/html-quotes": "off",
1210
+ "vue/key-spacing": "off",
1211
+ "vue/keyword-spacing": "off",
1212
+ "vue/max-attributes-per-line": "off",
1213
+ "vue/multiline-html-element-content-newline": "off",
1214
+ "vue/multiline-ternary": "off",
1215
+ "vue/mustache-interpolation-spacing": "off",
1216
+ "vue/no-extra-parens": "off",
1217
+ "vue/no-multi-spaces": "off",
1218
+ "vue/no-spaces-around-equal-signs-in-attribute": "off",
1219
+ "vue/object-curly-newline": "off",
1220
+ "vue/object-curly-spacing": "off",
1221
+ "vue/object-property-newline": "off",
1222
+ "vue/operator-linebreak": "off",
1223
+ "vue/quote-props": "off",
1224
+ "vue/script-indent": "off",
1225
+ "vue/singleline-html-element-content-newline": "off",
1226
+ "vue/space-in-parens": "off",
1227
+ "vue/space-infix-ops": "off",
1228
+ "vue/space-unary-ops": "off",
1229
+ "vue/template-curly-spacing": "off"
1230
+ }
1231
+ };
1232
+
1233
+ // src/configs/prettier.ts
1234
+ async function prettier() {
1235
+ return [eslint_config_prettier_default];
1236
+ }
1237
+
1238
+ // src/configs/react.ts
1239
+ import { isPackageExists as isPackageExists2 } from "local-pkg";
1240
+ var REACT_REFRESH_ALLOW_CONSTANT_EXPORT_PACKAGES = ["vite"];
1241
+ var REACT_ROUTER_PACKAGES = [
1242
+ "@react-router/node",
1243
+ "@react-router/react",
1244
+ "@react-router/serve",
1245
+ "@react-router/dev"
1246
+ ];
1247
+ var NAMESPACE14 = "exbotanical/react";
1248
+ async function react({
1249
+ files = [GLOB_SRC],
1250
+ filesTypeAware = [GLOB_TS, GLOB_TSX],
1251
+ ignoresTypeAware = [],
1252
+ overrides = {},
1253
+ tsconfigPath
1254
+ }) {
1255
+ const isTypeAware = !!tsconfigPath;
1256
+ const typeAwareRules = {
1257
+ "react/no-leaked-conditional-rendering": "warn"
1258
+ };
1259
+ const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all(
1260
+ [
1261
+ interopDefault(import("@eslint-react/eslint-plugin")),
1262
+ interopDefault(import("eslint-plugin-react-hooks")),
1263
+ interopDefault(import("eslint-plugin-react-refresh"))
1264
+ ]
1265
+ );
1266
+ const isAllowConstantExport = REACT_REFRESH_ALLOW_CONSTANT_EXPORT_PACKAGES.some((index) => isPackageExists2(index));
1267
+ const isUsingReactRouter = REACT_ROUTER_PACKAGES.some((index) => isPackageExists2(index));
1268
+ const plugins = pluginReact.configs.all.plugins;
1269
+ return [
1270
+ {
1271
+ name: `${NAMESPACE14}/setup`,
1272
+ plugins: {
1273
+ "react": plugins["@eslint-react"],
1274
+ "react-dom": plugins["@eslint-react/dom"],
1275
+ "react-hooks": pluginReactHooks,
1276
+ "react-hooks-extra": plugins["@eslint-react/hooks-extra"],
1277
+ "react-naming-convention": plugins["@eslint-react/naming-convention"],
1278
+ "react-refresh": pluginReactRefresh,
1279
+ "react-web-api": plugins["@eslint-react/web-api"]
1280
+ }
1281
+ },
1282
+ {
1283
+ name: `${NAMESPACE14}/rules`,
1284
+ files,
1285
+ languageOptions: {
1286
+ parserOptions: {
1287
+ ecmaFeatures: {
1288
+ jsx: true
1289
+ }
1290
+ },
1291
+ sourceType: "module"
1292
+ },
1293
+ rules: {
1294
+ // Recommended rules from @eslint-react/dom
1295
+ "react-dom/no-children-in-void-dom-elements": "warn",
1296
+ "react-dom/no-dangerously-set-innerhtml": "warn",
1297
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
1298
+ "react-dom/no-find-dom-node": "error",
1299
+ "react-dom/no-missing-button-type": "warn",
1300
+ "react-dom/no-missing-iframe-sandbox": "warn",
1301
+ "react-dom/no-namespace": "error",
1302
+ "react-dom/no-render-return-value": "error",
1303
+ "react-dom/no-script-url": "warn",
1304
+ "react-dom/no-unsafe-iframe-sandbox": "warn",
1305
+ "react-dom/no-unsafe-target-blank": "warn",
1306
+ // Recommended rules react-hooks
1307
+ "react-hooks/exhaustive-deps": "warn",
1308
+ "react-hooks/rules-of-hooks": "error",
1309
+ // React refresh
1310
+ "react-refresh/only-export-components": [
1311
+ "warn",
1312
+ {
1313
+ allowConstantExport: isAllowConstantExport,
1314
+ allowExportNames: [
1315
+ ...isUsingReactRouter ? ["meta", "links", "headers", "loader", "action"] : []
1316
+ ]
1317
+ }
1318
+ ],
1319
+ // Recommended rules from @eslint-react/web-api
1320
+ "react-web-api/no-leaked-event-listener": "warn",
1321
+ "react-web-api/no-leaked-interval": "warn",
1322
+ "react-web-api/no-leaked-resize-observer": "warn",
1323
+ "react-web-api/no-leaked-timeout": "warn",
1324
+ // Recommended rules from @eslint-react
1325
+ "react/ensure-forward-ref-using-ref": "warn",
1326
+ "react/jsx-no-duplicate-props": "warn",
1327
+ "react/jsx-uses-vars": "warn",
1328
+ "react/no-access-state-in-setstate": "error",
1329
+ "react/no-array-index-key": "warn",
1330
+ "react/no-children-count": "warn",
1331
+ "react/no-children-for-each": "warn",
1332
+ "react/no-children-map": "warn",
1333
+ "react/no-children-only": "warn",
1334
+ "react/no-children-to-array": "warn",
1335
+ "react/no-clone-element": "warn",
1336
+ "react/no-comment-textnodes": "warn",
1337
+ "react/no-component-will-mount": "error",
1338
+ "react/no-component-will-receive-props": "error",
1339
+ "react/no-component-will-update": "error",
1340
+ "react/no-context-provider": "warn",
1341
+ "react/no-create-ref": "error",
1342
+ "react/no-default-props": "error",
1343
+ "react/no-direct-mutation-state": "error",
1344
+ "react/no-duplicate-key": "error",
1345
+ "react/no-forward-ref": "warn",
1346
+ "react/no-implicit-key": "warn",
1347
+ "react/no-missing-key": "error",
1348
+ "react/no-nested-components": "error",
1349
+ "react/no-prop-types": "error",
1350
+ "react/no-redundant-should-component-update": "error",
1351
+ "react/no-set-state-in-component-did-mount": "warn",
1352
+ "react/no-set-state-in-component-did-update": "warn",
1353
+ "react/no-set-state-in-component-will-update": "warn",
1354
+ "react/no-string-refs": "error",
1355
+ "react/no-unsafe-component-will-mount": "warn",
1356
+ "react/no-unsafe-component-will-receive-props": "warn",
1357
+ "react/no-unsafe-component-will-update": "warn",
1358
+ "react/no-unstable-context-value": "warn",
1359
+ "react/no-unstable-default-props": "warn",
1360
+ "react/no-unused-class-component-members": "warn",
1361
+ "react/no-unused-state": "warn",
1362
+ "react/prefer-destructuring-assignment": "warn",
1363
+ "react/prefer-shorthand-boolean": "warn",
1364
+ "react/prefer-shorthand-fragment": "warn",
1365
+ ...overrides
1366
+ }
1367
+ },
1368
+ ...isTypeAware ? [
1369
+ {
1370
+ name: `${NAMESPACE14}/type-aware-rules`,
1371
+ files: filesTypeAware,
1372
+ ignores: ignoresTypeAware,
1373
+ rules: {
1374
+ ...typeAwareRules
1375
+ }
1376
+ }
1377
+ ] : []
1378
+ ];
1379
+ }
1380
+
1381
+ // src/configs/regexpr.ts
1382
+ import { configs } from "eslint-plugin-regexp";
1383
+ var NAMESPACE15 = "exbotanical/regexpr";
1384
+ async function regexpr({
1385
+ level = "error",
1386
+ overrides = {}
1387
+ } = {}) {
1388
+ const config = configs["flat/recommended"];
1389
+ const rules = {
1390
+ ...config.rules
1391
+ };
1392
+ if (level === "warn") {
1393
+ for (const key in rules) {
1394
+ if (rules[key] === "error") rules[key] = "warn";
1395
+ }
1396
+ }
1397
+ return [
1398
+ {
1399
+ ...config,
1400
+ name: `${NAMESPACE15}/rules`,
1401
+ rules: {
1402
+ ...rules,
1403
+ ...overrides
1404
+ }
1405
+ }
1406
+ ];
1407
+ }
1408
+
1409
+ // src/configs/test.ts
1410
+ var PLUGIN_RUNNER_MAP = {
1411
+ tap: [
1412
+ "eslint-plugin-tap",
1413
+ {
1414
+ "tap/assertion-message": ["error", "always"],
1415
+ "tap/max-asserts": ["error", 8],
1416
+ "tap/no-identical-title": "error",
1417
+ "tap/no-ignored-test-files": "error",
1418
+ "tap/no-only-test": "error",
1419
+ "tap/no-skip-test": "error",
1420
+ "tap/no-statement-after-end": "error",
1421
+ "tap/no-unknown-modifiers": "error",
1422
+ "tap/test-ended": "error",
1423
+ "tap/test-title": ["error", "if-multiple"],
1424
+ "tap/use-plan": ["error", "always"],
1425
+ "tap/use-plan-well": "error",
1426
+ "tap/use-t-well": "error",
1427
+ "tap/use-t": "error",
1428
+ "tap/use-tap": "error"
1429
+ }
1430
+ ],
1431
+ vitest: [
1432
+ "@vitest/eslint-plugin",
1433
+ {
1434
+ // ...vitest.configs.recommended.rules,
1435
+ }
1436
+ ],
1437
+ jest: ["eslint-plugin-jest", {}]
1438
+ };
1439
+ var NAMESPACE16 = "exbotanical/test";
1440
+ async function test({
1441
+ runner = "vitest",
1442
+ files = GLOB_TESTS,
1443
+ overrides = {}
1444
+ }) {
1445
+ const [plugin4, rules] = PLUGIN_RUNNER_MAP[runner];
1446
+ const [pluginRunner, pluginNoOnlyTests] = await Promise.all([
1447
+ interopDefault(import(plugin4)),
1448
+ // @ts-expect-error no types
1449
+ interopDefault(import("eslint-plugin-no-only-tests"))
1450
+ ]);
1451
+ return [
1452
+ {
1453
+ name: `${NAMESPACE16}/setup`,
1454
+ plugins: {
1455
+ test: {
1456
+ ...pluginRunner,
1457
+ rules: {
1458
+ ...rules,
1459
+ ...pluginNoOnlyTests.rules
1460
+ }
1461
+ }
1462
+ }
1463
+ },
1464
+ {
1465
+ name: `${NAMESPACE16}/rules`,
1466
+ files,
1467
+ rules: {
1468
+ ...overrides
1469
+ }
1470
+ }
1471
+ ];
1472
+ }
1473
+
1474
+ // src/configs/toml.ts
1475
+ var NAMESPACE17 = "exbotanical/toml";
1476
+ async function toml({ files = [GLOB_TOML], overrides = {} } = {}, { indent } = STYLE_DEFAULTS) {
1477
+ const [plugin4, parser] = await Promise.all([
1478
+ interopDefault(import("eslint-plugin-toml")),
1479
+ interopDefault(import("toml-eslint-parser"))
1480
+ ]);
1481
+ return [
1482
+ {
1483
+ name: `${NAMESPACE17}/setup`,
1484
+ plugins: {
1485
+ toml: plugin4
1486
+ }
1487
+ },
1488
+ {
1489
+ name: `${NAMESPACE17}/rules`,
1490
+ files,
1491
+ languageOptions: {
1492
+ parser
1493
+ },
1494
+ rules: {
1495
+ "style/spaced-comment": "off",
1496
+ "toml/comma-style": "error",
1497
+ "toml/keys-order": "error",
1498
+ "toml/no-space-dots": "error",
1499
+ "toml/no-unreadable-number-separator": "error",
1500
+ "toml/precision-of-fractional-seconds": "error",
1501
+ "toml/precision-of-integer": "error",
1502
+ "toml/tables-order": "error",
1503
+ "toml/vue-custom-block/no-parsing-error": "error",
1504
+ "toml/array-bracket-newline": "error",
1505
+ "toml/array-bracket-spacing": "error",
1506
+ "toml/array-element-newline": "error",
1507
+ "toml/indent": ["error", indent === "tab" ? 2 : indent],
1508
+ "toml/inline-table-curly-spacing": "error",
1509
+ "toml/key-spacing": "error",
1510
+ "toml/padding-line-between-pairs": "error",
1511
+ "toml/padding-line-between-tables": "error",
1512
+ "toml/quoted-keys": "error",
1513
+ "toml/spaced-comment": "error",
1514
+ "toml/table-bracket-spacing": "error",
1515
+ ...overrides
1516
+ }
1517
+ }
1518
+ ];
1519
+ }
1520
+
1521
+ // src/configs/tsconfig.ts
1522
+ var NAMESPACE18 = "exbotanical/tsconfig";
1523
+ async function tsconfig() {
1524
+ return [
1525
+ {
1526
+ name: `${NAMESPACE18}/rules`,
1527
+ files: ["**/tsconfig.json", "**/tsconfig.*.json"],
1528
+ rules: {
1529
+ "jsonc/sort-keys": [
1530
+ "error",
1531
+ {
1532
+ order: [
1533
+ "extends",
1534
+ "compilerOptions",
1535
+ "references",
1536
+ "files",
1537
+ "include",
1538
+ "exclude"
1539
+ ],
1540
+ pathPattern: "^$"
1541
+ },
1542
+ {
1543
+ order: [
1544
+ /* Projects */
1545
+ "incremental",
1546
+ "composite",
1547
+ "tsBuildInfoFile",
1548
+ "disableSourceOfProjectReferenceRedirect",
1549
+ "disableSolutionSearching",
1550
+ "disableReferencedProjectLoad",
1551
+ /* Language and Environment */
1552
+ "target",
1553
+ "jsx",
1554
+ "jsxFactory",
1555
+ "jsxFragmentFactory",
1556
+ "jsxImportSource",
1557
+ "lib",
1558
+ "moduleDetection",
1559
+ "noLib",
1560
+ "reactNamespace",
1561
+ "useDefineForClassFields",
1562
+ "emitDecoratorMetadata",
1563
+ "experimentalDecorators",
1564
+ /* Modules */
1565
+ "baseUrl",
1566
+ "rootDir",
1567
+ "rootDirs",
1568
+ "customConditions",
1569
+ "module",
1570
+ "moduleResolution",
1571
+ "moduleSuffixes",
1572
+ "noResolve",
1573
+ "paths",
1574
+ "resolveJsonModule",
1575
+ "resolvePackageJsonExports",
1576
+ "resolvePackageJsonImports",
1577
+ "typeRoots",
1578
+ "types",
1579
+ "allowArbitraryExtensions",
1580
+ "allowImportingTsExtensions",
1581
+ "allowUmdGlobalAccess",
1582
+ /* JavaScript Support */
1583
+ "allowJs",
1584
+ "checkJs",
1585
+ "maxNodeModuleJsDepth",
1586
+ /* Type Checking */
1587
+ "strict",
1588
+ "strictBindCallApply",
1589
+ "strictFunctionTypes",
1590
+ "strictNullChecks",
1591
+ "strictPropertyInitialization",
1592
+ "allowUnreachableCode",
1593
+ "allowUnusedLabels",
1594
+ "alwaysStrict",
1595
+ "exactOptionalPropertyTypes",
1596
+ "noFallthroughCasesInSwitch",
1597
+ "noImplicitAny",
1598
+ "noImplicitOverride",
1599
+ "noImplicitReturns",
1600
+ "noImplicitThis",
1601
+ "noPropertyAccessFromIndexSignature",
1602
+ "noUncheckedIndexedAccess",
1603
+ "noUnusedLocals",
1604
+ "noUnusedParameters",
1605
+ "useUnknownInCatchVariables",
1606
+ /* Emit */
1607
+ "declaration",
1608
+ "declarationDir",
1609
+ "declarationMap",
1610
+ "downlevelIteration",
1611
+ "emitBOM",
1612
+ "emitDeclarationOnly",
1613
+ "importHelpers",
1614
+ "importsNotUsedAsValues",
1615
+ "inlineSourceMap",
1616
+ "inlineSources",
1617
+ "mapRoot",
1618
+ "newLine",
1619
+ "noEmit",
1620
+ "noEmitHelpers",
1621
+ "noEmitOnError",
1622
+ "outDir",
1623
+ "outFile",
1624
+ "preserveConstEnums",
1625
+ "preserveValueImports",
1626
+ "removeComments",
1627
+ "sourceMap",
1628
+ "sourceRoot",
1629
+ "stripInternal",
1630
+ /* Interop Constraints */
1631
+ "allowSyntheticDefaultImports",
1632
+ "esModuleInterop",
1633
+ "forceConsistentCasingInFileNames",
1634
+ "isolatedDeclarations",
1635
+ "isolatedModules",
1636
+ "preserveSymlinks",
1637
+ "verbatimModuleSyntax",
1638
+ /* Completeness */
1639
+ "skipDefaultLibCheck",
1640
+ "skipLibCheck"
1641
+ ],
1642
+ pathPattern: "^compilerOptions$"
1643
+ }
1644
+ ]
1645
+ }
1646
+ }
1647
+ ];
1648
+ }
1649
+
1650
+ // src/configs/typescript.ts
1651
+ var NAMESPACE19 = "exbotanical/typescript";
1652
+ async function typescript(options = {}) {
1653
+ const {
1654
+ type = "app",
1655
+ parserOptions = {},
1656
+ overrides = {},
1657
+ typeAwareOverrides = {},
1658
+ ignoresTypeAware = []
1659
+ } = options;
1660
+ const files = options.files ?? [GLOB_TS, GLOB_TSX];
1661
+ const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
1662
+ const tsconfigPath = options?.tsconfigPath;
1663
+ const isTypeAware = !!tsconfigPath;
1664
+ const typeAwareRules = {
1665
+ "dot-notation": ["off"],
1666
+ "no-implied-eval": ["off"],
1667
+ "ts/await-thenable": ["error"],
1668
+ "ts/dot-notation": ["error", { allowKeywords: true }],
1669
+ "ts/no-floating-promises": ["error"],
1670
+ "ts/no-for-in-array": ["error"],
1671
+ "ts/no-implied-eval": ["error"],
1672
+ "ts/no-misused-promises": ["error"],
1673
+ "ts/no-unnecessary-type-assertion": ["error"],
1674
+ "ts/no-unsafe-argument": ["error"],
1675
+ "ts/no-unsafe-assignment": ["error"],
1676
+ "ts/no-unsafe-call": ["error"],
1677
+ "ts/no-unsafe-member-access": ["error"],
1678
+ "ts/no-unsafe-return": ["error"],
1679
+ "ts/promise-function-async": ["error"],
1680
+ "ts/restrict-plus-operands": ["error"],
1681
+ "ts/restrict-template-expressions": ["error"],
1682
+ "ts/return-await": ["error", "in-try-catch"],
1683
+ "ts/strict-boolean-expressions": [
1684
+ "error",
1685
+ { allowNullableBoolean: true, allowNullableObject: true }
1686
+ ],
1687
+ "ts/switch-exhaustiveness-check": ["error"],
1688
+ "ts/unbound-method": ["error"]
1689
+ };
1690
+ const [plugin4, parser] = await Promise.all([
1691
+ interopDefault(import("@typescript-eslint/eslint-plugin")),
1692
+ interopDefault(import("@typescript-eslint/parser"))
1693
+ ]);
1694
+ function makeParser(typeAware, files2, ignores2 = []) {
1695
+ return {
1696
+ name: `${NAMESPACE19}/${typeAware ? "type-aware-parser" : "parser"}`,
1697
+ files: files2,
1698
+ ignores: ignores2,
1699
+ languageOptions: {
1700
+ parser,
1701
+ parserOptions: {
1702
+ sourceType: "module",
1703
+ ...typeAware ? {
1704
+ projectService: {
1705
+ allowDefaultProject: ["./*.js"],
1706
+ defaultProject: tsconfigPath
1707
+ },
1708
+ tsconfigRootDir: process.cwd()
1709
+ } : {},
1710
+ ...parserOptions
1711
+ }
1712
+ }
1713
+ };
1714
+ }
1715
+ return [
1716
+ {
1717
+ name: `${NAMESPACE19}/setup`,
1718
+ plugins: {
1719
+ ts: plugin4
1720
+ }
1721
+ },
1722
+ makeParser(false, files),
1723
+ ...isTypeAware ? [makeParser(true, filesTypeAware, ignoresTypeAware)] : [],
1724
+ {
1725
+ name: `${NAMESPACE19}/rules`,
1726
+ files,
1727
+ rules: {
1728
+ ...renameRules(
1729
+ plugin4.configs["eslint-recommended"].overrides[0].rules,
1730
+ { "@typescript-eslint": "ts" }
1731
+ ),
1732
+ ...renameRules(plugin4.configs.strict.rules, {
1733
+ "@typescript-eslint": "ts"
1734
+ }),
1735
+ "no-dupe-class-members": ["off"],
1736
+ "no-redeclare": ["off"],
1737
+ "no-use-before-define": ["off"],
1738
+ "no-useless-constructor": ["off"],
1739
+ "ts/ban-ts-comment": [
1740
+ "error",
1741
+ { "ts-expect-error": "allow-with-description" }
1742
+ ],
1743
+ "ts/consistent-type-definitions": ["error", "interface"],
1744
+ "ts/consistent-type-imports": [
1745
+ "error",
1746
+ {
1747
+ disallowTypeAnnotations: false,
1748
+ fixStyle: "separate-type-imports",
1749
+ prefer: "type-imports"
1750
+ }
1751
+ ],
1752
+ // See: https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
1753
+ "ts/method-signature-style": ["error", "property"],
1754
+ "ts/no-dupe-class-members": ["error"],
1755
+ "ts/no-dynamic-delete": ["off"],
1756
+ "ts/no-empty-object-type": ["error", { allowInterfaces: "always" }],
1757
+ "ts/no-explicit-any": ["warn"],
1758
+ "ts/no-extraneous-class": ["off"],
1759
+ "ts/no-import-type-side-effects": ["error"],
1760
+ "ts/no-invalid-void-type": ["error"],
1761
+ "ts/no-non-null-assertion": ["error"],
1762
+ "ts/no-redeclare": ["error", { builtinGlobals: false }],
1763
+ "ts/no-require-imports": ["error"],
1764
+ "ts/no-unused-expressions": [
1765
+ "error",
1766
+ {
1767
+ allowShortCircuit: true,
1768
+ allowTaggedTemplates: true,
1769
+ allowTernary: true
1770
+ }
1771
+ ],
1772
+ "ts/no-unused-vars": [
1773
+ "error",
1774
+ {
1775
+ vars: "all",
1776
+ args: "all",
1777
+ argsIgnorePattern: VAR_IGNORE_PATTERN,
1778
+ caughtErrorsIgnorePattern: VAR_IGNORE_PATTERN,
1779
+ destructuredArrayIgnorePattern: VAR_IGNORE_PATTERN,
1780
+ reportUsedIgnorePattern: true
1781
+ }
1782
+ ],
1783
+ "ts/no-use-before-define": [
1784
+ "error",
1785
+ { classes: false, functions: false, variables: true }
1786
+ ],
1787
+ "ts/no-useless-constructor": ["error"],
1788
+ "ts/no-wrapper-object-types": ["error"],
1789
+ "ts/triple-slash-reference": ["off"],
1790
+ "ts/unified-signatures": ["off"],
1791
+ ...type === "lib" ? {
1792
+ "ts/explicit-function-return-type": [
1793
+ "error",
1794
+ {
1795
+ allowExpressions: true,
1796
+ allowHigherOrderFunctions: true,
1797
+ allowIIFEs: true
1798
+ }
1799
+ ]
1800
+ } : {},
1801
+ ...overrides
1802
+ }
1803
+ },
1804
+ ...isTypeAware ? [
1805
+ {
1806
+ name: `${NAMESPACE19}/rules-type-aware`,
1807
+ files: filesTypeAware,
1808
+ ignores: ignoresTypeAware,
1809
+ rules: {
1810
+ ...typeAwareRules,
1811
+ ...typeAwareOverrides
1812
+ }
1813
+ }
1814
+ ] : []
1815
+ ];
1816
+ }
1817
+
1818
+ // src/configs/vue.ts
1819
+ var NAMESPACE20 = "exbotanical/vue";
1820
+ async function vue({
1821
+ files = [GLOB_VUE],
1822
+ overrides = {},
1823
+ typescript: typescript2 = true,
1824
+ vueVersion = 3
1825
+ }, { indent } = STYLE_DEFAULTS) {
1826
+ const [pluginVue, parserVue] = await Promise.all([
1827
+ interopDefault(import("eslint-plugin-vue")),
1828
+ interopDefault(import("vue-eslint-parser"))
1829
+ ]);
1830
+ return [
1831
+ {
1832
+ name: `${NAMESPACE20}/setup`,
1833
+ plugins: {
1834
+ vue: pluginVue
1835
+ },
1836
+ languageOptions: {
1837
+ globals: {
1838
+ computed: "readonly",
1839
+ defineEmits: "readonly",
1840
+ defineExpose: "readonly",
1841
+ defineProps: "readonly",
1842
+ onMounted: "readonly",
1843
+ onUnmounted: "readonly",
1844
+ reactive: "readonly",
1845
+ ref: "readonly",
1846
+ shallowReactive: "readonly",
1847
+ shallowRef: "readonly",
1848
+ toRef: "readonly",
1849
+ toRefs: "readonly",
1850
+ watch: "readonly",
1851
+ watchEffect: "readonly"
1852
+ }
1853
+ }
1854
+ },
1855
+ {
1856
+ name: `${NAMESPACE20}/rules`,
1857
+ files,
1858
+ languageOptions: {
1859
+ parser: parserVue,
1860
+ parserOptions: {
1861
+ ecmaFeatures: {
1862
+ jsx: true
1863
+ },
1864
+ extraFileExtensions: [".vue"],
1865
+ parser: typescript2 ? await interopDefault(import("@typescript-eslint/parser")) : null,
1866
+ sourceType: "module"
1867
+ }
1868
+ },
1869
+ processor: pluginVue.processors[".vue"],
1870
+ rules: {
1871
+ ...pluginVue.configs.base.rules,
1872
+ ...vueVersion === 2 ? {
1873
+ ...pluginVue.configs.essential.rules,
1874
+ ...pluginVue.configs["strongly-recommended"].rules,
1875
+ ...pluginVue.configs.recommended.rules
1876
+ } : {
1877
+ ...pluginVue.configs["vue3-essential"].rules,
1878
+ ...pluginVue.configs["vue3-strongly-recommended"].rules,
1879
+ ...pluginVue.configs["vue3-recommended"].rules
1880
+ },
1881
+ "node/prefer-global/process": "off",
1882
+ "ts/explicit-function-return-type": "off",
1883
+ "vue/block-order": [
1884
+ "error",
1885
+ {
1886
+ order: ["script", "template", "style"]
1887
+ }
1888
+ ],
1889
+ "vue/component-name-in-template-casing": ["error", "PascalCase"],
1890
+ "vue/component-options-name-casing": ["error", "PascalCase"],
1891
+ "vue/component-tags-order": "off",
1892
+ "vue/custom-event-name-casing": ["error", "camelCase"],
1893
+ "vue/define-macros-order": [
1894
+ "error",
1895
+ {
1896
+ order: [
1897
+ "defineOptions",
1898
+ "defineProps",
1899
+ "defineEmits",
1900
+ "defineSlots"
1901
+ ]
1902
+ }
1903
+ ],
1904
+ "vue/dot-location": ["error", "property"],
1905
+ "vue/dot-notation": ["error", { allowKeywords: true }],
1906
+ "vue/eqeqeq": ["error", "smart"],
1907
+ "vue/html-indent": ["error", indent],
1908
+ "vue/html-quotes": ["error", "double"],
1909
+ "vue/max-attributes-per-line": "off",
1910
+ "vue/multi-word-component-names": "off",
1911
+ "vue/no-dupe-keys": "off",
1912
+ "vue/no-empty-pattern": "error",
1913
+ "vue/no-irregular-whitespace": "error",
1914
+ "vue/no-loss-of-precision": "error",
1915
+ "vue/no-restricted-syntax": [
1916
+ "error",
1917
+ "DebuggerStatement",
1918
+ "LabeledStatement",
1919
+ "WithStatement"
1920
+ ],
1921
+ "vue/no-restricted-v-bind": ["error", "/^v-/"],
1922
+ "vue/no-setup-props-reactivity-loss": "off",
1923
+ "vue/no-sparse-arrays": "error",
1924
+ "vue/no-unused-refs": "error",
1925
+ "vue/no-useless-v-bind": "error",
1926
+ "vue/no-v-html": "off",
1927
+ "vue/object-shorthand": [
1928
+ "error",
1929
+ "always",
1930
+ {
1931
+ avoidQuotes: true,
1932
+ ignoreConstructors: false
1933
+ }
1934
+ ],
1935
+ "vue/prefer-separate-static-class": "error",
1936
+ "vue/prefer-template": "error",
1937
+ "vue/prop-name-casing": ["error", "camelCase"],
1938
+ "vue/require-default-prop": "off",
1939
+ "vue/require-prop-types": "off",
1940
+ "vue/space-infix-ops": "error",
1941
+ "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
1942
+ "vue/array-bracket-spacing": ["error", "never"],
1943
+ "vue/arrow-spacing": ["error", { after: true, before: true }],
1944
+ "vue/block-spacing": ["error", "always"],
1945
+ "vue/block-tag-newline": [
1946
+ "error",
1947
+ {
1948
+ multiline: "always",
1949
+ singleline: "always"
1950
+ }
1951
+ ],
1952
+ "vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
1953
+ "vue/comma-dangle": ["error", "always-multiline"],
1954
+ "vue/comma-spacing": ["error", { after: true, before: false }],
1955
+ "vue/comma-style": ["error", "last"],
1956
+ "vue/html-comment-content-spacing": [
1957
+ "error",
1958
+ "always",
1959
+ {
1960
+ exceptions: ["-"]
1961
+ }
1962
+ ],
1963
+ "vue/key-spacing": ["error", { afterColon: true, beforeColon: false }],
1964
+ "vue/keyword-spacing": ["error", { after: true, before: true }],
1965
+ "vue/object-curly-newline": "off",
1966
+ "vue/object-curly-spacing": ["error", "always"],
1967
+ "vue/object-property-newline": [
1968
+ "error",
1969
+ { allowMultiplePropertiesPerLine: true }
1970
+ ],
1971
+ "vue/operator-linebreak": ["error", "before"],
1972
+ "vue/padding-line-between-blocks": ["error", "always"],
1973
+ "vue/quote-props": ["error", "consistent-as-needed"],
1974
+ "vue/space-in-parens": ["error", "never"],
1975
+ "vue/template-curly-spacing": "error",
1976
+ ...overrides
1977
+ }
1978
+ }
1979
+ ];
1980
+ }
1981
+
1982
+ // src/configs/yaml.ts
1983
+ var NAMESPACE21 = "exbotanical/yaml";
1984
+ async function yaml({ files = [GLOB_YAML], overrides = {} } = {}, { indent, quotes } = STYLE_DEFAULTS) {
1985
+ const [plugin4, parser] = await Promise.all([
1986
+ interopDefault(import("eslint-plugin-yml")),
1987
+ interopDefault(import("yaml-eslint-parser"))
1988
+ ]);
1989
+ return [
1990
+ {
1991
+ name: `${NAMESPACE21}/setup`,
1992
+ plugins: {
1993
+ yaml: plugin4
1994
+ }
1995
+ },
1996
+ {
1997
+ name: `${NAMESPACE21}/rules`,
1998
+ files,
1999
+ languageOptions: {
2000
+ parser
2001
+ },
2002
+ rules: {
2003
+ "style/spaced-comment": "off",
2004
+ "yaml/block-mapping-colon-indicator-newline": "error",
2005
+ "yaml/block-mapping-question-indicator-newline": "error",
2006
+ "yaml/block-mapping": "error",
2007
+ "yaml/block-sequence": "error",
2008
+ "yaml/no-empty-key": "error",
2009
+ "yaml/no-empty-sequence-entry": "error",
2010
+ "yaml/no-irregular-whitespace": "error",
2011
+ "yaml/plain-scalar": "error",
2012
+ "yaml/vue-custom-block/no-parsing-error": "error",
2013
+ "yaml/block-sequence-hyphen-indicator-newline": "error",
2014
+ "yaml/flow-mapping-curly-newline": "error",
2015
+ "yaml/flow-mapping-curly-spacing": "error",
2016
+ "yaml/flow-sequence-bracket-newline": "error",
2017
+ "yaml/flow-sequence-bracket-spacing": "error",
2018
+ "yaml/indent": ["error", indent === "tab" ? 2 : indent],
2019
+ "yaml/key-spacing": "error",
2020
+ "yaml/no-tab-indent": "error",
2021
+ "yaml/quotes": [
2022
+ "error",
2023
+ {
2024
+ avoidEscape: true,
2025
+ prefer: quotes === "backtick" ? "single" : quotes
2026
+ }
2027
+ ],
2028
+ "yaml/spaced-comment": "error",
2029
+ "yaml/no-empty-document": "error",
2030
+ "yaml/no-empty-mapping-value": "error",
2031
+ "yaml/no-trailing-zeros": "error",
2032
+ "yaml/no-multiple-empty-lines": "error",
2033
+ ...overrides
2034
+ }
2035
+ }
2036
+ ];
2037
+ }
2038
+
2039
+ // src/factory.ts
2040
+ async function exbotanical({
2041
+ javascript: optionsJavascript,
2042
+ ignores: optionsIgnore,
2043
+ jsonc: optionsJsonc = true,
2044
+ markdown: optionsMarkdown = true,
2045
+ toml: optionsToml = true,
2046
+ yaml: optionsYaml = true,
2047
+ test: optionsTest = true,
2048
+ formatter = true,
2049
+ typescript: optionsTypescript = isPackageExists3("typescript"),
2050
+ style: optionsStyle = STYLE_DEFAULTS,
2051
+ react: optionsReact,
2052
+ vue: optionsVue,
2053
+ ...otherOptions
2054
+ }) {
2055
+ const configs2 = [
2056
+ perfectionist(),
2057
+ unicorn(),
2058
+ comments(),
2059
+ imports(),
2060
+ javascript({ ...optionsJavascript, ...otherOptions }),
2061
+ jsdoc(),
2062
+ jsx(),
2063
+ node(),
2064
+ regexpr(),
2065
+ test({ ...factoryConfig(optionsTest), ...otherOptions })
2066
+ ];
2067
+ if (optionsJsonc) {
2068
+ configs2.push(
2069
+ packageJson(),
2070
+ tsconfig(),
2071
+ jsonc({
2072
+ ...factoryConfig(optionsJsonc),
2073
+ ...optionsStyle,
2074
+ ...otherOptions
2075
+ })
2076
+ );
2077
+ }
2078
+ if (optionsMarkdown) {
2079
+ configs2.push(
2080
+ markdown({ ...factoryConfig(optionsMarkdown), ...otherOptions })
2081
+ );
2082
+ }
2083
+ if (optionsReact) {
2084
+ configs2.push(react({ ...factoryConfig(optionsReact), ...otherOptions }));
2085
+ }
2086
+ if (optionsToml) {
2087
+ configs2.push(
2088
+ toml({ ...factoryConfig(optionsToml), ...optionsStyle, ...otherOptions })
2089
+ );
2090
+ }
2091
+ if (optionsTypescript) {
2092
+ configs2.push(
2093
+ typescript({ ...factoryConfig(optionsTypescript), ...otherOptions })
2094
+ );
2095
+ }
2096
+ if (optionsVue) {
2097
+ configs2.push(vue({ ...factoryConfig(optionsVue), ...otherOptions }));
2098
+ }
2099
+ if (optionsYaml) {
2100
+ configs2.push(
2101
+ yaml({ ...factoryConfig(optionsYaml), ...optionsStyle, ...otherOptions })
2102
+ );
2103
+ }
2104
+ if (formatter) {
2105
+ configs2.push(prettier());
2106
+ }
2107
+ configs2.push(disables(), ignores({ ...optionsIgnore, ...otherOptions }));
2108
+ const resolved = await Promise.all(configs2);
2109
+ return resolved.flat();
2110
+ }
2111
+ function factoryConfig(options) {
2112
+ if (!options) return {};
2113
+ return typeof options === "boolean" ? {} : options;
2114
+ }
2115
+ export {
2116
+ exbotanical as default
2117
+ };