@ntnyq/eslint-config 4.0.0-beta.11 → 4.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/{index.d.ts → index.d.mts} +400 -163
- package/dist/{index.js → index.mjs} +355 -488
- package/package.json +19 -22
|
@@ -1,19 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
2
|
+
import { mergeProcessors, processorPassThrough } from 'eslint-merge-processors';
|
|
3
|
+
export { mergeProcessors, processorPassThrough } from 'eslint-merge-processors';
|
|
4
|
+
import { plugin, parser, configs } from 'typescript-eslint';
|
|
5
|
+
export { configs as configsTypeScript, parser as parserTypeScript, plugin as pluginTypeScript } from 'typescript-eslint';
|
|
6
|
+
import * as parserVue from 'vue-eslint-parser';
|
|
7
|
+
export { parserVue };
|
|
8
|
+
import * as parserToml from 'toml-eslint-parser';
|
|
9
|
+
export { parserToml };
|
|
10
|
+
import * as parserYaml from 'yaml-eslint-parser';
|
|
11
|
+
export { parserYaml };
|
|
12
|
+
import * as parserJsonc from 'jsonc-eslint-parser';
|
|
13
|
+
export { parserJsonc };
|
|
14
|
+
import * as pluginDepend from 'eslint-plugin-depend';
|
|
15
|
+
export { pluginDepend };
|
|
16
|
+
import * as pluginRegexp from 'eslint-plugin-regexp';
|
|
17
|
+
export { pluginRegexp };
|
|
18
|
+
import pluginNode from 'eslint-plugin-n';
|
|
19
|
+
export { default as pluginNode } from 'eslint-plugin-n';
|
|
20
|
+
import pluginVue from 'eslint-plugin-vue';
|
|
21
|
+
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
22
|
+
import pluginYml from 'eslint-plugin-yml';
|
|
23
|
+
export { default as pluginYml } from 'eslint-plugin-yml';
|
|
24
|
+
import pluginPnpm from 'eslint-plugin-pnpm';
|
|
25
|
+
export { default as pluginPnpm } from 'eslint-plugin-pnpm';
|
|
26
|
+
import pluginSvgo from 'eslint-plugin-svgo';
|
|
27
|
+
export { default as pluginSvgo } from 'eslint-plugin-svgo';
|
|
28
|
+
import pluginToml from 'eslint-plugin-toml';
|
|
29
|
+
export { default as pluginToml } from 'eslint-plugin-toml';
|
|
30
|
+
import pluginMarkdown from '@eslint/markdown';
|
|
31
|
+
export { default as pluginMarkdown } from '@eslint/markdown';
|
|
32
|
+
import pluginAntfu from 'eslint-plugin-antfu';
|
|
33
|
+
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
34
|
+
import pluginJsdoc from 'eslint-plugin-jsdoc';
|
|
35
|
+
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
36
|
+
import pluginJsonc from 'eslint-plugin-jsonc';
|
|
37
|
+
export { default as pluginJsonc } from 'eslint-plugin-jsonc';
|
|
38
|
+
import pluginNtnyq from 'eslint-plugin-ntnyq';
|
|
39
|
+
export { default as pluginNtnyq } from 'eslint-plugin-ntnyq';
|
|
40
|
+
import pluginPinia from 'eslint-plugin-pinia';
|
|
41
|
+
export { default as pluginPinia } from 'eslint-plugin-pinia';
|
|
42
|
+
import pluginFormat from 'eslint-plugin-format';
|
|
43
|
+
export { default as pluginFormat } from 'eslint-plugin-format';
|
|
44
|
+
import pluginUnoCSS from '@unocss/eslint-plugin';
|
|
45
|
+
export { default as pluginUnoCSS } from '@unocss/eslint-plugin';
|
|
46
|
+
import pluginVitest from '@vitest/eslint-plugin';
|
|
47
|
+
export { default as pluginVitest } from '@vitest/eslint-plugin';
|
|
48
|
+
import pluginUnicorn from 'eslint-plugin-unicorn';
|
|
49
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
50
|
+
import pluginImportX from 'eslint-plugin-import-x';
|
|
51
|
+
export { default as pluginImportX } from 'eslint-plugin-import-x';
|
|
52
|
+
import pluginPrettier from 'eslint-plugin-prettier';
|
|
53
|
+
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
54
|
+
import pluginDeMorgan from 'eslint-plugin-de-morgan';
|
|
55
|
+
export { default as pluginDeMorgan } from 'eslint-plugin-de-morgan';
|
|
56
|
+
import pluginNoOnlyTests from 'eslint-plugin-no-only-tests';
|
|
57
|
+
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
58
|
+
import { createConfig } from 'eslint-plugin-github-action';
|
|
59
|
+
export { default as pluginGitHubAction } from 'eslint-plugin-github-action';
|
|
60
|
+
import pluginPerfectionist from 'eslint-plugin-perfectionist';
|
|
61
|
+
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
62
|
+
import pluginUnusedImports from 'eslint-plugin-unused-imports';
|
|
63
|
+
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
64
|
+
import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';
|
|
65
|
+
export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
|
|
66
|
+
import processorVueBlocks from 'eslint-processor-vue-blocks';
|
|
67
|
+
export { default as processorVueBlocks } from 'eslint-processor-vue-blocks';
|
|
68
|
+
import { resolve } from 'node:path';
|
|
69
|
+
import process from 'node:process';
|
|
70
|
+
import { isPackageExists } from 'local-pkg';
|
|
71
|
+
import { fileURLToPath } from 'node:url';
|
|
72
|
+
import { defineCommand, builtinCommands } from 'eslint-plugin-command/commands';
|
|
73
|
+
import createCommandConfig from 'eslint-plugin-command/config';
|
|
74
|
+
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';
|
|
75
|
+
import globals from 'globals';
|
|
76
|
+
import createGitIgnoreConfig from 'eslint-config-flat-gitignore';
|
|
77
|
+
import jsConfig from '@eslint/js';
|
|
3
78
|
|
|
4
|
-
|
|
5
|
-
import { mergeProcessors as mergeProcessors2 } from "eslint-merge-processors";
|
|
6
|
-
|
|
7
|
-
// src/eslint/configs.ts
|
|
8
|
-
import { configs } from "typescript-eslint";
|
|
9
|
-
|
|
10
|
-
// src/eslint/parsers.ts
|
|
11
|
-
import * as parserVue from "vue-eslint-parser";
|
|
12
|
-
import * as parserToml from "toml-eslint-parser";
|
|
13
|
-
import * as parserYaml from "yaml-eslint-parser";
|
|
14
|
-
import * as parserJsonc from "jsonc-eslint-parser";
|
|
15
|
-
import { parser } from "typescript-eslint";
|
|
16
|
-
var parserPlain = {
|
|
79
|
+
const parserPlain = {
|
|
17
80
|
meta: {
|
|
18
81
|
name: "plain-eslint-parser"
|
|
19
82
|
},
|
|
@@ -34,86 +97,56 @@ var parserPlain = {
|
|
|
34
97
|
})
|
|
35
98
|
};
|
|
36
99
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
import { plugin } from "typescript-eslint";
|
|
53
|
-
import { default as default14 } from "@unocss/eslint-plugin";
|
|
54
|
-
import { default as default15 } from "@vitest/eslint-plugin";
|
|
55
|
-
import { default as default16 } from "eslint-plugin-unicorn";
|
|
56
|
-
import { default as default17 } from "eslint-plugin-import-x";
|
|
57
|
-
import { default as default18 } from "eslint-plugin-prettier";
|
|
58
|
-
import { default as default19 } from "eslint-plugin-de-morgan";
|
|
59
|
-
import { default as default20 } from "eslint-plugin-no-only-tests";
|
|
60
|
-
import { default as default21 } from "eslint-plugin-github-action";
|
|
61
|
-
import { default as default22 } from "eslint-plugin-perfectionist";
|
|
62
|
-
import { default as default23 } from "eslint-plugin-unused-imports";
|
|
63
|
-
import { default as default24 } from "@eslint-community/eslint-plugin-eslint-comments";
|
|
64
|
-
|
|
65
|
-
// src/eslint/resolvers.ts
|
|
66
|
-
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
67
|
-
var createNodeResolver = default17.createNodeResolver;
|
|
68
|
-
|
|
69
|
-
// src/eslint/processors.ts
|
|
70
|
-
import { default as default25 } from "eslint-processor-vue-blocks";
|
|
71
|
-
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
72
|
-
|
|
73
|
-
// src/globs.ts
|
|
74
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
75
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
76
|
-
var GLOB_JS = "**/*.?([cm])js";
|
|
77
|
-
var GLOB_JSX = `${GLOB_JS}x`;
|
|
78
|
-
var GLOB_JSX_ONLY = "**/*.jsx";
|
|
79
|
-
var GLOB_TS = "**/*.?([cm])ts";
|
|
80
|
-
var GLOB_TSX = `${GLOB_TS}x`;
|
|
81
|
-
var GLOB_TSX_ONLY = "**/*.tsx";
|
|
82
|
-
var GLOB_DTS = "**/*.d.?([cm])ts";
|
|
83
|
-
var GLOB_TYPES = [GLOB_DTS, `**/types/${GLOB_TS}`, `**/types.ts`];
|
|
84
|
-
var GLOB_TYPE_TEST = [
|
|
100
|
+
const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
101
|
+
const GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
102
|
+
const GLOB_JS = "**/*.?([cm])js";
|
|
103
|
+
const GLOB_JSX = `${GLOB_JS}x`;
|
|
104
|
+
const GLOB_JSX_ONLY = "**/*.jsx";
|
|
105
|
+
const GLOB_TS = "**/*.?([cm])ts";
|
|
106
|
+
const GLOB_TSX = `${GLOB_TS}x`;
|
|
107
|
+
const GLOB_TSX_ONLY = "**/*.tsx";
|
|
108
|
+
const GLOB_DTS = "**/*.d.?([cm])ts";
|
|
109
|
+
const GLOB_TYPES = [
|
|
110
|
+
GLOB_DTS,
|
|
111
|
+
`**/types/${GLOB_TS}`,
|
|
112
|
+
`**/types.ts`
|
|
113
|
+
];
|
|
114
|
+
const GLOB_TYPE_TEST = [
|
|
85
115
|
`**/*.test-d.${GLOB_SRC_EXT}`,
|
|
86
116
|
`**/*.spec-d.${GLOB_SRC_EXT}`
|
|
87
117
|
];
|
|
88
|
-
|
|
118
|
+
const GLOB_TEST = [
|
|
89
119
|
`**/*.test.${GLOB_SRC_EXT}`,
|
|
90
120
|
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
91
121
|
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
92
122
|
`**/*.benchmark.${GLOB_SRC_EXT}`,
|
|
93
123
|
...GLOB_TYPE_TEST
|
|
94
124
|
];
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
126
|
+
const GLOB_CSS = "**/*.css";
|
|
127
|
+
const GLOB_LESS = "**/*.less";
|
|
128
|
+
const GLOB_SCSS = "**/*.scss";
|
|
129
|
+
const GLOB_POSTCSS = "**/*.{p,post}css";
|
|
130
|
+
const GLOB_JSON = "**/*.json";
|
|
131
|
+
const GLOB_JSON5 = "**/*.json5";
|
|
132
|
+
const GLOB_JSONC = "**/*.jsonc";
|
|
133
|
+
const GLOB_PACKAGE_JSON = "**/package.json";
|
|
134
|
+
const GLOB_TSCONFIG_JSON = [
|
|
135
|
+
"**/tsconfig.json",
|
|
136
|
+
"**/tsconfig.*.json"
|
|
137
|
+
];
|
|
138
|
+
const GLOB_SVG = "**/*.svg";
|
|
139
|
+
const GLOB_VUE = "**/*.vue";
|
|
140
|
+
const GLOB_YAML = "**/*.y?(a)ml";
|
|
141
|
+
const GLOB_TOML = "**/*.toml";
|
|
142
|
+
const GLOB_HTML = "**/*.htm?(l)";
|
|
143
|
+
const GLOB_ASTRO = "**/*.astro";
|
|
144
|
+
const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
145
|
+
const GLOB_SVELTE = "**/*.svelte";
|
|
146
|
+
const GLOB_MARKDOWN = "**/*.md";
|
|
147
|
+
const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
148
|
+
const GLOB_MARKDOWN_NESTED = `${GLOB_MARKDOWN}/*.md`;
|
|
149
|
+
const GLOB_ALL_SRC = [
|
|
117
150
|
GLOB_SRC,
|
|
118
151
|
GLOB_STYLE,
|
|
119
152
|
GLOB_JSON,
|
|
@@ -124,18 +157,18 @@ var GLOB_ALL_SRC = [
|
|
|
124
157
|
GLOB_HTML,
|
|
125
158
|
GLOB_MARKDOWN
|
|
126
159
|
];
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
160
|
+
const GLOB_PINIA_STORE = `**/store?(s)/*.${GLOB_SRC_EXT}`;
|
|
161
|
+
const GLOB_GITHUB_ACTION = "**/.github/workflows/*.y?(a)ml";
|
|
162
|
+
const GLOB_NODE_MODULES = "**/node_modules/**";
|
|
163
|
+
const GLOB_DIST = "**/dist/**";
|
|
164
|
+
const GLOB_LOCKFILE = [
|
|
132
165
|
"**/package-lock.json",
|
|
133
166
|
"**/yarn.lock",
|
|
134
167
|
"**/pnpm-lock.yaml",
|
|
135
168
|
"**/bun.lock?(b)",
|
|
136
169
|
"**/deno.lock"
|
|
137
170
|
];
|
|
138
|
-
|
|
171
|
+
const GLOB_EXCLUDE = [
|
|
139
172
|
GLOB_NODE_MODULES,
|
|
140
173
|
GLOB_DIST,
|
|
141
174
|
...GLOB_LOCKFILE,
|
|
@@ -184,14 +217,13 @@ var GLOB_EXCLUDE = [
|
|
|
184
217
|
"**/src-tauri/target"
|
|
185
218
|
];
|
|
186
219
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
...
|
|
190
|
-
...
|
|
191
|
-
...
|
|
192
|
-
...default3.configs.recommended.rules
|
|
220
|
+
const sharedRules = {
|
|
221
|
+
...pluginVue.configs.base.rules,
|
|
222
|
+
...pluginVue.configs.essential.rules,
|
|
223
|
+
...pluginVue.configs["strongly-recommended"].rules,
|
|
224
|
+
...pluginVue.configs.recommended.rules
|
|
193
225
|
};
|
|
194
|
-
|
|
226
|
+
const disabledRules$1 = {
|
|
195
227
|
"vue/multi-word-component-names": "off",
|
|
196
228
|
"vue/no-setup-props-reactivity-loss": "off",
|
|
197
229
|
"vue/no-v-html": "off",
|
|
@@ -199,7 +231,7 @@ var disabledRules = {
|
|
|
199
231
|
"vue/require-default-prop": "off",
|
|
200
232
|
"vue/require-prop-types": "off"
|
|
201
233
|
};
|
|
202
|
-
|
|
234
|
+
const extensionRules = {
|
|
203
235
|
"vue/array-bracket-spacing": ["error", "never"],
|
|
204
236
|
"vue/arrow-spacing": ["error", { after: true, before: true }],
|
|
205
237
|
"vue/block-spacing": ["error", "always"],
|
|
@@ -259,7 +291,7 @@ var extensionRules = {
|
|
|
259
291
|
],
|
|
260
292
|
"vue/template-curly-spacing": "error"
|
|
261
293
|
};
|
|
262
|
-
|
|
294
|
+
const unCategorizedRules = {
|
|
263
295
|
"vue/block-order": [
|
|
264
296
|
"error",
|
|
265
297
|
{
|
|
@@ -388,18 +420,18 @@ var unCategorizedRules = {
|
|
|
388
420
|
"vue/v-for-delimiter-style": ["error", "in"],
|
|
389
421
|
"vue/valid-define-options": "error"
|
|
390
422
|
};
|
|
391
|
-
|
|
423
|
+
const configVue = (options = {}) => {
|
|
392
424
|
const {
|
|
393
425
|
files = [GLOB_VUE],
|
|
394
426
|
extraFileExtensions = []
|
|
395
427
|
} = options;
|
|
396
428
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
397
429
|
function getVueProcessor() {
|
|
398
|
-
const processorVueSFC =
|
|
430
|
+
const processorVueSFC = pluginVue.processors[".vue"];
|
|
399
431
|
if (!sfcBlocks) return processorVueSFC;
|
|
400
|
-
return
|
|
432
|
+
return mergeProcessors([
|
|
401
433
|
processorVueSFC,
|
|
402
|
-
|
|
434
|
+
processorVueBlocks({
|
|
403
435
|
...sfcBlocks,
|
|
404
436
|
blocks: {
|
|
405
437
|
styles: true,
|
|
@@ -413,7 +445,7 @@ var configVue = (options = {}) => {
|
|
|
413
445
|
name: "ntnyq/vue/setup",
|
|
414
446
|
plugins: {
|
|
415
447
|
"@typescript-eslint": plugin,
|
|
416
|
-
vue:
|
|
448
|
+
vue: pluginVue
|
|
417
449
|
}
|
|
418
450
|
},
|
|
419
451
|
{
|
|
@@ -425,7 +457,7 @@ var configVue = (options = {}) => {
|
|
|
425
457
|
parserOptions: {
|
|
426
458
|
ecmaVersion: "latest",
|
|
427
459
|
extraFileExtensions,
|
|
428
|
-
parser,
|
|
460
|
+
parser: parser,
|
|
429
461
|
sourceType: "module",
|
|
430
462
|
ecmaFeatures: {
|
|
431
463
|
jsx: true
|
|
@@ -534,7 +566,7 @@ var configVue = (options = {}) => {
|
|
|
534
566
|
],
|
|
535
567
|
"vue/prop-name-casing": ["error", "camelCase"],
|
|
536
568
|
"vue/this-in-template": ["error", "never"],
|
|
537
|
-
...disabledRules,
|
|
569
|
+
...disabledRules$1,
|
|
538
570
|
...extensionRules,
|
|
539
571
|
...unCategorizedRules,
|
|
540
572
|
// Overrides rules
|
|
@@ -544,22 +576,21 @@ var configVue = (options = {}) => {
|
|
|
544
576
|
];
|
|
545
577
|
};
|
|
546
578
|
|
|
547
|
-
|
|
548
|
-
var configYml = (options = {}) => {
|
|
579
|
+
const configYml = (options = {}) => {
|
|
549
580
|
const { files = [GLOB_YAML] } = options;
|
|
550
581
|
return [
|
|
551
582
|
{
|
|
552
583
|
name: "ntnyq/yml",
|
|
553
584
|
files,
|
|
554
585
|
plugins: {
|
|
555
|
-
yml:
|
|
586
|
+
yml: pluginYml
|
|
556
587
|
},
|
|
557
588
|
languageOptions: {
|
|
558
589
|
parser: parserYaml
|
|
559
590
|
},
|
|
560
591
|
rules: {
|
|
561
|
-
...
|
|
562
|
-
...
|
|
592
|
+
...pluginYml.configs.standard.rules,
|
|
593
|
+
...pluginYml.configs.prettier.rules,
|
|
563
594
|
"yml/no-empty-mapping-value": "off",
|
|
564
595
|
"yml/quotes": ["error", { avoidEscape: false, prefer: "single" }],
|
|
565
596
|
// Overrides rules
|
|
@@ -569,12 +600,11 @@ var configYml = (options = {}) => {
|
|
|
569
600
|
];
|
|
570
601
|
};
|
|
571
602
|
|
|
572
|
-
|
|
573
|
-
var configNode = (options = {}) => [
|
|
603
|
+
const configNode = (options = {}) => [
|
|
574
604
|
{
|
|
575
605
|
name: "ntnyq/node",
|
|
576
606
|
plugins: {
|
|
577
|
-
node:
|
|
607
|
+
node: pluginNode
|
|
578
608
|
},
|
|
579
609
|
rules: {
|
|
580
610
|
"node/handle-callback-err": ["error", "^(err|error)$"],
|
|
@@ -591,9 +621,36 @@ var configNode = (options = {}) => [
|
|
|
591
621
|
}
|
|
592
622
|
];
|
|
593
623
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
624
|
+
const configPnpm = (options = {}) => {
|
|
625
|
+
const { files = [GLOB_PACKAGE_JSON] } = options;
|
|
626
|
+
return [
|
|
627
|
+
{
|
|
628
|
+
name: "ntnyq/pnpm",
|
|
629
|
+
files,
|
|
630
|
+
plugins: {
|
|
631
|
+
pnpm: pluginPnpm
|
|
632
|
+
},
|
|
633
|
+
languageOptions: {
|
|
634
|
+
parser: parserJsonc
|
|
635
|
+
},
|
|
636
|
+
rules: {
|
|
637
|
+
"pnpm/enforce-catalog": [
|
|
638
|
+
"error",
|
|
639
|
+
{
|
|
640
|
+
autofix: true
|
|
641
|
+
}
|
|
642
|
+
],
|
|
643
|
+
"pnpm/prefer-workspace-settings": "error",
|
|
644
|
+
"pnpm/valid-catalog": "error",
|
|
645
|
+
// Overrides rules
|
|
646
|
+
...options.overrides
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
];
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
const configSort = (options = {}) => {
|
|
653
|
+
const configs = [];
|
|
597
654
|
const {
|
|
598
655
|
additionalJsonFiles = [],
|
|
599
656
|
additionalYamlFiles = [],
|
|
@@ -603,7 +660,7 @@ var configSort = (options = {}) => {
|
|
|
603
660
|
tsconfig: enableSortTsconfig = true
|
|
604
661
|
} = options;
|
|
605
662
|
if (enableSortTsconfig) {
|
|
606
|
-
|
|
663
|
+
configs.push({
|
|
607
664
|
name: "ntnyq/sort/tsconfig",
|
|
608
665
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
609
666
|
rules: {
|
|
@@ -740,7 +797,7 @@ var configSort = (options = {}) => {
|
|
|
740
797
|
});
|
|
741
798
|
}
|
|
742
799
|
if (enableSortPackageJson) {
|
|
743
|
-
|
|
800
|
+
configs.push({
|
|
744
801
|
name: "ntnyq/sort/package-json",
|
|
745
802
|
files: ["**/package.json"],
|
|
746
803
|
rules: {
|
|
@@ -935,7 +992,7 @@ var configSort = (options = {}) => {
|
|
|
935
992
|
});
|
|
936
993
|
}
|
|
937
994
|
if (enableSortI18nLocale) {
|
|
938
|
-
|
|
995
|
+
configs.push(
|
|
939
996
|
{
|
|
940
997
|
name: "ntnyq/sort/i18n-locale/json",
|
|
941
998
|
files: ["**/{i18n,langs,locales}/*.json"],
|
|
@@ -965,7 +1022,7 @@ var configSort = (options = {}) => {
|
|
|
965
1022
|
);
|
|
966
1023
|
}
|
|
967
1024
|
if (enableSortPnpmWorkspace) {
|
|
968
|
-
|
|
1025
|
+
configs.push({
|
|
969
1026
|
name: "ntnyq/sort/pnpm-workspace",
|
|
970
1027
|
files: ["**/pnpm-workspace.yaml"],
|
|
971
1028
|
rules: {
|
|
@@ -980,7 +1037,7 @@ var configSort = (options = {}) => {
|
|
|
980
1037
|
});
|
|
981
1038
|
}
|
|
982
1039
|
if (additionalJsonFiles.length) {
|
|
983
|
-
|
|
1040
|
+
configs.push({
|
|
984
1041
|
name: "ntnyq/sort/additional-json",
|
|
985
1042
|
files: additionalJsonFiles,
|
|
986
1043
|
rules: {
|
|
@@ -995,7 +1052,7 @@ var configSort = (options = {}) => {
|
|
|
995
1052
|
});
|
|
996
1053
|
}
|
|
997
1054
|
if (additionalYamlFiles.length) {
|
|
998
|
-
|
|
1055
|
+
configs.push({
|
|
999
1056
|
name: "ntnyq/sort/additional-yaml",
|
|
1000
1057
|
files: additionalYamlFiles,
|
|
1001
1058
|
rules: {
|
|
@@ -1009,11 +1066,10 @@ var configSort = (options = {}) => {
|
|
|
1009
1066
|
}
|
|
1010
1067
|
});
|
|
1011
1068
|
}
|
|
1012
|
-
return
|
|
1069
|
+
return configs;
|
|
1013
1070
|
};
|
|
1014
1071
|
|
|
1015
|
-
|
|
1016
|
-
var configSVGO = (options = {}) => {
|
|
1072
|
+
const configSVGO = (options = {}) => {
|
|
1017
1073
|
const { files = [GLOB_SVG], ignores = [] } = options;
|
|
1018
1074
|
return [
|
|
1019
1075
|
{
|
|
@@ -1021,7 +1077,7 @@ var configSVGO = (options = {}) => {
|
|
|
1021
1077
|
files,
|
|
1022
1078
|
ignores,
|
|
1023
1079
|
plugins: {
|
|
1024
|
-
svgo:
|
|
1080
|
+
svgo: pluginSvgo
|
|
1025
1081
|
},
|
|
1026
1082
|
languageOptions: {
|
|
1027
1083
|
parser: parserPlain
|
|
@@ -1033,66 +1089,45 @@ var configSVGO = (options = {}) => {
|
|
|
1033
1089
|
];
|
|
1034
1090
|
};
|
|
1035
1091
|
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
var hasTypeScript = () => isPackageExists("typescript");
|
|
1043
|
-
var hasShadcnVue = () => isPackageExists("radix-vue") && isPackageExists("clsx");
|
|
1044
|
-
var hasUnoCSS = () => isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
|
|
1045
|
-
var hasVue = () => isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("vuepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", {
|
|
1092
|
+
const hasPinia = () => isPackageExists("pinia");
|
|
1093
|
+
const hasVitest = () => isPackageExists("vitest");
|
|
1094
|
+
const hasTypeScript = () => isPackageExists("typescript");
|
|
1095
|
+
const hasShadcnVue = () => isPackageExists("radix-vue") && isPackageExists("clsx");
|
|
1096
|
+
const hasUnoCSS = () => isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
|
|
1097
|
+
const hasVue = () => isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("vuepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", {
|
|
1046
1098
|
paths: [
|
|
1047
1099
|
resolve(process.cwd(), "playground"),
|
|
1048
1100
|
resolve(process.cwd(), "docs")
|
|
1049
1101
|
]
|
|
1050
1102
|
});
|
|
1051
1103
|
|
|
1052
|
-
// src/utils/toArray.ts
|
|
1053
|
-
function toArray(val) {
|
|
1054
|
-
val = val ?? [];
|
|
1055
|
-
return Array.isArray(val) ? val : [val];
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
// src/utils/resolveSubOptions.ts
|
|
1059
1104
|
function resolveSubOptions(options, key) {
|
|
1060
1105
|
return typeof options[key] === "boolean" ? {} : options[key] || {};
|
|
1061
1106
|
}
|
|
1062
1107
|
|
|
1063
|
-
// src/utils/getOverrides.ts
|
|
1064
1108
|
function getOverrides(options, key) {
|
|
1065
1109
|
const subOptions = resolveSubOptions(options, key);
|
|
1066
1110
|
return "overrides" in subOptions && subOptions.overrides ? subOptions.overrides : {};
|
|
1067
1111
|
}
|
|
1068
1112
|
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
const resolved = await Promise.all(configs2);
|
|
1113
|
+
async function combineConfigs(...configs) {
|
|
1114
|
+
const resolved = await Promise.all(configs);
|
|
1072
1115
|
return resolved.flat();
|
|
1073
1116
|
}
|
|
1074
1117
|
|
|
1075
|
-
// src/utils/ensurePackages.ts
|
|
1076
|
-
import process3 from "node:process";
|
|
1077
|
-
import { fileURLToPath } from "node:url";
|
|
1078
|
-
import { isPackageExists as isPackageExists2 } from "local-pkg";
|
|
1079
|
-
|
|
1080
|
-
// src/utils/isInGitHooksOrRunByNanoStagedOrRunByTSX.ts
|
|
1081
|
-
import process2 from "node:process";
|
|
1082
1118
|
function isInGitHooksOrRunByNanoStagedOrRunByTSX() {
|
|
1083
|
-
return !!(
|
|
1119
|
+
return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("nano-staged") || process.env.npm_lifecycle_script?.startsWith("tsx"));
|
|
1084
1120
|
}
|
|
1085
1121
|
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
var isCwdInScope = isPackageExists2("@ntnyq/eslint-config");
|
|
1122
|
+
const scopeUrl = fileURLToPath(new URL(".", import.meta.url));
|
|
1123
|
+
const isCwdInScope = isPackageExists("@ntnyq/eslint-config");
|
|
1089
1124
|
function isPackageInScope(name) {
|
|
1090
|
-
return
|
|
1125
|
+
return isPackageExists(name, {
|
|
1091
1126
|
paths: [scopeUrl]
|
|
1092
1127
|
});
|
|
1093
1128
|
}
|
|
1094
1129
|
async function ensurePackages(packages) {
|
|
1095
|
-
if (
|
|
1130
|
+
if (process.env.CI || !process.stdout.isTTY || isInGitHooksOrRunByNanoStagedOrRunByTSX() || !isCwdInScope) {
|
|
1096
1131
|
return;
|
|
1097
1132
|
}
|
|
1098
1133
|
const nonExistingPackages = packages.filter(
|
|
@@ -1101,13 +1136,13 @@ async function ensurePackages(packages) {
|
|
|
1101
1136
|
if (nonExistingPackages.length === 0) {
|
|
1102
1137
|
return;
|
|
1103
1138
|
}
|
|
1104
|
-
const { confirm } = await import(
|
|
1139
|
+
const { confirm } = await import('@clack/prompts');
|
|
1105
1140
|
const confirmInstall = await confirm({
|
|
1106
1141
|
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`
|
|
1107
1142
|
});
|
|
1108
1143
|
if (confirmInstall) {
|
|
1109
1144
|
try {
|
|
1110
|
-
const { installPackage } = await import(
|
|
1145
|
+
const { installPackage } = await import('@antfu/install-pkg');
|
|
1111
1146
|
await installPackage(nonExistingPackages, { dev: true });
|
|
1112
1147
|
} catch (err) {
|
|
1113
1148
|
console.log(err);
|
|
@@ -1115,13 +1150,11 @@ async function ensurePackages(packages) {
|
|
|
1115
1150
|
}
|
|
1116
1151
|
}
|
|
1117
1152
|
|
|
1118
|
-
// src/utils/interopDefault.ts
|
|
1119
1153
|
async function interopDefault(mod) {
|
|
1120
1154
|
const resolved = await mod;
|
|
1121
1155
|
return resolved.default || resolved;
|
|
1122
1156
|
}
|
|
1123
1157
|
|
|
1124
|
-
// src/utils/mergePrettierOptions.ts
|
|
1125
1158
|
function mergePrettierOptions(options = {}, overrides = {}) {
|
|
1126
1159
|
const result = {
|
|
1127
1160
|
...options,
|
|
@@ -1136,18 +1169,17 @@ function mergePrettierOptions(options = {}, overrides = {}) {
|
|
|
1136
1169
|
return result;
|
|
1137
1170
|
}
|
|
1138
1171
|
|
|
1139
|
-
|
|
1140
|
-
var configTest = (options = {}) => {
|
|
1172
|
+
const configTest = (options = {}) => {
|
|
1141
1173
|
const {
|
|
1142
1174
|
// default test files
|
|
1143
1175
|
files = [...GLOB_TEST],
|
|
1144
1176
|
vitest: enableVitest = hasVitest()
|
|
1145
1177
|
} = options;
|
|
1146
|
-
const
|
|
1178
|
+
const configs = [
|
|
1147
1179
|
{
|
|
1148
1180
|
name: "ntnyq/test/setup",
|
|
1149
1181
|
plugins: {
|
|
1150
|
-
"no-only-tests":
|
|
1182
|
+
"no-only-tests": pluginNoOnlyTests
|
|
1151
1183
|
}
|
|
1152
1184
|
},
|
|
1153
1185
|
{
|
|
@@ -1163,11 +1195,11 @@ var configTest = (options = {}) => {
|
|
|
1163
1195
|
}
|
|
1164
1196
|
];
|
|
1165
1197
|
if (enableVitest) {
|
|
1166
|
-
|
|
1198
|
+
configs.push({
|
|
1167
1199
|
name: "ntnyq/test/vitest",
|
|
1168
1200
|
files,
|
|
1169
1201
|
plugins: {
|
|
1170
|
-
vitest:
|
|
1202
|
+
vitest: pluginVitest
|
|
1171
1203
|
},
|
|
1172
1204
|
settings: {
|
|
1173
1205
|
/**
|
|
@@ -1179,7 +1211,7 @@ var configTest = (options = {}) => {
|
|
|
1179
1211
|
// },
|
|
1180
1212
|
},
|
|
1181
1213
|
rules: {
|
|
1182
|
-
...
|
|
1214
|
+
...pluginVitest.configs.recommended.rules,
|
|
1183
1215
|
"vitest/expect-expect": [
|
|
1184
1216
|
"error",
|
|
1185
1217
|
{
|
|
@@ -1199,18 +1231,17 @@ var configTest = (options = {}) => {
|
|
|
1199
1231
|
}
|
|
1200
1232
|
});
|
|
1201
1233
|
}
|
|
1202
|
-
return
|
|
1234
|
+
return configs;
|
|
1203
1235
|
};
|
|
1204
1236
|
|
|
1205
|
-
|
|
1206
|
-
var configToml = (options = {}) => {
|
|
1237
|
+
const configToml = (options = {}) => {
|
|
1207
1238
|
const { files = [GLOB_TOML] } = options;
|
|
1208
1239
|
return [
|
|
1209
1240
|
{
|
|
1210
1241
|
name: "ntnyq/toml",
|
|
1211
1242
|
files,
|
|
1212
1243
|
plugins: {
|
|
1213
|
-
toml:
|
|
1244
|
+
toml: pluginToml
|
|
1214
1245
|
},
|
|
1215
1246
|
languageOptions: {
|
|
1216
1247
|
parser: parserToml
|
|
@@ -1242,12 +1273,11 @@ var configToml = (options = {}) => {
|
|
|
1242
1273
|
];
|
|
1243
1274
|
};
|
|
1244
1275
|
|
|
1245
|
-
|
|
1246
|
-
var configAntfu = (options = {}) => [
|
|
1276
|
+
const configAntfu = (options = {}) => [
|
|
1247
1277
|
{
|
|
1248
1278
|
name: "ntnyq/antfu",
|
|
1249
1279
|
plugins: {
|
|
1250
|
-
antfu:
|
|
1280
|
+
antfu: pluginAntfu
|
|
1251
1281
|
},
|
|
1252
1282
|
rules: {
|
|
1253
1283
|
// required `object-curly-newline` to be disabled
|
|
@@ -1262,26 +1292,25 @@ var configAntfu = (options = {}) => [
|
|
|
1262
1292
|
}
|
|
1263
1293
|
];
|
|
1264
1294
|
|
|
1265
|
-
|
|
1266
|
-
var javscriptRules = {
|
|
1295
|
+
const javscriptRules = {
|
|
1267
1296
|
"jsdoc/no-types": "off",
|
|
1268
1297
|
"jsdoc/no-undefined-types": "error",
|
|
1269
1298
|
"jsdoc/require-param-type": "error",
|
|
1270
1299
|
"jsdoc/require-property-type": "error",
|
|
1271
1300
|
"jsdoc/require-returns-type": "error"
|
|
1272
1301
|
};
|
|
1273
|
-
|
|
1302
|
+
const typescriptRules = {
|
|
1274
1303
|
"jsdoc/no-undefined-types": "off",
|
|
1275
1304
|
"jsdoc/require-param-type": "off",
|
|
1276
1305
|
"jsdoc/require-property-type": "off",
|
|
1277
1306
|
"jsdoc/require-returns-type": "off",
|
|
1278
1307
|
"jsdoc/no-types": "error"
|
|
1279
1308
|
};
|
|
1280
|
-
|
|
1309
|
+
const configJsdoc = (options = {}) => [
|
|
1281
1310
|
{
|
|
1282
1311
|
name: "ntnyq/jsdoc",
|
|
1283
1312
|
plugins: {
|
|
1284
|
-
jsdoc:
|
|
1313
|
+
jsdoc: pluginJsdoc
|
|
1285
1314
|
},
|
|
1286
1315
|
rules: {
|
|
1287
1316
|
// Disabled rules
|
|
@@ -1354,21 +1383,20 @@ var configJsdoc = (options = {}) => [
|
|
|
1354
1383
|
}
|
|
1355
1384
|
];
|
|
1356
1385
|
|
|
1357
|
-
|
|
1358
|
-
var configJsonc = (options = {}) => {
|
|
1386
|
+
const configJsonc = (options = {}) => {
|
|
1359
1387
|
const { files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC] } = options;
|
|
1360
1388
|
return [
|
|
1361
1389
|
{
|
|
1362
1390
|
name: "ntnyq/jsonc",
|
|
1363
1391
|
files,
|
|
1364
1392
|
plugins: {
|
|
1365
|
-
jsonc:
|
|
1393
|
+
jsonc: pluginJsonc
|
|
1366
1394
|
},
|
|
1367
1395
|
languageOptions: {
|
|
1368
1396
|
parser: parserJsonc
|
|
1369
1397
|
},
|
|
1370
1398
|
rules: {
|
|
1371
|
-
...
|
|
1399
|
+
...pluginJsonc.configs["recommended-with-jsonc"].rules,
|
|
1372
1400
|
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
1373
1401
|
"jsonc/comma-dangle": ["error", "never"],
|
|
1374
1402
|
"jsonc/comma-style": ["error", "last"],
|
|
@@ -1402,12 +1430,11 @@ var configJsonc = (options = {}) => {
|
|
|
1402
1430
|
];
|
|
1403
1431
|
};
|
|
1404
1432
|
|
|
1405
|
-
|
|
1406
|
-
var configNtnyq = (options = {}) => [
|
|
1433
|
+
const configNtnyq = (options = {}) => [
|
|
1407
1434
|
{
|
|
1408
1435
|
name: "ntnyq/ntnyq",
|
|
1409
1436
|
plugins: {
|
|
1410
|
-
ntnyq:
|
|
1437
|
+
ntnyq: pluginNtnyq
|
|
1411
1438
|
},
|
|
1412
1439
|
rules: {
|
|
1413
1440
|
"ntnyq/no-duplicate-exports": "error",
|
|
@@ -1418,15 +1445,14 @@ var configNtnyq = (options = {}) => [
|
|
|
1418
1445
|
}
|
|
1419
1446
|
];
|
|
1420
1447
|
|
|
1421
|
-
|
|
1422
|
-
var configPinia = (options = {}) => {
|
|
1448
|
+
const configPinia = (options = {}) => {
|
|
1423
1449
|
const { files = [GLOB_PINIA_STORE] } = options;
|
|
1424
1450
|
return [
|
|
1425
1451
|
{
|
|
1426
1452
|
name: "ntnyq/pinia",
|
|
1427
1453
|
files,
|
|
1428
1454
|
plugins: {
|
|
1429
|
-
pinia:
|
|
1455
|
+
pinia: pluginPinia
|
|
1430
1456
|
},
|
|
1431
1457
|
rules: {
|
|
1432
1458
|
"pinia/never-export-initialized-store": "error",
|
|
@@ -1449,14 +1475,13 @@ var configPinia = (options = {}) => {
|
|
|
1449
1475
|
];
|
|
1450
1476
|
};
|
|
1451
1477
|
|
|
1452
|
-
|
|
1453
|
-
var configDepend = (options = {}) => {
|
|
1478
|
+
const configDepend = (options = {}) => {
|
|
1454
1479
|
const {
|
|
1455
1480
|
files = [GLOB_SRC],
|
|
1456
1481
|
// check package.json file
|
|
1457
1482
|
packageJson: enableCheckPackageJson = true
|
|
1458
1483
|
} = options;
|
|
1459
|
-
const
|
|
1484
|
+
const configs = [
|
|
1460
1485
|
{
|
|
1461
1486
|
name: "ntnyq/depend",
|
|
1462
1487
|
files,
|
|
@@ -1471,7 +1496,7 @@ var configDepend = (options = {}) => {
|
|
|
1471
1496
|
}
|
|
1472
1497
|
];
|
|
1473
1498
|
if (enableCheckPackageJson) {
|
|
1474
|
-
|
|
1499
|
+
configs.push({
|
|
1475
1500
|
name: "ntnyq/depend/package-json",
|
|
1476
1501
|
files: [GLOB_PACKAGE_JSON],
|
|
1477
1502
|
plugins: {
|
|
@@ -1487,11 +1512,10 @@ var configDepend = (options = {}) => {
|
|
|
1487
1512
|
}
|
|
1488
1513
|
});
|
|
1489
1514
|
}
|
|
1490
|
-
return
|
|
1515
|
+
return configs;
|
|
1491
1516
|
};
|
|
1492
1517
|
|
|
1493
|
-
|
|
1494
|
-
var PRETTIER_DEFAULT_OPTIONS = {
|
|
1518
|
+
const PRETTIER_DEFAULT_OPTIONS = {
|
|
1495
1519
|
arrowParens: "avoid",
|
|
1496
1520
|
bracketSameLine: false,
|
|
1497
1521
|
bracketSpacing: true,
|
|
@@ -1518,25 +1542,24 @@ var PRETTIER_DEFAULT_OPTIONS = {
|
|
|
1518
1542
|
vueIndentScriptAndStyle: false
|
|
1519
1543
|
};
|
|
1520
1544
|
|
|
1521
|
-
|
|
1522
|
-
var PERFECTIONIST_COMMON_RULE_OPTIONS = {
|
|
1545
|
+
const PERFECTIONIST_COMMON_RULE_OPTIONS = {
|
|
1523
1546
|
fallbackSort: { order: "asc", type: "alphabetical" },
|
|
1524
1547
|
ignoreCase: true,
|
|
1525
1548
|
order: "asc",
|
|
1526
1549
|
type: "alphabetical"
|
|
1527
1550
|
};
|
|
1528
|
-
|
|
1551
|
+
const PERFECTIONIST_EXTRA_RULE_OPTIONS = {
|
|
1529
1552
|
newlinesBetween: "ignore",
|
|
1530
1553
|
partitionByComment: ["@pg", "@perfectionist-group"]
|
|
1531
1554
|
};
|
|
1532
|
-
|
|
1555
|
+
const PERFECTIONIST_SORT_OBJECTS_GROUPS = [
|
|
1533
1556
|
"property",
|
|
1534
1557
|
"multiline-property",
|
|
1535
1558
|
"method",
|
|
1536
1559
|
"multiline-method",
|
|
1537
1560
|
"unknown"
|
|
1538
1561
|
];
|
|
1539
|
-
|
|
1562
|
+
const PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS = [
|
|
1540
1563
|
"required-property",
|
|
1541
1564
|
"optional-property",
|
|
1542
1565
|
"required-method",
|
|
@@ -1549,7 +1572,7 @@ var PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS = [
|
|
|
1549
1572
|
"index-signature",
|
|
1550
1573
|
"multiline-index-signature"
|
|
1551
1574
|
];
|
|
1552
|
-
|
|
1575
|
+
const PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS = [
|
|
1553
1576
|
/**
|
|
1554
1577
|
* eg. 'foobar', 24, false
|
|
1555
1578
|
*/
|
|
@@ -1599,7 +1622,7 @@ var PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS = [
|
|
|
1599
1622
|
*/
|
|
1600
1623
|
"nullish"
|
|
1601
1624
|
];
|
|
1602
|
-
|
|
1625
|
+
const PERFECTIONIST_SORT_IMPORTS_GROUPS = [
|
|
1603
1626
|
// Side effect style imports (e.g. 'normalize.css')
|
|
1604
1627
|
"side-effect-style",
|
|
1605
1628
|
// Styles (e.g. *.{css,scss,less})
|
|
@@ -1635,10 +1658,9 @@ var PERFECTIONIST_SORT_IMPORTS_GROUPS = [
|
|
|
1635
1658
|
*/
|
|
1636
1659
|
"unknown"
|
|
1637
1660
|
];
|
|
1638
|
-
|
|
1661
|
+
const PERFECTIONIST_SORT_CLASSES_GROUPS = ["unknown"];
|
|
1639
1662
|
|
|
1640
|
-
|
|
1641
|
-
var configFormat = (options = {}) => {
|
|
1663
|
+
const configFormat = (options = {}) => {
|
|
1642
1664
|
const {
|
|
1643
1665
|
css: enableCSS = true,
|
|
1644
1666
|
html: enableHTML = true,
|
|
@@ -1649,16 +1671,16 @@ var configFormat = (options = {}) => {
|
|
|
1649
1671
|
...PRETTIER_DEFAULT_OPTIONS,
|
|
1650
1672
|
...prettierOptions
|
|
1651
1673
|
};
|
|
1652
|
-
const
|
|
1674
|
+
const configs = [
|
|
1653
1675
|
{
|
|
1654
1676
|
name: "ntnyq/format/setup",
|
|
1655
1677
|
plugins: {
|
|
1656
|
-
format:
|
|
1678
|
+
format: pluginFormat
|
|
1657
1679
|
}
|
|
1658
1680
|
}
|
|
1659
1681
|
];
|
|
1660
1682
|
if (enableCSS) {
|
|
1661
|
-
|
|
1683
|
+
configs.push(
|
|
1662
1684
|
{
|
|
1663
1685
|
name: "ntnyq/format/css",
|
|
1664
1686
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
@@ -1707,7 +1729,7 @@ var configFormat = (options = {}) => {
|
|
|
1707
1729
|
);
|
|
1708
1730
|
}
|
|
1709
1731
|
if (enableHTML) {
|
|
1710
|
-
|
|
1732
|
+
configs.push({
|
|
1711
1733
|
name: "ntnyq/format/html",
|
|
1712
1734
|
files: [GLOB_HTML],
|
|
1713
1735
|
languageOptions: {
|
|
@@ -1723,19 +1745,18 @@ var configFormat = (options = {}) => {
|
|
|
1723
1745
|
}
|
|
1724
1746
|
});
|
|
1725
1747
|
}
|
|
1726
|
-
return
|
|
1748
|
+
return configs;
|
|
1727
1749
|
};
|
|
1728
1750
|
|
|
1729
|
-
|
|
1730
|
-
var configRegexp = (options = {}) => {
|
|
1751
|
+
const configRegexp = (options = {}) => {
|
|
1731
1752
|
const recommendedConfig = pluginRegexp.configs["flat/recommended"];
|
|
1732
|
-
const
|
|
1753
|
+
const recommendedRules = {
|
|
1733
1754
|
...recommendedConfig.rules
|
|
1734
1755
|
};
|
|
1735
1756
|
if (options.severity === "warn") {
|
|
1736
|
-
for (const key in
|
|
1737
|
-
if (
|
|
1738
|
-
|
|
1757
|
+
for (const key in recommendedRules) {
|
|
1758
|
+
if (recommendedRules[key] === "error") {
|
|
1759
|
+
recommendedRules[key] = "warn";
|
|
1739
1760
|
}
|
|
1740
1761
|
}
|
|
1741
1762
|
}
|
|
@@ -1744,7 +1765,7 @@ var configRegexp = (options = {}) => {
|
|
|
1744
1765
|
...recommendedConfig,
|
|
1745
1766
|
name: "ntnyq/regexp",
|
|
1746
1767
|
rules: {
|
|
1747
|
-
...
|
|
1768
|
+
...recommendedRules,
|
|
1748
1769
|
// Overrides rules
|
|
1749
1770
|
...options.overrides
|
|
1750
1771
|
}
|
|
@@ -1752,12 +1773,11 @@ var configRegexp = (options = {}) => {
|
|
|
1752
1773
|
];
|
|
1753
1774
|
};
|
|
1754
1775
|
|
|
1755
|
-
|
|
1756
|
-
var configUnoCSS = (options = {}) => [
|
|
1776
|
+
const configUnoCSS = (options = {}) => [
|
|
1757
1777
|
{
|
|
1758
1778
|
name: "ntnyq/unocss",
|
|
1759
1779
|
plugins: {
|
|
1760
|
-
unocss:
|
|
1780
|
+
unocss: pluginUnoCSS
|
|
1761
1781
|
},
|
|
1762
1782
|
rules: {
|
|
1763
1783
|
"unocss/order-attributify": options.attributify ? "error" : "off",
|
|
@@ -1768,13 +1788,7 @@ var configUnoCSS = (options = {}) => [
|
|
|
1768
1788
|
}
|
|
1769
1789
|
];
|
|
1770
1790
|
|
|
1771
|
-
|
|
1772
|
-
import { builtinCommands } from "eslint-plugin-command/commands";
|
|
1773
|
-
import createCommandConfig from "eslint-plugin-command/config";
|
|
1774
|
-
|
|
1775
|
-
// src/commands/regexper.ts
|
|
1776
|
-
import { defineCommand } from "eslint-plugin-command/commands";
|
|
1777
|
-
var regexper = defineCommand({
|
|
1791
|
+
const regexper = defineCommand({
|
|
1778
1792
|
name: "regexper",
|
|
1779
1793
|
// @regexper https://regexper.com/#%2F(%5Cb%7C%5Cs%7C%5E)(%40regexper)(%5Cs%5CS%2B)%3F(%5Cb%7C%5Cs%7C%24)%2F
|
|
1780
1794
|
match: /(\b|\s|^)(@regexper)(\s\S+)?(\b|\s|$)/,
|
|
@@ -1817,11 +1831,9 @@ var regexper = defineCommand({
|
|
|
1817
1831
|
}
|
|
1818
1832
|
});
|
|
1819
1833
|
|
|
1820
|
-
|
|
1821
|
-
var commands = [regexper];
|
|
1834
|
+
const commands = [regexper];
|
|
1822
1835
|
|
|
1823
|
-
|
|
1824
|
-
var configCommand = (options = {}) => [
|
|
1836
|
+
const configCommand = (options = {}) => [
|
|
1825
1837
|
{
|
|
1826
1838
|
...createCommandConfig({
|
|
1827
1839
|
...options,
|
|
@@ -1838,8 +1850,7 @@ var configCommand = (options = {}) => [
|
|
|
1838
1850
|
}
|
|
1839
1851
|
];
|
|
1840
1852
|
|
|
1841
|
-
|
|
1842
|
-
var configIgnores = (customIgnores = []) => [
|
|
1853
|
+
const configIgnores = (customIgnores = []) => [
|
|
1843
1854
|
{
|
|
1844
1855
|
name: "ntnyq/ignores",
|
|
1845
1856
|
ignores: [
|
|
@@ -1850,8 +1861,7 @@ var configIgnores = (customIgnores = []) => [
|
|
|
1850
1861
|
}
|
|
1851
1862
|
];
|
|
1852
1863
|
|
|
1853
|
-
|
|
1854
|
-
var configImportX = (options = {}) => {
|
|
1864
|
+
const configImportX = (options = {}) => {
|
|
1855
1865
|
const {
|
|
1856
1866
|
// use typescript resolve if possible
|
|
1857
1867
|
preferTypeScriptResolver = true,
|
|
@@ -1861,7 +1871,7 @@ var configImportX = (options = {}) => {
|
|
|
1861
1871
|
{
|
|
1862
1872
|
name: "ntnyq/import-x",
|
|
1863
1873
|
plugins: {
|
|
1864
|
-
"import-x":
|
|
1874
|
+
"import-x": pluginImportX
|
|
1865
1875
|
},
|
|
1866
1876
|
settings: {
|
|
1867
1877
|
"import-x/resolver-next": [
|
|
@@ -1875,7 +1885,7 @@ var configImportX = (options = {}) => {
|
|
|
1875
1885
|
".json",
|
|
1876
1886
|
".node"
|
|
1877
1887
|
]
|
|
1878
|
-
}) : createNodeResolver({
|
|
1888
|
+
}) : pluginImportX.createNodeResolver({
|
|
1879
1889
|
extensions: [".js", ".mjs", ".ts", ".mts", ".d.ts", ".json"]
|
|
1880
1890
|
})
|
|
1881
1891
|
]
|
|
@@ -1904,8 +1914,7 @@ var configImportX = (options = {}) => {
|
|
|
1904
1914
|
];
|
|
1905
1915
|
};
|
|
1906
1916
|
|
|
1907
|
-
|
|
1908
|
-
var disabledRules2 = {
|
|
1917
|
+
const disabledRules = {
|
|
1909
1918
|
"unicorn/better-regex": "off",
|
|
1910
1919
|
"unicorn/explicit-length-check": "off",
|
|
1911
1920
|
"unicorn/no-array-callback-reference": "off",
|
|
@@ -1915,11 +1924,11 @@ var disabledRules2 = {
|
|
|
1915
1924
|
"unicorn/prefer-global-this": "off",
|
|
1916
1925
|
"unicorn/prefer-top-level-await": "off"
|
|
1917
1926
|
};
|
|
1918
|
-
|
|
1927
|
+
const configUnicorn = (options = {}) => [
|
|
1919
1928
|
{
|
|
1920
1929
|
name: "ntnyq/unicorn",
|
|
1921
1930
|
plugins: {
|
|
1922
|
-
unicorn:
|
|
1931
|
+
unicorn: pluginUnicorn
|
|
1923
1932
|
},
|
|
1924
1933
|
rules: {
|
|
1925
1934
|
"unicorn/consistent-assert": "error",
|
|
@@ -2011,28 +2020,26 @@ var configUnicorn = (options = {}) => [
|
|
|
2011
2020
|
*/
|
|
2012
2021
|
"unicorn/prefer-set-has": "error",
|
|
2013
2022
|
"unicorn/prefer-set-size": "error",
|
|
2014
|
-
...
|
|
2023
|
+
...disabledRules,
|
|
2015
2024
|
// Overrides rules
|
|
2016
2025
|
...options.overrides
|
|
2017
2026
|
}
|
|
2018
2027
|
}
|
|
2019
2028
|
];
|
|
2020
2029
|
|
|
2021
|
-
|
|
2022
|
-
var configDeMorgan = (options = {}) => [
|
|
2030
|
+
const configDeMorgan = (options = {}) => [
|
|
2023
2031
|
{
|
|
2024
|
-
...
|
|
2032
|
+
...pluginDeMorgan.configs.recommended,
|
|
2025
2033
|
name: "ntnyq/de-morgan",
|
|
2026
2034
|
rules: {
|
|
2027
|
-
...
|
|
2035
|
+
...pluginDeMorgan.configs.recommended.rules,
|
|
2028
2036
|
// Overrides rules
|
|
2029
2037
|
...options.overrides
|
|
2030
2038
|
}
|
|
2031
2039
|
}
|
|
2032
2040
|
];
|
|
2033
2041
|
|
|
2034
|
-
|
|
2035
|
-
var configMarkdown = (options = {}) => {
|
|
2042
|
+
const configMarkdown = (options = {}) => {
|
|
2036
2043
|
const {
|
|
2037
2044
|
/**
|
|
2038
2045
|
* code block files
|
|
@@ -2040,11 +2047,11 @@ var configMarkdown = (options = {}) => {
|
|
|
2040
2047
|
files = [GLOB_MARKDOWN_CODE],
|
|
2041
2048
|
extraFileExtensions = []
|
|
2042
2049
|
} = options;
|
|
2043
|
-
const
|
|
2050
|
+
const configs$1 = [
|
|
2044
2051
|
/**
|
|
2045
2052
|
* extracting code blocks to be linted individually
|
|
2046
2053
|
*/
|
|
2047
|
-
...
|
|
2054
|
+
...pluginMarkdown.configs.processor.map((config) => ({
|
|
2048
2055
|
...config,
|
|
2049
2056
|
name: `ntnyq/${config.name}`
|
|
2050
2057
|
})),
|
|
@@ -2056,7 +2063,7 @@ var configMarkdown = (options = {}) => {
|
|
|
2056
2063
|
files,
|
|
2057
2064
|
ignores: [GLOB_MARKDOWN_NESTED],
|
|
2058
2065
|
processor: mergeProcessors([
|
|
2059
|
-
|
|
2066
|
+
pluginMarkdown.processors.markdown,
|
|
2060
2067
|
// Just pass through processor
|
|
2061
2068
|
processorPassThrough
|
|
2062
2069
|
])
|
|
@@ -2112,11 +2119,10 @@ var configMarkdown = (options = {}) => {
|
|
|
2112
2119
|
}
|
|
2113
2120
|
}
|
|
2114
2121
|
];
|
|
2115
|
-
return
|
|
2122
|
+
return configs$1;
|
|
2116
2123
|
};
|
|
2117
2124
|
|
|
2118
|
-
|
|
2119
|
-
var configPrettier = (options = {}) => {
|
|
2125
|
+
const configPrettier = (options = {}) => {
|
|
2120
2126
|
const {
|
|
2121
2127
|
disabledFiles = [GLOB_SVG, GLOB_TOML, GLOB_ASTRO, GLOB_SVELTE],
|
|
2122
2128
|
// User defined disabled files
|
|
@@ -2126,7 +2132,7 @@ var configPrettier = (options = {}) => {
|
|
|
2126
2132
|
{
|
|
2127
2133
|
name: "ntnyq/prettier",
|
|
2128
2134
|
plugins: {
|
|
2129
|
-
prettier:
|
|
2135
|
+
prettier: pluginPrettier
|
|
2130
2136
|
},
|
|
2131
2137
|
rules: {
|
|
2132
2138
|
"vue/array-bracket-newline": "off",
|
|
@@ -2166,7 +2172,7 @@ var configPrettier = (options = {}) => {
|
|
|
2166
2172
|
"vue/space-infix-ops": "off",
|
|
2167
2173
|
"vue/space-unary-ops": "off",
|
|
2168
2174
|
"vue/template-curly-spacing": "off",
|
|
2169
|
-
...
|
|
2175
|
+
...pluginPrettier.configs.recommended.rules,
|
|
2170
2176
|
"prettier/prettier": options.severity || "warn",
|
|
2171
2177
|
// Overrides rules
|
|
2172
2178
|
...options.overrides
|
|
@@ -2179,7 +2185,7 @@ var configPrettier = (options = {}) => {
|
|
|
2179
2185
|
name: "ntnyq/prettier/disabled",
|
|
2180
2186
|
files: [...disabledFiles, ...userDisabledFiles],
|
|
2181
2187
|
plugins: {
|
|
2182
|
-
prettier:
|
|
2188
|
+
prettier: pluginPrettier
|
|
2183
2189
|
},
|
|
2184
2190
|
rules: {
|
|
2185
2191
|
"prettier/prettier": "off"
|
|
@@ -2188,14 +2194,12 @@ var configPrettier = (options = {}) => {
|
|
|
2188
2194
|
];
|
|
2189
2195
|
};
|
|
2190
2196
|
|
|
2191
|
-
|
|
2192
|
-
import globals from "globals";
|
|
2193
|
-
var configSpecials = (options = {}) => {
|
|
2197
|
+
const configSpecials = (options = {}) => {
|
|
2194
2198
|
const {
|
|
2195
2199
|
// Enable shadcn-vue support
|
|
2196
2200
|
shadcnVue: enableShadcnVue = hasShadcnVue()
|
|
2197
2201
|
} = options;
|
|
2198
|
-
const
|
|
2202
|
+
const configs = [
|
|
2199
2203
|
{
|
|
2200
2204
|
name: "ntnyq/specials/scripts",
|
|
2201
2205
|
files: [`**/scripts/${GLOB_SRC}`],
|
|
@@ -2250,8 +2254,8 @@ var configSpecials = (options = {}) => {
|
|
|
2250
2254
|
name: "ntnyq/specials/config-file",
|
|
2251
2255
|
files: [`**/*.config*.${GLOB_SRC_EXT}`],
|
|
2252
2256
|
plugins: {
|
|
2253
|
-
"import-x":
|
|
2254
|
-
perfectionist:
|
|
2257
|
+
"import-x": pluginImportX,
|
|
2258
|
+
perfectionist: pluginPerfectionist
|
|
2255
2259
|
},
|
|
2256
2260
|
rules: {
|
|
2257
2261
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
@@ -2271,7 +2275,7 @@ var configSpecials = (options = {}) => {
|
|
|
2271
2275
|
];
|
|
2272
2276
|
if (enableShadcnVue) {
|
|
2273
2277
|
const shadcnOptions = resolveSubOptions(options, "shadcnVue");
|
|
2274
|
-
|
|
2278
|
+
configs.push({
|
|
2275
2279
|
name: "ntnyq/specials/shadcn-vue",
|
|
2276
2280
|
files: shadcnOptions.files || [
|
|
2277
2281
|
"**/components/ui/**/*.ts",
|
|
@@ -2288,14 +2292,12 @@ var configSpecials = (options = {}) => {
|
|
|
2288
2292
|
});
|
|
2289
2293
|
}
|
|
2290
2294
|
if (options.specialCaseConfigs) {
|
|
2291
|
-
|
|
2295
|
+
configs.push(...options.specialCaseConfigs);
|
|
2292
2296
|
}
|
|
2293
|
-
return
|
|
2297
|
+
return configs;
|
|
2294
2298
|
};
|
|
2295
2299
|
|
|
2296
|
-
|
|
2297
|
-
import createGitIgnoreConfig from "eslint-config-flat-gitignore";
|
|
2298
|
-
var configGitIgnore = (options = {}) => {
|
|
2300
|
+
const configGitIgnore = (options = {}) => {
|
|
2299
2301
|
options.strict ??= false;
|
|
2300
2302
|
return [
|
|
2301
2303
|
{
|
|
@@ -2305,10 +2307,7 @@ var configGitIgnore = (options = {}) => {
|
|
|
2305
2307
|
];
|
|
2306
2308
|
};
|
|
2307
2309
|
|
|
2308
|
-
|
|
2309
|
-
import jsConfig from "@eslint/js";
|
|
2310
|
-
import globals2 from "globals";
|
|
2311
|
-
var strictRules = {
|
|
2310
|
+
const strictRules = {
|
|
2312
2311
|
complexity: ["error", { max: 30 }],
|
|
2313
2312
|
"max-depth": ["error", { max: 5 }],
|
|
2314
2313
|
"max-lines": [
|
|
@@ -2330,7 +2329,7 @@ var strictRules = {
|
|
|
2330
2329
|
"max-nested-callbacks": ["error", { max: 10 }],
|
|
2331
2330
|
"max-params": ["error", { max: 5 }]
|
|
2332
2331
|
};
|
|
2333
|
-
|
|
2332
|
+
const configJavaScript = (options = {}) => [
|
|
2334
2333
|
{
|
|
2335
2334
|
...jsConfig.configs.recommended,
|
|
2336
2335
|
name: "ntnyq/js/recommended"
|
|
@@ -2340,9 +2339,9 @@ var configJavaScript = (options = {}) => [
|
|
|
2340
2339
|
languageOptions: {
|
|
2341
2340
|
sourceType: "module",
|
|
2342
2341
|
globals: {
|
|
2343
|
-
...
|
|
2344
|
-
...
|
|
2345
|
-
...
|
|
2342
|
+
...globals.browser,
|
|
2343
|
+
...globals.es2021,
|
|
2344
|
+
...globals.node
|
|
2346
2345
|
}
|
|
2347
2346
|
},
|
|
2348
2347
|
rules: {
|
|
@@ -2528,7 +2527,7 @@ var configJavaScript = (options = {}) => [
|
|
|
2528
2527
|
}
|
|
2529
2528
|
}
|
|
2530
2529
|
];
|
|
2531
|
-
|
|
2530
|
+
const configJSX = () => [
|
|
2532
2531
|
{
|
|
2533
2532
|
name: "ntnyq/jsx",
|
|
2534
2533
|
files: [GLOB_JSX_ONLY],
|
|
@@ -2542,9 +2541,7 @@ var configJSX = () => [
|
|
|
2542
2541
|
}
|
|
2543
2542
|
];
|
|
2544
2543
|
|
|
2545
|
-
|
|
2546
|
-
import process4 from "node:process";
|
|
2547
|
-
var typeAwareRules = {
|
|
2544
|
+
const typeAwareRules = {
|
|
2548
2545
|
// too strict
|
|
2549
2546
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
2550
2547
|
"dot-notation": "off",
|
|
@@ -2576,15 +2573,16 @@ var typeAwareRules = {
|
|
|
2576
2573
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
2577
2574
|
"@typescript-eslint/unbound-method": "error"
|
|
2578
2575
|
};
|
|
2579
|
-
|
|
2576
|
+
const recommendedRules = configs.recommended.reduce(
|
|
2580
2577
|
(rules, config) => {
|
|
2581
2578
|
return { ...rules, ...config.rules || {} };
|
|
2582
2579
|
},
|
|
2583
2580
|
{}
|
|
2584
2581
|
);
|
|
2585
|
-
|
|
2582
|
+
const configTypeScript = (options = {}) => {
|
|
2586
2583
|
const enableTypeAwareLint = !!options?.tsconfigPath;
|
|
2587
2584
|
const {
|
|
2585
|
+
allowDefaultProject = [],
|
|
2588
2586
|
extraFileExtensions = [],
|
|
2589
2587
|
filesTypeAware = [GLOB_TS, GLOB_TSX],
|
|
2590
2588
|
ignoresTypeAware = [GLOB_ASTRO, `${GLOB_MARKDOWN}/**`],
|
|
@@ -2602,9 +2600,9 @@ var configTypeScript = (options = {}) => {
|
|
|
2602
2600
|
extraFileExtensions,
|
|
2603
2601
|
sourceType: "module",
|
|
2604
2602
|
...enableTypeAware ? {
|
|
2605
|
-
tsconfigRootDir:
|
|
2603
|
+
tsconfigRootDir: process.cwd(),
|
|
2606
2604
|
projectService: {
|
|
2607
|
-
allowDefaultProject: ["./*.js"],
|
|
2605
|
+
allowDefaultProject: ["./*.js", ...allowDefaultProject],
|
|
2608
2606
|
defaultProject: options.tsconfigPath
|
|
2609
2607
|
}
|
|
2610
2608
|
} : {},
|
|
@@ -2615,7 +2613,7 @@ var configTypeScript = (options = {}) => {
|
|
|
2615
2613
|
files: files2,
|
|
2616
2614
|
ignores: [...ignores],
|
|
2617
2615
|
languageOptions: {
|
|
2618
|
-
parser,
|
|
2616
|
+
parser: parser,
|
|
2619
2617
|
parserOptions: typescriptParserOptions
|
|
2620
2618
|
}
|
|
2621
2619
|
};
|
|
@@ -2626,7 +2624,7 @@ var configTypeScript = (options = {}) => {
|
|
|
2626
2624
|
name: "ntnyq/ts/setup",
|
|
2627
2625
|
plugins: {
|
|
2628
2626
|
"@typescript-eslint": plugin,
|
|
2629
|
-
antfu:
|
|
2627
|
+
antfu: pluginAntfu
|
|
2630
2628
|
}
|
|
2631
2629
|
},
|
|
2632
2630
|
...enableTypeAwareLint ? [
|
|
@@ -2769,11 +2767,10 @@ var configTypeScript = (options = {}) => {
|
|
|
2769
2767
|
];
|
|
2770
2768
|
};
|
|
2771
2769
|
|
|
2772
|
-
|
|
2773
|
-
var configESLintPlugin = async (options = {}) => {
|
|
2770
|
+
const configESLintPlugin = async (options = {}) => {
|
|
2774
2771
|
await ensurePackages(["eslint-plugin-eslint-plugin"]);
|
|
2775
2772
|
const pluginESLintPlugin = await interopDefault(
|
|
2776
|
-
import(
|
|
2773
|
+
import('eslint-plugin-eslint-plugin')
|
|
2777
2774
|
);
|
|
2778
2775
|
return [
|
|
2779
2776
|
{
|
|
@@ -2790,9 +2787,7 @@ var configESLintPlugin = async (options = {}) => {
|
|
|
2790
2787
|
];
|
|
2791
2788
|
};
|
|
2792
2789
|
|
|
2793
|
-
|
|
2794
|
-
import { createConfig } from "eslint-plugin-github-action";
|
|
2795
|
-
var configGitHubAction = (options = {}) => {
|
|
2790
|
+
const configGitHubAction = (options = {}) => {
|
|
2796
2791
|
const {
|
|
2797
2792
|
files = [GLOB_GITHUB_ACTION],
|
|
2798
2793
|
rules = {},
|
|
@@ -2815,8 +2810,7 @@ var configGitHubAction = (options = {}) => {
|
|
|
2815
2810
|
];
|
|
2816
2811
|
};
|
|
2817
2812
|
|
|
2818
|
-
|
|
2819
|
-
var configPerfectionist = (options = {}) => {
|
|
2813
|
+
const configPerfectionist = (options = {}) => {
|
|
2820
2814
|
const {
|
|
2821
2815
|
partitionByComment = PERFECTIONIST_EXTRA_RULE_OPTIONS.partitionByComment,
|
|
2822
2816
|
sortConstants: enableSortConstants = true,
|
|
@@ -2872,7 +2866,7 @@ var configPerfectionist = (options = {}) => {
|
|
|
2872
2866
|
}
|
|
2873
2867
|
]
|
|
2874
2868
|
};
|
|
2875
|
-
const
|
|
2869
|
+
const sharedRules = {
|
|
2876
2870
|
"perfectionist/sort-enums": [
|
|
2877
2871
|
"error",
|
|
2878
2872
|
{
|
|
@@ -2986,16 +2980,16 @@ var configPerfectionist = (options = {}) => {
|
|
|
2986
2980
|
}
|
|
2987
2981
|
]
|
|
2988
2982
|
};
|
|
2989
|
-
const
|
|
2983
|
+
const configs = [
|
|
2990
2984
|
{
|
|
2991
2985
|
name: options.all ? "ntnyq/perfectionist/all" : "ntnyq/perfectionist/common",
|
|
2992
2986
|
plugins: {
|
|
2993
|
-
perfectionist:
|
|
2987
|
+
perfectionist: pluginPerfectionist
|
|
2994
2988
|
},
|
|
2995
2989
|
rules: {
|
|
2996
2990
|
...commonRules,
|
|
2997
2991
|
...options.all ? {
|
|
2998
|
-
...
|
|
2992
|
+
...sharedRules,
|
|
2999
2993
|
...sortEnumsRules,
|
|
3000
2994
|
...sortTypesRules,
|
|
3001
2995
|
...sortConstantsRules,
|
|
@@ -3007,17 +3001,17 @@ var configPerfectionist = (options = {}) => {
|
|
|
3007
3001
|
}
|
|
3008
3002
|
];
|
|
3009
3003
|
if (options.all) {
|
|
3010
|
-
return
|
|
3004
|
+
return configs;
|
|
3011
3005
|
}
|
|
3012
3006
|
if (enableSortEnums) {
|
|
3013
|
-
|
|
3007
|
+
configs.push({
|
|
3014
3008
|
name: "ntnyq/perfectionist/enums",
|
|
3015
3009
|
files: [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`],
|
|
3016
3010
|
plugins: {
|
|
3017
|
-
perfectionist:
|
|
3011
|
+
perfectionist: pluginPerfectionist
|
|
3018
3012
|
},
|
|
3019
3013
|
rules: {
|
|
3020
|
-
...
|
|
3014
|
+
...sharedRules,
|
|
3021
3015
|
...sortEnumsRules,
|
|
3022
3016
|
// Overrides rules
|
|
3023
3017
|
...options.overridesEnumsRules
|
|
@@ -3025,14 +3019,14 @@ var configPerfectionist = (options = {}) => {
|
|
|
3025
3019
|
});
|
|
3026
3020
|
}
|
|
3027
3021
|
if (enableSortTypes) {
|
|
3028
|
-
|
|
3022
|
+
configs.push({
|
|
3029
3023
|
name: "ntnyq/perfectionist/types",
|
|
3030
3024
|
files: [...GLOB_TYPES],
|
|
3031
3025
|
plugins: {
|
|
3032
|
-
perfectionist:
|
|
3026
|
+
perfectionist: pluginPerfectionist
|
|
3033
3027
|
},
|
|
3034
3028
|
rules: {
|
|
3035
|
-
...
|
|
3029
|
+
...sharedRules,
|
|
3036
3030
|
...sortTypesRules,
|
|
3037
3031
|
// Overrides rules
|
|
3038
3032
|
...options.overridesTypesRules
|
|
@@ -3040,29 +3034,28 @@ var configPerfectionist = (options = {}) => {
|
|
|
3040
3034
|
});
|
|
3041
3035
|
}
|
|
3042
3036
|
if (enableSortConstants) {
|
|
3043
|
-
|
|
3037
|
+
configs.push({
|
|
3044
3038
|
name: "ntnyq/perfectionist/constants",
|
|
3045
3039
|
files: [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`],
|
|
3046
3040
|
plugins: {
|
|
3047
|
-
perfectionist:
|
|
3041
|
+
perfectionist: pluginPerfectionist
|
|
3048
3042
|
},
|
|
3049
3043
|
rules: {
|
|
3050
|
-
...
|
|
3044
|
+
...sharedRules,
|
|
3051
3045
|
...sortConstantsRules,
|
|
3052
3046
|
// Overrides rules
|
|
3053
3047
|
...options.overridesConstantsRules
|
|
3054
3048
|
}
|
|
3055
3049
|
});
|
|
3056
3050
|
}
|
|
3057
|
-
return
|
|
3051
|
+
return configs;
|
|
3058
3052
|
};
|
|
3059
3053
|
|
|
3060
|
-
|
|
3061
|
-
var configUnusedImports = (options = {}) => [
|
|
3054
|
+
const configUnusedImports = (options = {}) => [
|
|
3062
3055
|
{
|
|
3063
3056
|
name: "ntnyq/unused-imports",
|
|
3064
3057
|
plugins: {
|
|
3065
|
-
"unused-imports":
|
|
3058
|
+
"unused-imports": pluginUnusedImports
|
|
3066
3059
|
},
|
|
3067
3060
|
rules: {
|
|
3068
3061
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -3086,15 +3079,14 @@ var configUnusedImports = (options = {}) => [
|
|
|
3086
3079
|
}
|
|
3087
3080
|
];
|
|
3088
3081
|
|
|
3089
|
-
|
|
3090
|
-
var configESLintComments = (options = {}) => [
|
|
3082
|
+
const configESLintComments = (options = {}) => [
|
|
3091
3083
|
{
|
|
3092
3084
|
name: "ntnyq/eslint-comments",
|
|
3093
3085
|
plugins: {
|
|
3094
|
-
"@eslint-community/eslint-comments":
|
|
3086
|
+
"@eslint-community/eslint-comments": pluginComments
|
|
3095
3087
|
},
|
|
3096
3088
|
rules: {
|
|
3097
|
-
...
|
|
3089
|
+
...pluginComments.configs.recommended.rules,
|
|
3098
3090
|
"@eslint-community/eslint-comments/disable-enable-pair": [
|
|
3099
3091
|
"error",
|
|
3100
3092
|
{ allowWholeFile: true }
|
|
@@ -3105,7 +3097,6 @@ var configESLintComments = (options = {}) => [
|
|
|
3105
3097
|
}
|
|
3106
3098
|
];
|
|
3107
3099
|
|
|
3108
|
-
// src/core.ts
|
|
3109
3100
|
function defineESLintConfig(options = {}, ...userConfigs) {
|
|
3110
3101
|
const {
|
|
3111
3102
|
/**
|
|
@@ -3139,18 +3130,19 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3139
3130
|
githubAction: enableGitHubAction = true,
|
|
3140
3131
|
perfectionist: enablePerfectionist = true,
|
|
3141
3132
|
// disabled by default
|
|
3133
|
+
pnpm: enablePnpm = false,
|
|
3142
3134
|
svgo: enableSVGO = false,
|
|
3143
3135
|
eslintPlugin: enableESLintPlugin = false
|
|
3144
3136
|
} = options;
|
|
3145
|
-
const
|
|
3137
|
+
const configs = [];
|
|
3146
3138
|
const { extraFileExtensions = [] } = shareable;
|
|
3147
3139
|
if (enableVue) {
|
|
3148
3140
|
extraFileExtensions.push(".vue");
|
|
3149
3141
|
}
|
|
3150
3142
|
if (enableGitIgnore) {
|
|
3151
|
-
|
|
3143
|
+
configs.push(configGitIgnore(resolveSubOptions(options, "gitignore")));
|
|
3152
3144
|
}
|
|
3153
|
-
|
|
3145
|
+
configs.push(
|
|
3154
3146
|
configIgnores(options.ignores),
|
|
3155
3147
|
configJSX(),
|
|
3156
3148
|
configNode({
|
|
@@ -3176,7 +3168,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3176
3168
|
})
|
|
3177
3169
|
);
|
|
3178
3170
|
if (enablePerfectionist) {
|
|
3179
|
-
|
|
3171
|
+
configs.push(
|
|
3180
3172
|
configPerfectionist({
|
|
3181
3173
|
...resolveSubOptions(options, "perfectionist"),
|
|
3182
3174
|
overrides: getOverrides(options, "perfectionist")
|
|
@@ -3184,14 +3176,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3184
3176
|
);
|
|
3185
3177
|
}
|
|
3186
3178
|
if (enableUnicorn) {
|
|
3187
|
-
|
|
3179
|
+
configs.push(
|
|
3188
3180
|
configUnicorn({
|
|
3189
3181
|
overrides: getOverrides(options, "unicorn")
|
|
3190
3182
|
})
|
|
3191
3183
|
);
|
|
3192
3184
|
}
|
|
3193
3185
|
if (enablePinia) {
|
|
3194
|
-
|
|
3186
|
+
configs.push(
|
|
3195
3187
|
configPinia({
|
|
3196
3188
|
...resolveSubOptions(options, "pinia"),
|
|
3197
3189
|
overrides: getOverrides(options, "pinia")
|
|
@@ -3199,14 +3191,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3199
3191
|
);
|
|
3200
3192
|
}
|
|
3201
3193
|
if (enableDeMorgan) {
|
|
3202
|
-
|
|
3194
|
+
configs.push(
|
|
3203
3195
|
configDeMorgan({
|
|
3204
3196
|
overrides: getOverrides(options, "deMorgan")
|
|
3205
3197
|
})
|
|
3206
3198
|
);
|
|
3207
3199
|
}
|
|
3208
3200
|
if (enableRegexp) {
|
|
3209
|
-
|
|
3201
|
+
configs.push(
|
|
3210
3202
|
configRegexp({
|
|
3211
3203
|
...resolveSubOptions(options, "regexp"),
|
|
3212
3204
|
overrides: getOverrides(options, "regexp")
|
|
@@ -3214,7 +3206,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3214
3206
|
);
|
|
3215
3207
|
}
|
|
3216
3208
|
if (enableTypeScript) {
|
|
3217
|
-
|
|
3209
|
+
configs.push(
|
|
3218
3210
|
configTypeScript({
|
|
3219
3211
|
...resolveSubOptions(options, "typescript"),
|
|
3220
3212
|
overrides: getOverrides(options, "typescript"),
|
|
@@ -3223,17 +3215,16 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3223
3215
|
);
|
|
3224
3216
|
}
|
|
3225
3217
|
if (enableVue) {
|
|
3226
|
-
|
|
3218
|
+
configs.push(
|
|
3227
3219
|
configVue({
|
|
3228
3220
|
...resolveSubOptions(options, "vue"),
|
|
3229
|
-
typescript: !!enableTypeScript,
|
|
3230
3221
|
overrides: getOverrides(options, "vue"),
|
|
3231
3222
|
extraFileExtensions
|
|
3232
3223
|
})
|
|
3233
3224
|
);
|
|
3234
3225
|
}
|
|
3235
3226
|
if (enableYML) {
|
|
3236
|
-
|
|
3227
|
+
configs.push(
|
|
3237
3228
|
configYml({
|
|
3238
3229
|
...resolveSubOptions(options, "yml"),
|
|
3239
3230
|
overrides: getOverrides(options, "yml")
|
|
@@ -3241,7 +3232,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3241
3232
|
);
|
|
3242
3233
|
}
|
|
3243
3234
|
if (enableTOML) {
|
|
3244
|
-
|
|
3235
|
+
configs.push(
|
|
3245
3236
|
configToml({
|
|
3246
3237
|
...resolveSubOptions(options, "toml"),
|
|
3247
3238
|
overrides: getOverrides(options, "toml")
|
|
@@ -3249,7 +3240,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3249
3240
|
);
|
|
3250
3241
|
}
|
|
3251
3242
|
if (enableJSONC) {
|
|
3252
|
-
|
|
3243
|
+
configs.push(
|
|
3253
3244
|
configJsonc({
|
|
3254
3245
|
...resolveSubOptions(options, "jsonc"),
|
|
3255
3246
|
overrides: getOverrides(options, "jsonc")
|
|
@@ -3257,10 +3248,10 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3257
3248
|
);
|
|
3258
3249
|
}
|
|
3259
3250
|
if (enableSort) {
|
|
3260
|
-
|
|
3251
|
+
configs.push(configSort(resolveSubOptions(options, "sort")));
|
|
3261
3252
|
}
|
|
3262
3253
|
if (enableTest) {
|
|
3263
|
-
|
|
3254
|
+
configs.push(
|
|
3264
3255
|
configTest({
|
|
3265
3256
|
...resolveSubOptions(options, "test"),
|
|
3266
3257
|
overrides: getOverrides(options, "test")
|
|
@@ -3268,14 +3259,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3268
3259
|
);
|
|
3269
3260
|
}
|
|
3270
3261
|
if (enableUnoCSS) {
|
|
3271
|
-
|
|
3262
|
+
configs.push(
|
|
3272
3263
|
configUnoCSS({
|
|
3273
3264
|
overrides: getOverrides(options, "unocss")
|
|
3274
3265
|
})
|
|
3275
3266
|
);
|
|
3276
3267
|
}
|
|
3277
3268
|
if (enableMarkdown) {
|
|
3278
|
-
|
|
3269
|
+
configs.push(
|
|
3279
3270
|
configMarkdown({
|
|
3280
3271
|
...resolveSubOptions(options, "markdown"),
|
|
3281
3272
|
overrides: getOverrides(options, "markdown"),
|
|
@@ -3284,14 +3275,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3284
3275
|
);
|
|
3285
3276
|
}
|
|
3286
3277
|
if (enableAntfu) {
|
|
3287
|
-
|
|
3278
|
+
configs.push(
|
|
3288
3279
|
configAntfu({
|
|
3289
3280
|
overrides: getOverrides(options, "antfu")
|
|
3290
3281
|
})
|
|
3291
3282
|
);
|
|
3292
3283
|
}
|
|
3293
3284
|
if (enableDepend) {
|
|
3294
|
-
|
|
3285
|
+
configs.push(
|
|
3295
3286
|
configDepend({
|
|
3296
3287
|
...resolveSubOptions(options, "depend"),
|
|
3297
3288
|
overrides: getOverrides(options, "depend")
|
|
@@ -3299,175 +3290,51 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3299
3290
|
);
|
|
3300
3291
|
}
|
|
3301
3292
|
if (enableNtnyq) {
|
|
3302
|
-
|
|
3293
|
+
configs.push(
|
|
3303
3294
|
configNtnyq({
|
|
3304
3295
|
overrides: getOverrides(options, "ntnyq")
|
|
3305
3296
|
})
|
|
3306
3297
|
);
|
|
3307
3298
|
}
|
|
3308
3299
|
if (enableGitHubAction) {
|
|
3309
|
-
|
|
3300
|
+
configs.push(
|
|
3310
3301
|
configGitHubAction({
|
|
3311
3302
|
overrides: getOverrides(options, "githubAction")
|
|
3312
3303
|
})
|
|
3313
3304
|
);
|
|
3314
3305
|
}
|
|
3315
3306
|
if (enableESLintPlugin) {
|
|
3316
|
-
|
|
3307
|
+
configs.push(
|
|
3317
3308
|
configESLintPlugin({
|
|
3318
3309
|
overrides: getOverrides(options, "eslintPlugin")
|
|
3319
3310
|
})
|
|
3320
3311
|
);
|
|
3321
3312
|
}
|
|
3313
|
+
if (enablePnpm) {
|
|
3314
|
+
configs.push(
|
|
3315
|
+
configPnpm({
|
|
3316
|
+
...resolveSubOptions(options, "pnpm"),
|
|
3317
|
+
overrides: getOverrides(options, "pnpm")
|
|
3318
|
+
})
|
|
3319
|
+
);
|
|
3320
|
+
}
|
|
3322
3321
|
if (enableSVGO) {
|
|
3323
|
-
|
|
3322
|
+
configs.push(configSVGO(resolveSubOptions(options, "svgo")));
|
|
3324
3323
|
}
|
|
3325
|
-
const specialsConfigs = configSpecials(
|
|
3324
|
+
const specialsConfigs = configSpecials(
|
|
3325
|
+
resolveSubOptions(options, "specials")
|
|
3326
|
+
);
|
|
3326
3327
|
const prettierConfigs = enablePrettier ? configPrettier({
|
|
3327
3328
|
...resolveSubOptions(options, "prettier"),
|
|
3328
3329
|
overrides: getOverrides(options, "prettier")
|
|
3329
3330
|
}) : [];
|
|
3330
3331
|
const composer = new FlatConfigComposer(
|
|
3331
|
-
...
|
|
3332
|
+
...configs,
|
|
3332
3333
|
...userConfigs,
|
|
3333
3334
|
...specialsConfigs,
|
|
3334
3335
|
...prettierConfigs
|
|
3335
3336
|
);
|
|
3336
3337
|
return composer;
|
|
3337
3338
|
}
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
GLOB_ASTRO,
|
|
3341
|
-
GLOB_ASTRO_TS,
|
|
3342
|
-
GLOB_CSS,
|
|
3343
|
-
GLOB_DIST,
|
|
3344
|
-
GLOB_DTS,
|
|
3345
|
-
GLOB_EXCLUDE,
|
|
3346
|
-
GLOB_GITHUB_ACTION,
|
|
3347
|
-
GLOB_HTML,
|
|
3348
|
-
GLOB_JS,
|
|
3349
|
-
GLOB_JSON,
|
|
3350
|
-
GLOB_JSON5,
|
|
3351
|
-
GLOB_JSONC,
|
|
3352
|
-
GLOB_JSX,
|
|
3353
|
-
GLOB_JSX_ONLY,
|
|
3354
|
-
GLOB_LESS,
|
|
3355
|
-
GLOB_LOCKFILE,
|
|
3356
|
-
GLOB_MARKDOWN,
|
|
3357
|
-
GLOB_MARKDOWN_CODE,
|
|
3358
|
-
GLOB_MARKDOWN_NESTED,
|
|
3359
|
-
GLOB_NODE_MODULES,
|
|
3360
|
-
GLOB_PACKAGE_JSON,
|
|
3361
|
-
GLOB_PINIA_STORE,
|
|
3362
|
-
GLOB_POSTCSS,
|
|
3363
|
-
GLOB_SCSS,
|
|
3364
|
-
GLOB_SRC,
|
|
3365
|
-
GLOB_SRC_EXT,
|
|
3366
|
-
GLOB_STYLE,
|
|
3367
|
-
GLOB_SVELTE,
|
|
3368
|
-
GLOB_SVG,
|
|
3369
|
-
GLOB_TEST,
|
|
3370
|
-
GLOB_TOML,
|
|
3371
|
-
GLOB_TS,
|
|
3372
|
-
GLOB_TSCONFIG_JSON,
|
|
3373
|
-
GLOB_TSX,
|
|
3374
|
-
GLOB_TSX_ONLY,
|
|
3375
|
-
GLOB_TYPES,
|
|
3376
|
-
GLOB_TYPE_TEST,
|
|
3377
|
-
GLOB_VUE,
|
|
3378
|
-
GLOB_YAML,
|
|
3379
|
-
PERFECTIONIST_COMMON_RULE_OPTIONS,
|
|
3380
|
-
PERFECTIONIST_EXTRA_RULE_OPTIONS,
|
|
3381
|
-
PERFECTIONIST_SORT_CLASSES_GROUPS,
|
|
3382
|
-
PERFECTIONIST_SORT_IMPORTS_GROUPS,
|
|
3383
|
-
PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS,
|
|
3384
|
-
PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS,
|
|
3385
|
-
PERFECTIONIST_SORT_OBJECTS_GROUPS,
|
|
3386
|
-
PRETTIER_DEFAULT_OPTIONS,
|
|
3387
|
-
combineConfigs,
|
|
3388
|
-
configAntfu,
|
|
3389
|
-
configCommand,
|
|
3390
|
-
configDeMorgan,
|
|
3391
|
-
configDepend,
|
|
3392
|
-
configESLintComments,
|
|
3393
|
-
configESLintPlugin,
|
|
3394
|
-
configFormat,
|
|
3395
|
-
configGitHubAction,
|
|
3396
|
-
configGitIgnore,
|
|
3397
|
-
configIgnores,
|
|
3398
|
-
configImportX,
|
|
3399
|
-
configJSX,
|
|
3400
|
-
configJavaScript,
|
|
3401
|
-
configJsdoc,
|
|
3402
|
-
configJsonc,
|
|
3403
|
-
configMarkdown,
|
|
3404
|
-
configNode,
|
|
3405
|
-
configNtnyq,
|
|
3406
|
-
configPerfectionist,
|
|
3407
|
-
configPinia,
|
|
3408
|
-
configPrettier,
|
|
3409
|
-
configRegexp,
|
|
3410
|
-
configSVGO,
|
|
3411
|
-
configSort,
|
|
3412
|
-
configSpecials,
|
|
3413
|
-
configTest,
|
|
3414
|
-
configToml,
|
|
3415
|
-
configTypeScript,
|
|
3416
|
-
configUnicorn,
|
|
3417
|
-
configUnoCSS,
|
|
3418
|
-
configUnusedImports,
|
|
3419
|
-
configVue,
|
|
3420
|
-
configYml,
|
|
3421
|
-
configs as configsTypeScript,
|
|
3422
|
-
createNodeResolver,
|
|
3423
|
-
createTypeScriptImportResolver,
|
|
3424
|
-
defineESLintConfig,
|
|
3425
|
-
ensurePackages,
|
|
3426
|
-
getOverrides,
|
|
3427
|
-
hasPinia,
|
|
3428
|
-
hasShadcnVue,
|
|
3429
|
-
hasTypeScript,
|
|
3430
|
-
hasUnoCSS,
|
|
3431
|
-
hasVitest,
|
|
3432
|
-
hasVue,
|
|
3433
|
-
interopDefault,
|
|
3434
|
-
isInGitHooksOrRunByNanoStagedOrRunByTSX,
|
|
3435
|
-
mergePrettierOptions,
|
|
3436
|
-
mergeProcessors,
|
|
3437
|
-
parserJsonc,
|
|
3438
|
-
parserPlain,
|
|
3439
|
-
parserToml,
|
|
3440
|
-
parser as parserTypeScript,
|
|
3441
|
-
parserVue,
|
|
3442
|
-
parserYaml,
|
|
3443
|
-
default8 as pluginAntfu,
|
|
3444
|
-
default24 as pluginComments,
|
|
3445
|
-
default19 as pluginDeMorgan,
|
|
3446
|
-
pluginDepend,
|
|
3447
|
-
default13 as pluginFormat,
|
|
3448
|
-
default21 as pluginGitHubAction,
|
|
3449
|
-
default17 as pluginImportX,
|
|
3450
|
-
default9 as pluginJsdoc,
|
|
3451
|
-
default10 as pluginJsonc,
|
|
3452
|
-
default7 as pluginMarkdown,
|
|
3453
|
-
default20 as pluginNoOnlyTests,
|
|
3454
|
-
default2 as pluginNode,
|
|
3455
|
-
default11 as pluginNtnyq,
|
|
3456
|
-
default22 as pluginPerfectionist,
|
|
3457
|
-
default12 as pluginPinia,
|
|
3458
|
-
default18 as pluginPrettier,
|
|
3459
|
-
pluginRegexp,
|
|
3460
|
-
default5 as pluginSvgo,
|
|
3461
|
-
default6 as pluginToml,
|
|
3462
|
-
plugin as pluginTypeScript,
|
|
3463
|
-
default16 as pluginUnicorn,
|
|
3464
|
-
default14 as pluginUnoCSS,
|
|
3465
|
-
default23 as pluginUnusedImports,
|
|
3466
|
-
default15 as pluginVitest,
|
|
3467
|
-
default3 as pluginVue,
|
|
3468
|
-
default4 as pluginYml,
|
|
3469
|
-
processorPassThrough,
|
|
3470
|
-
default25 as processorVueBlocks,
|
|
3471
|
-
resolveSubOptions,
|
|
3472
|
-
toArray
|
|
3473
|
-
};
|
|
3339
|
+
|
|
3340
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_YAML, PERFECTIONIST_COMMON_RULE_OPTIONS, PERFECTIONIST_EXTRA_RULE_OPTIONS, PERFECTIONIST_SORT_CLASSES_GROUPS, PERFECTIONIST_SORT_IMPORTS_GROUPS, PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS, PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS, PERFECTIONIST_SORT_OBJECTS_GROUPS, PRETTIER_DEFAULT_OPTIONS, combineConfigs, configAntfu, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configFormat, configGitHubAction, configGitIgnore, configIgnores, configImportX, configJSX, configJavaScript, configJsdoc, configJsonc, configMarkdown, configNode, configNtnyq, configPerfectionist, configPinia, configPnpm, configPrettier, configRegexp, configSVGO, configSort, configSpecials, configTest, configToml, configTypeScript, configUnicorn, configUnoCSS, configUnusedImports, configVue, configYml, defineESLintConfig, ensurePackages, getOverrides, hasPinia, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunByNanoStagedOrRunByTSX, mergePrettierOptions, parserPlain, resolveSubOptions };
|