@cany748/eslint-config 3.0.4 → 3.0.5

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.cjs DELETED
@@ -1,1354 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- GLOB_ALL_SRC: () => GLOB_ALL_SRC,
34
- GLOB_ASTRO: () => GLOB_ASTRO,
35
- GLOB_ASTRO_TS: () => GLOB_ASTRO_TS,
36
- GLOB_CSS: () => GLOB_CSS,
37
- GLOB_EXCLUDE: () => GLOB_EXCLUDE,
38
- GLOB_GRAPHQL: () => GLOB_GRAPHQL,
39
- GLOB_HTML: () => GLOB_HTML,
40
- GLOB_JS: () => GLOB_JS,
41
- GLOB_JSON: () => GLOB_JSON,
42
- GLOB_JSON5: () => GLOB_JSON5,
43
- GLOB_JSONC: () => GLOB_JSONC,
44
- GLOB_JSX: () => GLOB_JSX,
45
- GLOB_LESS: () => GLOB_LESS,
46
- GLOB_MARKDOWN: () => GLOB_MARKDOWN,
47
- GLOB_MARKDOWN_CODE: () => GLOB_MARKDOWN_CODE,
48
- GLOB_MARKDOWN_IN_MARKDOWN: () => GLOB_MARKDOWN_IN_MARKDOWN,
49
- GLOB_POSTCSS: () => GLOB_POSTCSS,
50
- GLOB_SCSS: () => GLOB_SCSS,
51
- GLOB_SRC: () => GLOB_SRC,
52
- GLOB_SRC_EXT: () => GLOB_SRC_EXT,
53
- GLOB_STYLE: () => GLOB_STYLE,
54
- GLOB_SVELTE: () => GLOB_SVELTE,
55
- GLOB_TESTS: () => GLOB_TESTS,
56
- GLOB_TOML: () => GLOB_TOML,
57
- GLOB_TS: () => GLOB_TS,
58
- GLOB_TSX: () => GLOB_TSX,
59
- GLOB_VUE: () => GLOB_VUE,
60
- GLOB_XML: () => GLOB_XML,
61
- GLOB_YAML: () => GLOB_YAML,
62
- combine: () => combine,
63
- comments: () => comments,
64
- disables: () => disables,
65
- factoryConfig: () => factoryConfig,
66
- formatters: () => formatters,
67
- ignores: () => ignores,
68
- imports: () => imports,
69
- interopDefault: () => interopDefault,
70
- isInEditorEnv: () => isInEditorEnv,
71
- isInGitHooksOrLintStaged: () => isInGitHooksOrLintStaged,
72
- javascript: () => javascript,
73
- jsonc: () => jsonc,
74
- node: () => node,
75
- parserPlain: () => parserPlain,
76
- regexp: () => regexp,
77
- sortPackageJson: () => sortPackageJson,
78
- sortTsconfig: () => sortTsconfig,
79
- test: () => test,
80
- toArray: () => toArray,
81
- typescript: () => typescript,
82
- unicorn: () => unicorn,
83
- unocss: () => unocss,
84
- vue: () => vue
85
- });
86
- module.exports = __toCommonJS(index_exports);
87
-
88
- // src/configs/comments.ts
89
- var import_eslint_plugin_eslint_comments = __toESM(require("@eslint-community/eslint-plugin-eslint-comments"), 1);
90
- function comments() {
91
- return [
92
- {
93
- name: "@eslint-community/eslint-comments",
94
- plugins: {
95
- "@eslint-community/eslint-comments": import_eslint_plugin_eslint_comments.default
96
- },
97
- rules: {
98
- ...import_eslint_plugin_eslint_comments.default.configs.recommended.rules,
99
- "@eslint-community/eslint-comments/disable-enable-pair": "off"
100
- }
101
- }
102
- ];
103
- }
104
-
105
- // src/globs.ts
106
- var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
107
- var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
108
- var GLOB_JS = "**/*.?([cm])js";
109
- var GLOB_JSX = "**/*.?([cm])jsx";
110
- var GLOB_TS = "**/*.?([cm])ts";
111
- var GLOB_TSX = "**/*.?([cm])tsx";
112
- var GLOB_STYLE = "**/*.{c,le,sc}ss";
113
- var GLOB_CSS = "**/*.css";
114
- var GLOB_POSTCSS = "**/*.{p,post}css";
115
- var GLOB_LESS = "**/*.less";
116
- var GLOB_SCSS = "**/*.scss";
117
- var GLOB_JSON = "**/*.json";
118
- var GLOB_JSON5 = "**/*.json5";
119
- var GLOB_JSONC = "**/*.jsonc";
120
- var GLOB_MARKDOWN = "**/*.md";
121
- var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
122
- var GLOB_SVELTE = "**/*.svelte";
123
- var GLOB_VUE = "**/*.vue";
124
- var GLOB_YAML = "**/*.y?(a)ml";
125
- var GLOB_TOML = "**/*.toml";
126
- var GLOB_XML = "**/*.xml";
127
- var GLOB_HTML = "**/*.htm?(l)";
128
- var GLOB_ASTRO = "**/*.astro";
129
- var GLOB_ASTRO_TS = "**/*.astro/*.ts";
130
- var GLOB_GRAPHQL = "**/*.{g,graph}ql";
131
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
132
- var GLOB_TESTS = [
133
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
134
- `**/*.spec.${GLOB_SRC_EXT}`,
135
- `**/*.test.${GLOB_SRC_EXT}`,
136
- `**/*.bench.${GLOB_SRC_EXT}`,
137
- `**/*.benchmark.${GLOB_SRC_EXT}`
138
- ];
139
- var GLOB_ALL_SRC = [
140
- GLOB_SRC,
141
- GLOB_STYLE,
142
- GLOB_JSON,
143
- GLOB_JSON5,
144
- GLOB_MARKDOWN,
145
- GLOB_SVELTE,
146
- GLOB_VUE,
147
- GLOB_YAML,
148
- GLOB_XML,
149
- GLOB_HTML
150
- ];
151
- var GLOB_EXCLUDE = [
152
- "**/node_modules",
153
- "**/dist",
154
- "**/build",
155
- "**/vendor",
156
- "**/public",
157
- "**/out",
158
- "**/package-lock.json",
159
- "**/yarn.lock",
160
- "**/pnpm-lock.yaml",
161
- "**/bun.lockb",
162
- "**/output",
163
- "**/coverage",
164
- "**/temp",
165
- "**/.temp",
166
- "**/tmp",
167
- "**/.tmp",
168
- "**/.history",
169
- "**/.vitepress/cache",
170
- "**/.nuxt",
171
- "**/.next",
172
- "**/.svelte-kit",
173
- "**/.vercel",
174
- "**/.netlify",
175
- "**/.changeset",
176
- "**/.idea",
177
- "**/.cache",
178
- "**/.output",
179
- "**/.vite-inspect",
180
- "**/.yarn",
181
- "**/vite.config.*.timestamp-*",
182
- "**/CHANGELOG*.md",
183
- "**/*.min.*",
184
- "**/LICENSE*",
185
- "**/__snapshots__",
186
- "**/auto-import?(s).d.ts",
187
- "**/components.d.ts"
188
- ];
189
-
190
- // src/configs/disables.ts
191
- function disables() {
192
- return [
193
- {
194
- files: [`**/scripts/${GLOB_SRC}`],
195
- name: "disables/scripts",
196
- rules: {
197
- "no-console": "off",
198
- "@typescript-eslint/explicit-function-return-type": "off"
199
- }
200
- },
201
- {
202
- files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
203
- name: "disables/cli",
204
- rules: {
205
- "no-console": "off"
206
- }
207
- },
208
- {
209
- files: ["**/*.d.?([cm])ts"],
210
- name: "disables/dts",
211
- rules: {
212
- "@eslint-community/eslint-comments/no-unlimited-disable": "off",
213
- "import/no-duplicates": "off",
214
- "no-restricted-syntax": "off",
215
- "unused-imports/no-unused-vars": "off"
216
- }
217
- },
218
- {
219
- files: ["**/*.{test,spec}.([tj])s?(x)"],
220
- name: "disables/test",
221
- rules: {
222
- "no-unused-expressions": "off"
223
- }
224
- },
225
- {
226
- files: ["**/*.js", "**/*.cjs"],
227
- name: "disables/cjs",
228
- rules: {
229
- "@typescript-eslint/no-require-imports": "off"
230
- }
231
- },
232
- {
233
- files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],
234
- name: "disables/config-files",
235
- rules: {
236
- "no-console": "off",
237
- "@typescript-eslint/explicit-function-return-type": "off"
238
- }
239
- }
240
- ];
241
- }
242
-
243
- // src/configs/formatters.ts
244
- var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
245
- var import_recommended = __toESM(require("eslint-plugin-prettier/recommended"), 1);
246
-
247
- // src/utils.ts
248
- var parserPlain = {
249
- meta: {
250
- name: "parser-plain"
251
- },
252
- parseForESLint: (code) => ({
253
- ast: {
254
- body: [],
255
- comments: [],
256
- loc: { end: code.length, start: 0 },
257
- range: [0, code.length],
258
- tokens: [],
259
- type: "Program"
260
- },
261
- scopeManager: null,
262
- services: { isPlain: true },
263
- visitorKeys: {
264
- Program: []
265
- }
266
- })
267
- };
268
- async function combine(...configs2) {
269
- const resolved = await Promise.all(configs2);
270
- return resolved.flat();
271
- }
272
- function toArray(value) {
273
- return Array.isArray(value) ? value : [value];
274
- }
275
- async function interopDefault(m) {
276
- const resolved = await m;
277
- return resolved.default || resolved;
278
- }
279
- function isInGitHooksOrLintStaged() {
280
- return !!// eslint-disable-next-line no-constant-binary-expression
281
- (process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
282
- }
283
- function isInEditorEnv() {
284
- if (process.env.CI) return false;
285
- if (isInGitHooksOrLintStaged()) return false;
286
- return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
287
- }
288
-
289
- // src/configs/formatters.ts
290
- function formatters(options = true) {
291
- if (options === true) {
292
- options = {
293
- css: true,
294
- graphql: true,
295
- html: true,
296
- markdown: true
297
- };
298
- }
299
- const configs2 = [
300
- {
301
- name: "formatter/setup",
302
- plugins: {
303
- prettier: import_eslint_plugin_prettier.default
304
- },
305
- rules: import_recommended.default.rules
306
- }
307
- ];
308
- if (options.css) {
309
- configs2.push(
310
- {
311
- files: [GLOB_CSS, GLOB_POSTCSS],
312
- languageOptions: {
313
- parser: parserPlain
314
- },
315
- name: "formatter/css",
316
- rules: {
317
- "prettier/prettier": ["error", { parser: "css" }]
318
- }
319
- },
320
- {
321
- files: [GLOB_SCSS],
322
- languageOptions: {
323
- parser: parserPlain
324
- },
325
- name: "formatter/scss",
326
- rules: {
327
- "prettier/prettier": ["error", { parser: "scss" }]
328
- }
329
- },
330
- {
331
- files: [GLOB_LESS],
332
- languageOptions: {
333
- parser: parserPlain
334
- },
335
- name: "formatter/less",
336
- rules: {
337
- "prettier/prettier": ["error", { parser: "less" }]
338
- }
339
- }
340
- );
341
- }
342
- if (options.graphql) {
343
- configs2.push({
344
- files: [GLOB_GRAPHQL],
345
- languageOptions: {
346
- parser: parserPlain
347
- },
348
- name: "formatter/graphql",
349
- rules: {
350
- "prettier/prettier": ["error", { parser: "graphql" }]
351
- }
352
- });
353
- }
354
- if (options.html) {
355
- configs2.push({
356
- files: [GLOB_HTML],
357
- languageOptions: {
358
- parser: parserPlain
359
- },
360
- name: "formatter/html",
361
- rules: {
362
- "prettier/prettier": ["error", { parser: "html" }]
363
- }
364
- });
365
- }
366
- if (options.markdown) {
367
- configs2.push({
368
- files: [GLOB_MARKDOWN],
369
- languageOptions: {
370
- parser: parserPlain
371
- },
372
- name: "formatter/markdown",
373
- rules: {
374
- "prettier/prettier": ["error", { parser: "markdown" }]
375
- }
376
- });
377
- }
378
- return configs2;
379
- }
380
-
381
- // src/configs/ignores.ts
382
- function ignores(userIgnores = []) {
383
- return [
384
- {
385
- ignores: [...GLOB_EXCLUDE, ...userIgnores]
386
- }
387
- ];
388
- }
389
-
390
- // src/configs/imports.ts
391
- var pluginImport = __toESM(require("eslint-plugin-import-x"), 1);
392
- function imports() {
393
- return [
394
- {
395
- name: "imports",
396
- plugins: {
397
- import: pluginImport
398
- },
399
- rules: {
400
- "import/export": "error",
401
- "import/first": "error",
402
- "import/newline-after-import": ["error", { considerComments: true, count: 1 }],
403
- "import/no-duplicates": "error",
404
- "import/no-mutable-exports": "error",
405
- "import/no-named-default": "error",
406
- "import/no-self-import": "error",
407
- "import/no-webpack-loader-syntax": "error",
408
- "import/order": "error"
409
- }
410
- }
411
- ];
412
- }
413
-
414
- // src/configs/javascript.ts
415
- var import_globals = __toESM(require("globals"), 1);
416
- var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"), 1);
417
- function javascript(options = {}) {
418
- const { isInEditor = false, overrides = {} } = options;
419
- return [
420
- {
421
- languageOptions: {
422
- ecmaVersion: 2022,
423
- globals: {
424
- ...import_globals.default.browser,
425
- ...import_globals.default.es2021,
426
- ...import_globals.default.node,
427
- document: "readonly",
428
- navigator: "readonly",
429
- window: "readonly"
430
- },
431
- parserOptions: {
432
- ecmaFeatures: {
433
- jsx: true
434
- },
435
- ecmaVersion: 2022,
436
- sourceType: "module"
437
- },
438
- sourceType: "module"
439
- },
440
- linterOptions: {
441
- reportUnusedDisableDirectives: true
442
- },
443
- name: "javascript/rules",
444
- plugins: {
445
- "unused-imports": import_eslint_plugin_unused_imports.default
446
- },
447
- rules: {
448
- "accessor-pairs": ["error", { enforceForClassMembers: true, setWithoutGet: true }],
449
- "array-callback-return": "error",
450
- "block-scoped-var": "error",
451
- camelcase: [
452
- "error",
453
- { properties: "never", ignoreDestructuring: true, ignoreGlobals: true, ignoreImports: true, allow: ["^UNSAFE_"] }
454
- ],
455
- "constructor-super": "error",
456
- "default-case-last": "error",
457
- "dot-notation": ["error", { allowKeywords: true }],
458
- eqeqeq: ["error", "smart"],
459
- "for-direction": "error",
460
- "getter-return": "error",
461
- "new-cap": ["error", { capIsNew: false, newIsCap: true, properties: true }],
462
- "no-alert": "error",
463
- "no-array-constructor": "error",
464
- "no-async-promise-executor": "error",
465
- "no-caller": "error",
466
- "no-case-declarations": "error",
467
- "no-class-assign": "error",
468
- "no-compare-neg-zero": "error",
469
- "no-cond-assign": ["error", "always"],
470
- "no-console": ["error", { allow: ["warn", "error"] }],
471
- "no-const-assign": "error",
472
- "no-constant-binary-expression": "error",
473
- "no-constant-condition": "error",
474
- "no-control-regex": "error",
475
- "no-debugger": "error",
476
- "no-delete-var": "error",
477
- "no-dupe-args": "error",
478
- "no-dupe-class-members": "error",
479
- "no-dupe-else-if": "error",
480
- "no-dupe-keys": "error",
481
- "no-duplicate-case": "error",
482
- "no-empty-character-class": "error",
483
- "no-empty-pattern": "error",
484
- "no-empty-static-block": "error",
485
- "no-empty": ["error", { allowEmptyCatch: true }],
486
- "no-eval": "error",
487
- "no-ex-assign": "error",
488
- "no-extend-native": "error",
489
- "no-extra-bind": "error",
490
- "no-extra-boolean-cast": "error",
491
- "no-fallthrough": "error",
492
- "no-func-assign": "error",
493
- "no-global-assign": "error",
494
- "no-implied-eval": "error",
495
- "no-import-assign": "error",
496
- "no-invalid-regexp": "error",
497
- "no-irregular-whitespace": "error",
498
- "no-iterator": "error",
499
- "no-labels": ["error", { allowLoop: false, allowSwitch: false }],
500
- "no-lone-blocks": "error",
501
- "no-lonely-if": "error",
502
- "no-loss-of-precision": "error",
503
- "no-misleading-character-class": "error",
504
- "no-multi-str": "error",
505
- "no-new-func": "error",
506
- "no-new-native-nonconstructor": "error",
507
- "no-new-wrappers": "error",
508
- "no-new": "error",
509
- "no-nonoctal-decimal-escape": "error",
510
- "no-obj-calls": "error",
511
- "no-octal-escape": "error",
512
- "no-octal": "error",
513
- "no-proto": "error",
514
- "no-prototype-builtins": "error",
515
- "no-redeclare": ["error", { builtinGlobals: false }],
516
- "no-regex-spaces": "error",
517
- "no-restricted-globals": [
518
- "error",
519
- { message: "Use `globalThis` instead.", name: "global" },
520
- { message: "Use `globalThis` instead.", name: "self" }
521
- ],
522
- "no-restricted-properties": [
523
- "error",
524
- { message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.", property: "__proto__" },
525
- { message: "Use `Object.defineProperty` instead.", property: "__defineGetter__" },
526
- { message: "Use `Object.defineProperty` instead.", property: "__defineSetter__" },
527
- { message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
528
- { message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
529
- ],
530
- "no-restricted-syntax": ["error", "TSEnumDeclaration[const=true]", "TSExportAssignment"],
531
- "no-return-assign": ["error", "except-parens"],
532
- "no-self-assign": ["error", { props: true }],
533
- "no-self-compare": "error",
534
- "no-sequences": "error",
535
- "no-setter-return": "error",
536
- "no-shadow-restricted-names": "error",
537
- "no-sparse-arrays": "error",
538
- "no-template-curly-in-string": "error",
539
- "no-this-before-super": "error",
540
- "no-throw-literal": "error",
541
- "no-undef-init": "error",
542
- "no-undef": "error",
543
- "no-unexpected-multiline": "error",
544
- "no-unmodified-loop-condition": "error",
545
- "no-unneeded-ternary": ["error", { defaultAssignment: false }],
546
- "no-unreachable": "error",
547
- "no-unreachable-loop": "error",
548
- "no-unsafe-finally": "error",
549
- "no-unsafe-negation": "error",
550
- "no-unsafe-optional-chaining": "error",
551
- "no-unused-expressions": [
552
- "error",
553
- {
554
- allowShortCircuit: true,
555
- allowTaggedTemplates: true,
556
- allowTernary: true
557
- }
558
- ],
559
- "no-unused-private-class-members": "error",
560
- "no-unused-vars": "off",
561
- "no-use-before-define": ["error", { classes: false, functions: false, variables: true }],
562
- "no-useless-backreference": "error",
563
- "no-useless-call": "error",
564
- "no-useless-catch": "error",
565
- "no-useless-computed-key": "error",
566
- "no-useless-constructor": "error",
567
- "no-useless-escape": "error",
568
- "no-useless-rename": "error",
569
- "no-useless-return": "error",
570
- "no-var": "error",
571
- "no-void": ["error", { allowAsStatement: true }],
572
- "no-with": "error",
573
- "object-shorthand": [
574
- "error",
575
- "always",
576
- {
577
- avoidQuotes: true,
578
- ignoreConstructors: false
579
- }
580
- ],
581
- "one-var": ["error", { initialized: "never" }],
582
- "prefer-arrow-callback": [
583
- "error",
584
- {
585
- allowNamedFunctions: false,
586
- allowUnboundThis: true
587
- }
588
- ],
589
- "prefer-const": isInEditor ? "warn" : ["error", { destructuring: "all", ignoreReadBeforeAssign: true }],
590
- "prefer-exponentiation-operator": "error",
591
- "prefer-promise-reject-errors": "error",
592
- "prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
593
- "prefer-rest-params": "error",
594
- "prefer-spread": "error",
595
- "prefer-template": "error",
596
- "require-await": "error",
597
- "require-yield": "error",
598
- "sort-imports": [
599
- "error",
600
- {
601
- allowSeparatedGroups: false,
602
- ignoreCase: false,
603
- ignoreDeclarationSort: true,
604
- ignoreMemberSort: false,
605
- memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
606
- }
607
- ],
608
- "symbol-description": "error",
609
- "unicode-bom": ["error", "never"],
610
- "unused-imports/no-unused-imports": isInEditor ? "warn" : "error",
611
- "unused-imports/no-unused-vars": [
612
- "error",
613
- {
614
- args: "after-used",
615
- argsIgnorePattern: "^_",
616
- ignoreRestSiblings: true,
617
- vars: "all",
618
- varsIgnorePattern: "^_"
619
- }
620
- ],
621
- "use-isnan": ["error", { enforceForIndexOf: true, enforceForSwitchCase: true }],
622
- "valid-typeof": ["error", { requireStringLiterals: true }],
623
- "vars-on-top": "error",
624
- yoda: ["error", "never"],
625
- ...overrides
626
- }
627
- }
628
- ];
629
- }
630
-
631
- // src/configs/jsonc.ts
632
- async function jsonc(options = {}) {
633
- const { files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC] } = options;
634
- const [pluginJsonc, parserJsonc] = await Promise.all([
635
- interopDefault(import("eslint-plugin-jsonc")),
636
- interopDefault(import("jsonc-eslint-parser"))
637
- ]);
638
- return [
639
- {
640
- name: "jsonc",
641
- files,
642
- languageOptions: {
643
- parser: parserJsonc
644
- },
645
- plugins: {
646
- jsonc: pluginJsonc
647
- },
648
- rules: {
649
- ...pluginJsonc.configs["recommended-with-jsonc"].rules,
650
- ...pluginJsonc.configs.prettier.rules
651
- }
652
- }
653
- ];
654
- }
655
-
656
- // src/configs/node.ts
657
- var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1);
658
- function node() {
659
- return [
660
- {
661
- name: "node",
662
- plugins: {
663
- n: import_eslint_plugin_n.default
664
- },
665
- rules: {
666
- "n/handle-callback-err": ["error", "^(err|error)$"],
667
- "n/no-deprecated-api": "error",
668
- "n/no-exports-assign": "error",
669
- "n/no-new-require": "error",
670
- "n/no-path-concat": "error",
671
- "n/prefer-global/buffer": ["error", "always"],
672
- "n/prefer-global/console": ["error", "always"],
673
- "n/prefer-global/process": ["error", "always"],
674
- "n/prefer-global/text-decoder": ["error", "always"],
675
- "n/prefer-global/text-encoder": ["error", "always"],
676
- "n/prefer-global/url": ["error", "always"],
677
- "n/prefer-global/url-search-params": ["error", "always"],
678
- "n/process-exit-as-throw": "error"
679
- }
680
- }
681
- ];
682
- }
683
-
684
- // src/configs/regexp.ts
685
- var import_eslint_plugin_regexp = require("eslint-plugin-regexp");
686
- function regexp(options = {}) {
687
- const config = import_eslint_plugin_regexp.configs["flat/recommended"];
688
- return [
689
- {
690
- ...config,
691
- name: "regexp",
692
- rules: {
693
- ...config.rules,
694
- "regexp/no-obscure-range": "off",
695
- ...options.overrides
696
- }
697
- }
698
- ];
699
- }
700
-
701
- // src/configs/sort.ts
702
- function sortPackageJson() {
703
- return [
704
- {
705
- files: ["**/package.json"],
706
- name: "sort/package-json",
707
- rules: {
708
- "jsonc/sort-array-values": [
709
- "error",
710
- {
711
- order: { type: "asc" },
712
- pathPattern: "^files$"
713
- }
714
- ],
715
- "jsonc/sort-keys": [
716
- "error",
717
- {
718
- order: [
719
- "publisher",
720
- "name",
721
- "displayName",
722
- "type",
723
- "version",
724
- "private",
725
- "packageManager",
726
- "description",
727
- "author",
728
- "contributors",
729
- "license",
730
- "funding",
731
- "homepage",
732
- "repository",
733
- "bugs",
734
- "keywords",
735
- "categories",
736
- "sideEffects",
737
- "exports",
738
- "main",
739
- "module",
740
- "unpkg",
741
- "jsdelivr",
742
- "types",
743
- "typesVersions",
744
- "bin",
745
- "icon",
746
- "files",
747
- "engines",
748
- "activationEvents",
749
- "contributes",
750
- "scripts",
751
- "peerDependencies",
752
- "peerDependenciesMeta",
753
- "dependencies",
754
- "optionalDependencies",
755
- "devDependencies",
756
- "pnpm",
757
- "overrides",
758
- "resolutions",
759
- "husky",
760
- "simple-git-hooks",
761
- "lint-staged",
762
- "eslintConfig",
763
- "prettier",
764
- "stylelint"
765
- ],
766
- pathPattern: "^$"
767
- },
768
- {
769
- order: { type: "asc" },
770
- pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"
771
- },
772
- {
773
- order: { type: "asc" },
774
- pathPattern: "^(?:resolutions|overrides|pnpm.overrides)$"
775
- },
776
- {
777
- order: ["types", "import", "require", "default"],
778
- pathPattern: "^exports.*$"
779
- },
780
- {
781
- order: [
782
- // client hooks only
783
- "pre-commit",
784
- "prepare-commit-msg",
785
- "commit-msg",
786
- "post-commit",
787
- "pre-rebase",
788
- "post-rewrite",
789
- "post-checkout",
790
- "post-merge",
791
- "pre-push",
792
- "pre-auto-gc"
793
- ],
794
- pathPattern: "^(?:gitHooks|husky|simple-git-hooks)$"
795
- }
796
- ]
797
- }
798
- }
799
- ];
800
- }
801
- function sortTsconfig() {
802
- return [
803
- {
804
- files: ["**/tsconfig.json", "**/tsconfig.*.json"],
805
- name: "sort/tsconfig-json",
806
- rules: {
807
- "jsonc/sort-keys": [
808
- "error",
809
- {
810
- order: ["extends", "compilerOptions", "references", "files", "include", "exclude"],
811
- pathPattern: "^$"
812
- },
813
- {
814
- order: [
815
- /* Projects */
816
- "incremental",
817
- "composite",
818
- "tsBuildInfoFile",
819
- "disableSourceOfProjectReferenceRedirect",
820
- "disableSolutionSearching",
821
- "disableReferencedProjectLoad",
822
- /* Language and Environment */
823
- "target",
824
- "jsx",
825
- "jsxFactory",
826
- "jsxFragmentFactory",
827
- "jsxImportSource",
828
- "lib",
829
- "moduleDetection",
830
- "noLib",
831
- "reactNamespace",
832
- "useDefineForClassFields",
833
- "emitDecoratorMetadata",
834
- "experimentalDecorators",
835
- /* Modules */
836
- "baseUrl",
837
- "rootDir",
838
- "rootDirs",
839
- "customConditions",
840
- "module",
841
- "moduleResolution",
842
- "moduleSuffixes",
843
- "noResolve",
844
- "paths",
845
- "resolveJsonModule",
846
- "resolvePackageJsonExports",
847
- "resolvePackageJsonImports",
848
- "typeRoots",
849
- "types",
850
- "allowArbitraryExtensions",
851
- "allowImportingTsExtensions",
852
- "allowUmdGlobalAccess",
853
- /* JavaScript Support */
854
- "allowJs",
855
- "checkJs",
856
- "maxNodeModuleJsDepth",
857
- /* Type Checking */
858
- "strict",
859
- "strictBindCallApply",
860
- "strictFunctionTypes",
861
- "strictNullChecks",
862
- "strictPropertyInitialization",
863
- "allowUnreachableCode",
864
- "allowUnusedLabels",
865
- "alwaysStrict",
866
- "exactOptionalPropertyTypes",
867
- "noFallthroughCasesInSwitch",
868
- "noImplicitAny",
869
- "noImplicitOverride",
870
- "noImplicitReturns",
871
- "noImplicitThis",
872
- "noPropertyAccessFromIndexSignature",
873
- "noUncheckedIndexedAccess",
874
- "noUnusedLocals",
875
- "noUnusedParameters",
876
- "useUnknownInCatchVariables",
877
- /* Emit */
878
- "declaration",
879
- "declarationDir",
880
- "declarationMap",
881
- "downlevelIteration",
882
- "emitBOM",
883
- "emitDeclarationOnly",
884
- "importHelpers",
885
- "importsNotUsedAsValues",
886
- "inlineSourceMap",
887
- "inlineSources",
888
- "mapRoot",
889
- "newLine",
890
- "noEmit",
891
- "noEmitHelpers",
892
- "noEmitOnError",
893
- "outDir",
894
- "outFile",
895
- "preserveConstEnums",
896
- "preserveValueImports",
897
- "removeComments",
898
- "sourceMap",
899
- "sourceRoot",
900
- "stripInternal",
901
- /* Interop Constraints */
902
- "allowSyntheticDefaultImports",
903
- "esModuleInterop",
904
- "forceConsistentCasingInFileNames",
905
- "isolatedDeclarations",
906
- "isolatedModules",
907
- "preserveSymlinks",
908
- "verbatimModuleSyntax",
909
- /* Completeness */
910
- "skipDefaultLibCheck",
911
- "skipLibCheck"
912
- ],
913
- pathPattern: "^compilerOptions$"
914
- }
915
- ]
916
- }
917
- }
918
- ];
919
- }
920
-
921
- // src/configs/test.ts
922
- var _pluginTest;
923
- async function test(options = {}) {
924
- const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
925
- const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
926
- interopDefault(import("@vitest/eslint-plugin")),
927
- interopDefault(import("eslint-plugin-no-only-tests"))
928
- ]);
929
- _pluginTest = _pluginTest || {
930
- ...pluginVitest,
931
- rules: {
932
- ...pluginVitest.rules,
933
- ...pluginNoOnlyTests.rules
934
- }
935
- };
936
- return [
937
- {
938
- files,
939
- name: "test",
940
- plugins: {
941
- test: _pluginTest
942
- },
943
- rules: {
944
- "test/consistent-test-it": ["error", { fn: "it", withinDescribe: "it" }],
945
- "test/no-identical-title": "error",
946
- "test/no-import-node-test": "error",
947
- "test/no-only-tests": isInEditor ? "warn" : "error",
948
- "test/prefer-hooks-in-order": "error",
949
- "test/prefer-lowercase-title": "error",
950
- "no-unused-expressions": "off",
951
- "n/prefer-global/process": "off",
952
- "@typescript-eslint/explicit-function-return-type": "off",
953
- ...overrides
954
- }
955
- }
956
- ];
957
- }
958
-
959
- // src/configs/typescript.ts
960
- async function typescript(options = {}) {
961
- const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, type = "app" } = options;
962
- const files = options.files ?? [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)];
963
- const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
964
- const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS];
965
- const tsconfigPath = options?.tsconfigPath;
966
- const isTypeAware = !!tsconfigPath;
967
- const [pluginTs, parserTs] = await Promise.all([
968
- interopDefault(import("@typescript-eslint/eslint-plugin")),
969
- interopDefault(import("@typescript-eslint/parser"))
970
- ]);
971
- function makeParser(typeAware, files2, ignores2) {
972
- return {
973
- files: files2,
974
- ...ignores2 ? { ignores: ignores2 } : {},
975
- languageOptions: {
976
- parser: parserTs,
977
- parserOptions: {
978
- extraFileExtensions: componentExts.map((ext) => `.${ext}`),
979
- sourceType: "module",
980
- ...typeAware ? {
981
- projectService: {
982
- allowDefaultProject: ["./*.js"],
983
- defaultProject: tsconfigPath
984
- },
985
- tsconfigRootDir: process.cwd()
986
- } : {},
987
- ...parserOptions
988
- }
989
- },
990
- name: `typescript/${typeAware ? "type-aware-parser" : "parser"}`
991
- };
992
- }
993
- return [
994
- {
995
- // Install the plugins without globs, so they can be configured separately.
996
- name: "typescript/setup",
997
- plugins: {
998
- "@typescript-eslint": pluginTs
999
- }
1000
- },
1001
- // assign type-aware parser for type-aware files and type-unaware parser for the rest
1002
- ...isTypeAware ? [makeParser(false, files), makeParser(true, filesTypeAware, ignoresTypeAware)] : [makeParser(false, files)],
1003
- {
1004
- files,
1005
- name: "typescript/rules",
1006
- rules: {
1007
- ...pluginTs.configs["eslint-recommended"].overrides[0].rules,
1008
- ...pluginTs.configs.strict.rules,
1009
- "@typescript-eslint/consistent-type-assertions": "error",
1010
- "@typescript-eslint/consistent-type-definitions": "off",
1011
- "@typescript-eslint/consistent-type-imports": [
1012
- "error",
1013
- { disallowTypeAnnotations: false, prefer: "type-imports", fixStyle: "inline-type-imports" }
1014
- ],
1015
- "@typescript-eslint/method-signature-style": "error",
1016
- "@typescript-eslint/no-dynamic-delete": "off",
1017
- "@typescript-eslint/no-explicit-any": "off",
1018
- "@typescript-eslint/no-import-type-side-effects": "error",
1019
- "@typescript-eslint/no-invalid-void-type": "off",
1020
- "@typescript-eslint/no-non-null-assertion": "off",
1021
- "@typescript-eslint/no-require-imports": "error",
1022
- "@typescript-eslint/triple-slash-reference": "off",
1023
- "@typescript-eslint/unified-signatures": "off",
1024
- // handled by unused-imports/no-unused-imports
1025
- "@typescript-eslint/no-unused-vars": "off",
1026
- "no-dupe-class-members": "off",
1027
- "@typescript-eslint/no-dupe-class-members": "error",
1028
- "no-invalid-this": "off",
1029
- "@typescript-eslint/no-invalid-this": "error",
1030
- "no-redeclare": "off",
1031
- "@typescript-eslint/no-redeclare": ["error", { builtinGlobals: false }],
1032
- "no-unused-expressions": "off",
1033
- "@typescript-eslint/no-unused-expressions": ["error", { allowShortCircuit: true, allowTernary: true, allowTaggedTemplates: true }],
1034
- "no-use-before-define": "off",
1035
- "@typescript-eslint/no-use-before-define": "error",
1036
- ...type === "lib" ? {
1037
- "@typescript-eslint/explicit-function-return-type": [
1038
- "error",
1039
- {
1040
- allowExpressions: true,
1041
- allowHigherOrderFunctions: true,
1042
- allowIIFEs: true
1043
- }
1044
- ]
1045
- } : {},
1046
- ...overrides
1047
- }
1048
- },
1049
- ...isTypeAware ? [
1050
- {
1051
- files: filesTypeAware,
1052
- ignores: ignoresTypeAware,
1053
- name: "typescript/rules-type-aware",
1054
- rules: {
1055
- ...tsconfigPath ? {
1056
- ...pluginTs.configs["recommended-type-checked-only"].rules,
1057
- "@typescript-eslint/no-confusing-void-expression": "error",
1058
- "@typescript-eslint/promise-function-async": "error",
1059
- "@typescript-eslint/restrict-template-expressions": "off",
1060
- "@typescript-eslint/strict-boolean-expressions": "off",
1061
- "dot-notation": "off",
1062
- "@typescript-eslint/dot-notation": ["error", { allowKeywords: true }],
1063
- "no-throw-literal": "off",
1064
- "@typescript-eslint/only-throw-error": "error"
1065
- } : {},
1066
- ...overridesTypeAware
1067
- }
1068
- }
1069
- ] : []
1070
- ];
1071
- }
1072
-
1073
- // src/configs/unicorn.ts
1074
- var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
1075
- function unicorn() {
1076
- return [
1077
- {
1078
- name: "unicorn",
1079
- plugins: {
1080
- unicorn: import_eslint_plugin_unicorn.default
1081
- },
1082
- rules: {
1083
- ...import_eslint_plugin_unicorn.default.configs["flat/recommended"].rules,
1084
- "unicorn/consistent-function-scoping": "off",
1085
- "unicorn/filename-case": "off",
1086
- "unicorn/import-style": "off",
1087
- "unicorn/no-array-callback-reference": "off",
1088
- "unicorn/no-null": "off",
1089
- "unicorn/prefer-string-replace-all": "off",
1090
- "unicorn/prefer-structured-clone": "off",
1091
- "unicorn/prefer-top-level-await": "off",
1092
- "unicorn/prevent-abbreviations": "off"
1093
- }
1094
- }
1095
- ];
1096
- }
1097
-
1098
- // src/configs/unocss.ts
1099
- async function unocss() {
1100
- const pluginUnoCSS = await interopDefault(import("@unocss/eslint-plugin"));
1101
- return [
1102
- {
1103
- ...pluginUnoCSS.configs.flat,
1104
- name: "unocss"
1105
- }
1106
- ];
1107
- }
1108
-
1109
- // src/configs/vue.ts
1110
- async function vue(options = {}) {
1111
- const { files = [GLOB_VUE], overrides = {}, vueVersion = 3 } = options;
1112
- const [pluginVue, parserVue] = await Promise.all([
1113
- interopDefault(import("eslint-plugin-vue")),
1114
- interopDefault(import("vue-eslint-parser"))
1115
- ]);
1116
- return [
1117
- {
1118
- files,
1119
- languageOptions: {
1120
- parser: parserVue,
1121
- globals: {
1122
- computed: "readonly",
1123
- defineEmits: "readonly",
1124
- defineExpose: "readonly",
1125
- defineProps: "readonly",
1126
- onMounted: "readonly",
1127
- onUnmounted: "readonly",
1128
- reactive: "readonly",
1129
- ref: "readonly",
1130
- shallowReactive: "readonly",
1131
- shallowRef: "readonly",
1132
- toRef: "readonly",
1133
- toRefs: "readonly",
1134
- watch: "readonly",
1135
- watchEffect: "readonly"
1136
- },
1137
- parserOptions: {
1138
- ecmaFeatures: {
1139
- jsx: true
1140
- },
1141
- extraFileExtensions: [".vue"],
1142
- parser: options.typescript ? await interopDefault(import("@typescript-eslint/parser")) : null,
1143
- sourceType: "module"
1144
- }
1145
- },
1146
- name: "vue",
1147
- processor: pluginVue.processors[".vue"],
1148
- plugins: {
1149
- vue: pluginVue
1150
- },
1151
- rules: {
1152
- ...pluginVue.configs.base.rules,
1153
- ...vueVersion === 2 ? {
1154
- ...pluginVue.configs.essential.rules,
1155
- ...pluginVue.configs["strongly-recommended"].rules,
1156
- ...pluginVue.configs.recommended.rules
1157
- } : {
1158
- ...pluginVue.configs["vue3-essential"].rules,
1159
- ...pluginVue.configs["vue3-strongly-recommended"].rules,
1160
- ...pluginVue.configs["vue3-recommended"].rules
1161
- },
1162
- "vue/component-name-in-template-casing": ["error", "PascalCase"],
1163
- "vue/component-options-name-casing": ["error", "PascalCase"],
1164
- "vue/custom-event-name-casing": ["error", "camelCase"],
1165
- "vue/define-macros-order": [
1166
- "error",
1167
- {
1168
- order: ["defineOptions", "defineModel", "defineProps", "defineEmits", "defineSlots"]
1169
- }
1170
- ],
1171
- "vue/dot-notation": "error",
1172
- "vue/eqeqeq": ["error", "smart"],
1173
- "vue/html-comment-content-spacing": ["error", "always", { exceptions: ["-"] }],
1174
- "vue/no-constant-condition": "error",
1175
- "vue/no-empty-pattern": "error",
1176
- "vue/no-irregular-whitespace": "error",
1177
- "vue/no-loss-of-precision": "error",
1178
- "vue/no-restricted-syntax": ["error", "DebuggerStatement", "LabeledStatement", "WithStatement"],
1179
- "vue/no-restricted-v-bind": ["error", "/^v-/"],
1180
- "vue/no-sparse-arrays": "error",
1181
- "vue/no-unused-refs": "error",
1182
- "vue/no-useless-v-bind": "error",
1183
- "vue/no-v-html": "off",
1184
- "vue/object-shorthand": ["error", "always", { avoidQuotes: true, ignoreConstructors: false }],
1185
- "vue/prefer-separate-static-class": "error",
1186
- "vue/prefer-template": "error",
1187
- "vue/padding-line-between-blocks": ["error", "always"],
1188
- "vue/component-tags-order": "off",
1189
- "@typescript-eslint/explicit-function-return-type": "off",
1190
- ...overrides
1191
- }
1192
- }
1193
- ];
1194
- }
1195
-
1196
- // src/factory.ts
1197
- var import_local_pkg = require("local-pkg");
1198
- var import_eslint_flat_config_utils = require("eslint-flat-config-utils");
1199
- var flatConfigProps = [
1200
- "name",
1201
- "languageOptions",
1202
- "linterOptions",
1203
- "processor",
1204
- "plugins",
1205
- "rules",
1206
- "settings"
1207
- ];
1208
- var VuePackages = ["vue", "nuxt", "vitepress", "@slidev/cli"];
1209
- var factoryConfig = function(options = {}, ...userConfigs) {
1210
- const {
1211
- componentExts = [],
1212
- formatters: enableFormatters = true,
1213
- gitignore: enableGitignore = true,
1214
- jsonc: enableJSONC = true,
1215
- regexp: enableRegexp = true,
1216
- test: enableTest = true,
1217
- typescript: enableTypeScript = (0, import_local_pkg.isPackageExists)("typescript"),
1218
- unocss: enableUnoCSS = (0, import_local_pkg.isPackageExists)("unocss"),
1219
- vue: enableVue = VuePackages.some((i) => (0, import_local_pkg.isPackageExists)(i))
1220
- } = options;
1221
- let isInEditor = options.isInEditor;
1222
- if (isInEditor == null) {
1223
- isInEditor = isInEditorEnv();
1224
- if (isInEditor) console.log("[@cany748/eslint-config] Detected running in editor, some rules are disabled.");
1225
- }
1226
- const configs2 = [];
1227
- if (enableGitignore) {
1228
- if (typeof enableGitignore === "boolean") {
1229
- configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({ strict: false })]));
1230
- } else {
1231
- configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r(enableGitignore)]));
1232
- }
1233
- }
1234
- configs2.push(
1235
- comments(),
1236
- ignores(options.ignores),
1237
- imports(),
1238
- javascript({
1239
- isInEditor,
1240
- overrides: options.javascript?.overrides
1241
- }),
1242
- node(),
1243
- unicorn()
1244
- );
1245
- if (enableVue) {
1246
- componentExts.push("vue");
1247
- }
1248
- if (enableTypeScript) {
1249
- configs2.push(
1250
- typescript({
1251
- ...typeof enableTypeScript === "boolean" ? {} : enableTypeScript || {},
1252
- componentExts,
1253
- type: options.type
1254
- })
1255
- );
1256
- }
1257
- if (enableRegexp) {
1258
- configs2.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
1259
- }
1260
- if (enableTest) {
1261
- configs2.push(
1262
- test({
1263
- isInEditor,
1264
- overrides: typeof enableTest === "boolean" ? {} : enableTest?.overrides
1265
- })
1266
- );
1267
- }
1268
- if (enableVue) {
1269
- configs2.push(
1270
- vue({
1271
- ...typeof enableVue === "boolean" ? {} : enableVue || {},
1272
- typescript: !!enableTypeScript
1273
- })
1274
- );
1275
- }
1276
- if (enableUnoCSS) {
1277
- configs2.push(unocss());
1278
- }
1279
- if (enableJSONC) {
1280
- configs2.push(jsonc(typeof enableJSONC === "boolean" ? {} : enableJSONC), sortPackageJson(), sortTsconfig());
1281
- }
1282
- if (enableFormatters) {
1283
- configs2.push(formatters(enableFormatters));
1284
- }
1285
- configs2.push(disables());
1286
- if ("files" in options) {
1287
- throw new Error(
1288
- '[@cany748/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.'
1289
- );
1290
- }
1291
- const fusedConfig = flatConfigProps.reduce((acc, key) => {
1292
- if (key in options) acc[key] = options[key];
1293
- return acc;
1294
- }, {});
1295
- if (Object.keys(fusedConfig).length > 0) configs2.push([fusedConfig]);
1296
- let composer = new import_eslint_flat_config_utils.FlatConfigComposer();
1297
- composer = composer.append(...configs2, ...userConfigs);
1298
- return composer;
1299
- };
1300
- // Annotate the CommonJS export names for ESM import in node:
1301
- 0 && (module.exports = {
1302
- GLOB_ALL_SRC,
1303
- GLOB_ASTRO,
1304
- GLOB_ASTRO_TS,
1305
- GLOB_CSS,
1306
- GLOB_EXCLUDE,
1307
- GLOB_GRAPHQL,
1308
- GLOB_HTML,
1309
- GLOB_JS,
1310
- GLOB_JSON,
1311
- GLOB_JSON5,
1312
- GLOB_JSONC,
1313
- GLOB_JSX,
1314
- GLOB_LESS,
1315
- GLOB_MARKDOWN,
1316
- GLOB_MARKDOWN_CODE,
1317
- GLOB_MARKDOWN_IN_MARKDOWN,
1318
- GLOB_POSTCSS,
1319
- GLOB_SCSS,
1320
- GLOB_SRC,
1321
- GLOB_SRC_EXT,
1322
- GLOB_STYLE,
1323
- GLOB_SVELTE,
1324
- GLOB_TESTS,
1325
- GLOB_TOML,
1326
- GLOB_TS,
1327
- GLOB_TSX,
1328
- GLOB_VUE,
1329
- GLOB_XML,
1330
- GLOB_YAML,
1331
- combine,
1332
- comments,
1333
- disables,
1334
- factoryConfig,
1335
- formatters,
1336
- ignores,
1337
- imports,
1338
- interopDefault,
1339
- isInEditorEnv,
1340
- isInGitHooksOrLintStaged,
1341
- javascript,
1342
- jsonc,
1343
- node,
1344
- parserPlain,
1345
- regexp,
1346
- sortPackageJson,
1347
- sortTsconfig,
1348
- test,
1349
- toArray,
1350
- typescript,
1351
- unicorn,
1352
- unocss,
1353
- vue
1354
- });