@ntnyq/eslint-config 4.0.0-beta.10 → 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 +40 -8
- package/dist/{index.d.ts → index.d.mts} +434 -186
- package/dist/{index.js → index.mjs} +398 -511
- package/package.json +21 -24
|
@@ -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,15 +420,18 @@ var unCategorizedRules = {
|
|
|
388
420
|
"vue/v-for-delimiter-style": ["error", "in"],
|
|
389
421
|
"vue/valid-define-options": "error"
|
|
390
422
|
};
|
|
391
|
-
|
|
392
|
-
const {
|
|
423
|
+
const configVue = (options = {}) => {
|
|
424
|
+
const {
|
|
425
|
+
files = [GLOB_VUE],
|
|
426
|
+
extraFileExtensions = []
|
|
427
|
+
} = options;
|
|
393
428
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
394
429
|
function getVueProcessor() {
|
|
395
|
-
const processorVueSFC =
|
|
430
|
+
const processorVueSFC = pluginVue.processors[".vue"];
|
|
396
431
|
if (!sfcBlocks) return processorVueSFC;
|
|
397
|
-
return
|
|
432
|
+
return mergeProcessors([
|
|
398
433
|
processorVueSFC,
|
|
399
|
-
|
|
434
|
+
processorVueBlocks({
|
|
400
435
|
...sfcBlocks,
|
|
401
436
|
blocks: {
|
|
402
437
|
styles: true,
|
|
@@ -410,7 +445,7 @@ var configVue = (options = {}) => {
|
|
|
410
445
|
name: "ntnyq/vue/setup",
|
|
411
446
|
plugins: {
|
|
412
447
|
"@typescript-eslint": plugin,
|
|
413
|
-
vue:
|
|
448
|
+
vue: pluginVue
|
|
414
449
|
}
|
|
415
450
|
},
|
|
416
451
|
{
|
|
@@ -421,8 +456,8 @@ var configVue = (options = {}) => {
|
|
|
421
456
|
parser: parserVue,
|
|
422
457
|
parserOptions: {
|
|
423
458
|
ecmaVersion: "latest",
|
|
424
|
-
extraFileExtensions
|
|
425
|
-
parser,
|
|
459
|
+
extraFileExtensions,
|
|
460
|
+
parser: parser,
|
|
426
461
|
sourceType: "module",
|
|
427
462
|
ecmaFeatures: {
|
|
428
463
|
jsx: true
|
|
@@ -510,6 +545,8 @@ var configVue = (options = {}) => {
|
|
|
510
545
|
"inheritAttrs",
|
|
511
546
|
"model",
|
|
512
547
|
["props", "propsData"],
|
|
548
|
+
"slots",
|
|
549
|
+
"expose",
|
|
513
550
|
"emits",
|
|
514
551
|
"setup",
|
|
515
552
|
"asyncData",
|
|
@@ -529,7 +566,7 @@ var configVue = (options = {}) => {
|
|
|
529
566
|
],
|
|
530
567
|
"vue/prop-name-casing": ["error", "camelCase"],
|
|
531
568
|
"vue/this-in-template": ["error", "never"],
|
|
532
|
-
...disabledRules,
|
|
569
|
+
...disabledRules$1,
|
|
533
570
|
...extensionRules,
|
|
534
571
|
...unCategorizedRules,
|
|
535
572
|
// Overrides rules
|
|
@@ -539,22 +576,21 @@ var configVue = (options = {}) => {
|
|
|
539
576
|
];
|
|
540
577
|
};
|
|
541
578
|
|
|
542
|
-
|
|
543
|
-
var configYml = (options = {}) => {
|
|
579
|
+
const configYml = (options = {}) => {
|
|
544
580
|
const { files = [GLOB_YAML] } = options;
|
|
545
581
|
return [
|
|
546
582
|
{
|
|
547
583
|
name: "ntnyq/yml",
|
|
548
584
|
files,
|
|
549
585
|
plugins: {
|
|
550
|
-
yml:
|
|
586
|
+
yml: pluginYml
|
|
551
587
|
},
|
|
552
588
|
languageOptions: {
|
|
553
589
|
parser: parserYaml
|
|
554
590
|
},
|
|
555
591
|
rules: {
|
|
556
|
-
...
|
|
557
|
-
...
|
|
592
|
+
...pluginYml.configs.standard.rules,
|
|
593
|
+
...pluginYml.configs.prettier.rules,
|
|
558
594
|
"yml/no-empty-mapping-value": "off",
|
|
559
595
|
"yml/quotes": ["error", { avoidEscape: false, prefer: "single" }],
|
|
560
596
|
// Overrides rules
|
|
@@ -564,12 +600,11 @@ var configYml = (options = {}) => {
|
|
|
564
600
|
];
|
|
565
601
|
};
|
|
566
602
|
|
|
567
|
-
|
|
568
|
-
var configNode = (options = {}) => [
|
|
603
|
+
const configNode = (options = {}) => [
|
|
569
604
|
{
|
|
570
605
|
name: "ntnyq/node",
|
|
571
606
|
plugins: {
|
|
572
|
-
node:
|
|
607
|
+
node: pluginNode
|
|
573
608
|
},
|
|
574
609
|
rules: {
|
|
575
610
|
"node/handle-callback-err": ["error", "^(err|error)$"],
|
|
@@ -586,9 +621,36 @@ var configNode = (options = {}) => [
|
|
|
586
621
|
}
|
|
587
622
|
];
|
|
588
623
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
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 = [];
|
|
592
654
|
const {
|
|
593
655
|
additionalJsonFiles = [],
|
|
594
656
|
additionalYamlFiles = [],
|
|
@@ -598,7 +660,7 @@ var configSort = (options = {}) => {
|
|
|
598
660
|
tsconfig: enableSortTsconfig = true
|
|
599
661
|
} = options;
|
|
600
662
|
if (enableSortTsconfig) {
|
|
601
|
-
|
|
663
|
+
configs.push({
|
|
602
664
|
name: "ntnyq/sort/tsconfig",
|
|
603
665
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
604
666
|
rules: {
|
|
@@ -658,6 +720,8 @@ var configSort = (options = {}) => {
|
|
|
658
720
|
"resolveJsonModule",
|
|
659
721
|
"allowArbitraryExtensions",
|
|
660
722
|
"noResolve",
|
|
723
|
+
"erasableSyntaxOnly",
|
|
724
|
+
"libReplacement",
|
|
661
725
|
/* JavaScript Support */
|
|
662
726
|
"allowJs",
|
|
663
727
|
"checkJs",
|
|
@@ -687,6 +751,7 @@ var configSort = (options = {}) => {
|
|
|
687
751
|
"declarationDir",
|
|
688
752
|
"preserveValueImports",
|
|
689
753
|
/* Interop Constraints */
|
|
754
|
+
"isolatedDeclarations",
|
|
690
755
|
"isolatedModules",
|
|
691
756
|
"verbatimModuleSyntax",
|
|
692
757
|
"allowSyntheticDefaultImports",
|
|
@@ -715,15 +780,24 @@ var configSort = (options = {}) => {
|
|
|
715
780
|
"useUnknownInCatchVariables",
|
|
716
781
|
/* Completeness */
|
|
717
782
|
"skipDefaultLibCheck",
|
|
718
|
-
"skipLibCheck"
|
|
783
|
+
"skipLibCheck",
|
|
784
|
+
{
|
|
785
|
+
order: {
|
|
786
|
+
type: "asc"
|
|
787
|
+
}
|
|
788
|
+
}
|
|
719
789
|
]
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
order: { type: "asc" },
|
|
793
|
+
pathPattern: "^vueCompilerOptions$"
|
|
720
794
|
}
|
|
721
795
|
]
|
|
722
796
|
}
|
|
723
797
|
});
|
|
724
798
|
}
|
|
725
799
|
if (enableSortPackageJson) {
|
|
726
|
-
|
|
800
|
+
configs.push({
|
|
727
801
|
name: "ntnyq/sort/package-json",
|
|
728
802
|
files: ["**/package.json"],
|
|
729
803
|
rules: {
|
|
@@ -837,7 +911,12 @@ var configSort = (options = {}) => {
|
|
|
837
911
|
"prettier",
|
|
838
912
|
"nano-staged",
|
|
839
913
|
"lint-staged",
|
|
840
|
-
"eslintConfig"
|
|
914
|
+
"eslintConfig",
|
|
915
|
+
{
|
|
916
|
+
order: {
|
|
917
|
+
type: "asc"
|
|
918
|
+
}
|
|
919
|
+
}
|
|
841
920
|
]
|
|
842
921
|
},
|
|
843
922
|
{
|
|
@@ -913,7 +992,7 @@ var configSort = (options = {}) => {
|
|
|
913
992
|
});
|
|
914
993
|
}
|
|
915
994
|
if (enableSortI18nLocale) {
|
|
916
|
-
|
|
995
|
+
configs.push(
|
|
917
996
|
{
|
|
918
997
|
name: "ntnyq/sort/i18n-locale/json",
|
|
919
998
|
files: ["**/{i18n,langs,locales}/*.json"],
|
|
@@ -943,7 +1022,7 @@ var configSort = (options = {}) => {
|
|
|
943
1022
|
);
|
|
944
1023
|
}
|
|
945
1024
|
if (enableSortPnpmWorkspace) {
|
|
946
|
-
|
|
1025
|
+
configs.push({
|
|
947
1026
|
name: "ntnyq/sort/pnpm-workspace",
|
|
948
1027
|
files: ["**/pnpm-workspace.yaml"],
|
|
949
1028
|
rules: {
|
|
@@ -958,7 +1037,7 @@ var configSort = (options = {}) => {
|
|
|
958
1037
|
});
|
|
959
1038
|
}
|
|
960
1039
|
if (additionalJsonFiles.length) {
|
|
961
|
-
|
|
1040
|
+
configs.push({
|
|
962
1041
|
name: "ntnyq/sort/additional-json",
|
|
963
1042
|
files: additionalJsonFiles,
|
|
964
1043
|
rules: {
|
|
@@ -973,7 +1052,7 @@ var configSort = (options = {}) => {
|
|
|
973
1052
|
});
|
|
974
1053
|
}
|
|
975
1054
|
if (additionalYamlFiles.length) {
|
|
976
|
-
|
|
1055
|
+
configs.push({
|
|
977
1056
|
name: "ntnyq/sort/additional-yaml",
|
|
978
1057
|
files: additionalYamlFiles,
|
|
979
1058
|
rules: {
|
|
@@ -987,11 +1066,10 @@ var configSort = (options = {}) => {
|
|
|
987
1066
|
}
|
|
988
1067
|
});
|
|
989
1068
|
}
|
|
990
|
-
return
|
|
1069
|
+
return configs;
|
|
991
1070
|
};
|
|
992
1071
|
|
|
993
|
-
|
|
994
|
-
var configSVGO = (options = {}) => {
|
|
1072
|
+
const configSVGO = (options = {}) => {
|
|
995
1073
|
const { files = [GLOB_SVG], ignores = [] } = options;
|
|
996
1074
|
return [
|
|
997
1075
|
{
|
|
@@ -999,7 +1077,7 @@ var configSVGO = (options = {}) => {
|
|
|
999
1077
|
files,
|
|
1000
1078
|
ignores,
|
|
1001
1079
|
plugins: {
|
|
1002
|
-
svgo:
|
|
1080
|
+
svgo: pluginSvgo
|
|
1003
1081
|
},
|
|
1004
1082
|
languageOptions: {
|
|
1005
1083
|
parser: parserPlain
|
|
@@ -1011,66 +1089,45 @@ var configSVGO = (options = {}) => {
|
|
|
1011
1089
|
];
|
|
1012
1090
|
};
|
|
1013
1091
|
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
var hasTypeScript = () => isPackageExists("typescript");
|
|
1021
|
-
var hasShadcnVue = () => isPackageExists("radix-vue") && isPackageExists("clsx");
|
|
1022
|
-
var hasUnoCSS = () => isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
|
|
1023
|
-
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", {
|
|
1024
1098
|
paths: [
|
|
1025
1099
|
resolve(process.cwd(), "playground"),
|
|
1026
1100
|
resolve(process.cwd(), "docs")
|
|
1027
1101
|
]
|
|
1028
1102
|
});
|
|
1029
1103
|
|
|
1030
|
-
// src/utils/toArray.ts
|
|
1031
|
-
function toArray(val) {
|
|
1032
|
-
val = val ?? [];
|
|
1033
|
-
return Array.isArray(val) ? val : [val];
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// src/utils/resolveSubOptions.ts
|
|
1037
1104
|
function resolveSubOptions(options, key) {
|
|
1038
1105
|
return typeof options[key] === "boolean" ? {} : options[key] || {};
|
|
1039
1106
|
}
|
|
1040
1107
|
|
|
1041
|
-
// src/utils/getOverrides.ts
|
|
1042
1108
|
function getOverrides(options, key) {
|
|
1043
1109
|
const subOptions = resolveSubOptions(options, key);
|
|
1044
1110
|
return "overrides" in subOptions && subOptions.overrides ? subOptions.overrides : {};
|
|
1045
1111
|
}
|
|
1046
1112
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
const resolved = await Promise.all(configs2);
|
|
1113
|
+
async function combineConfigs(...configs) {
|
|
1114
|
+
const resolved = await Promise.all(configs);
|
|
1050
1115
|
return resolved.flat();
|
|
1051
1116
|
}
|
|
1052
1117
|
|
|
1053
|
-
// src/utils/ensurePackages.ts
|
|
1054
|
-
import process3 from "node:process";
|
|
1055
|
-
import { fileURLToPath } from "node:url";
|
|
1056
|
-
import { isPackageExists as isPackageExists2 } from "local-pkg";
|
|
1057
|
-
|
|
1058
|
-
// src/utils/isInGitHooksOrRunByNanoStagedOrRunByTSX.ts
|
|
1059
|
-
import process2 from "node:process";
|
|
1060
1118
|
function isInGitHooksOrRunByNanoStagedOrRunByTSX() {
|
|
1061
|
-
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"));
|
|
1062
1120
|
}
|
|
1063
1121
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
var isCwdInScope = isPackageExists2("@ntnyq/eslint-config");
|
|
1122
|
+
const scopeUrl = fileURLToPath(new URL(".", import.meta.url));
|
|
1123
|
+
const isCwdInScope = isPackageExists("@ntnyq/eslint-config");
|
|
1067
1124
|
function isPackageInScope(name) {
|
|
1068
|
-
return
|
|
1125
|
+
return isPackageExists(name, {
|
|
1069
1126
|
paths: [scopeUrl]
|
|
1070
1127
|
});
|
|
1071
1128
|
}
|
|
1072
1129
|
async function ensurePackages(packages) {
|
|
1073
|
-
if (
|
|
1130
|
+
if (process.env.CI || !process.stdout.isTTY || isInGitHooksOrRunByNanoStagedOrRunByTSX() || !isCwdInScope) {
|
|
1074
1131
|
return;
|
|
1075
1132
|
}
|
|
1076
1133
|
const nonExistingPackages = packages.filter(
|
|
@@ -1079,13 +1136,13 @@ async function ensurePackages(packages) {
|
|
|
1079
1136
|
if (nonExistingPackages.length === 0) {
|
|
1080
1137
|
return;
|
|
1081
1138
|
}
|
|
1082
|
-
const { confirm } = await import(
|
|
1139
|
+
const { confirm } = await import('@clack/prompts');
|
|
1083
1140
|
const confirmInstall = await confirm({
|
|
1084
1141
|
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`
|
|
1085
1142
|
});
|
|
1086
1143
|
if (confirmInstall) {
|
|
1087
1144
|
try {
|
|
1088
|
-
const { installPackage } = await import(
|
|
1145
|
+
const { installPackage } = await import('@antfu/install-pkg');
|
|
1089
1146
|
await installPackage(nonExistingPackages, { dev: true });
|
|
1090
1147
|
} catch (err) {
|
|
1091
1148
|
console.log(err);
|
|
@@ -1093,13 +1150,11 @@ async function ensurePackages(packages) {
|
|
|
1093
1150
|
}
|
|
1094
1151
|
}
|
|
1095
1152
|
|
|
1096
|
-
// src/utils/interopDefault.ts
|
|
1097
1153
|
async function interopDefault(mod) {
|
|
1098
1154
|
const resolved = await mod;
|
|
1099
1155
|
return resolved.default || resolved;
|
|
1100
1156
|
}
|
|
1101
1157
|
|
|
1102
|
-
// src/utils/mergePrettierOptions.ts
|
|
1103
1158
|
function mergePrettierOptions(options = {}, overrides = {}) {
|
|
1104
1159
|
const result = {
|
|
1105
1160
|
...options,
|
|
@@ -1114,18 +1169,17 @@ function mergePrettierOptions(options = {}, overrides = {}) {
|
|
|
1114
1169
|
return result;
|
|
1115
1170
|
}
|
|
1116
1171
|
|
|
1117
|
-
|
|
1118
|
-
var configTest = (options = {}) => {
|
|
1172
|
+
const configTest = (options = {}) => {
|
|
1119
1173
|
const {
|
|
1120
1174
|
// default test files
|
|
1121
1175
|
files = [...GLOB_TEST],
|
|
1122
1176
|
vitest: enableVitest = hasVitest()
|
|
1123
1177
|
} = options;
|
|
1124
|
-
const
|
|
1178
|
+
const configs = [
|
|
1125
1179
|
{
|
|
1126
1180
|
name: "ntnyq/test/setup",
|
|
1127
1181
|
plugins: {
|
|
1128
|
-
"no-only-tests":
|
|
1182
|
+
"no-only-tests": pluginNoOnlyTests
|
|
1129
1183
|
}
|
|
1130
1184
|
},
|
|
1131
1185
|
{
|
|
@@ -1141,11 +1195,11 @@ var configTest = (options = {}) => {
|
|
|
1141
1195
|
}
|
|
1142
1196
|
];
|
|
1143
1197
|
if (enableVitest) {
|
|
1144
|
-
|
|
1198
|
+
configs.push({
|
|
1145
1199
|
name: "ntnyq/test/vitest",
|
|
1146
1200
|
files,
|
|
1147
1201
|
plugins: {
|
|
1148
|
-
vitest:
|
|
1202
|
+
vitest: pluginVitest
|
|
1149
1203
|
},
|
|
1150
1204
|
settings: {
|
|
1151
1205
|
/**
|
|
@@ -1157,7 +1211,7 @@ var configTest = (options = {}) => {
|
|
|
1157
1211
|
// },
|
|
1158
1212
|
},
|
|
1159
1213
|
rules: {
|
|
1160
|
-
...
|
|
1214
|
+
...pluginVitest.configs.recommended.rules,
|
|
1161
1215
|
"vitest/expect-expect": [
|
|
1162
1216
|
"error",
|
|
1163
1217
|
{
|
|
@@ -1177,18 +1231,17 @@ var configTest = (options = {}) => {
|
|
|
1177
1231
|
}
|
|
1178
1232
|
});
|
|
1179
1233
|
}
|
|
1180
|
-
return
|
|
1234
|
+
return configs;
|
|
1181
1235
|
};
|
|
1182
1236
|
|
|
1183
|
-
|
|
1184
|
-
var configToml = (options = {}) => {
|
|
1237
|
+
const configToml = (options = {}) => {
|
|
1185
1238
|
const { files = [GLOB_TOML] } = options;
|
|
1186
1239
|
return [
|
|
1187
1240
|
{
|
|
1188
1241
|
name: "ntnyq/toml",
|
|
1189
1242
|
files,
|
|
1190
1243
|
plugins: {
|
|
1191
|
-
toml:
|
|
1244
|
+
toml: pluginToml
|
|
1192
1245
|
},
|
|
1193
1246
|
languageOptions: {
|
|
1194
1247
|
parser: parserToml
|
|
@@ -1220,12 +1273,11 @@ var configToml = (options = {}) => {
|
|
|
1220
1273
|
];
|
|
1221
1274
|
};
|
|
1222
1275
|
|
|
1223
|
-
|
|
1224
|
-
var configAntfu = (options = {}) => [
|
|
1276
|
+
const configAntfu = (options = {}) => [
|
|
1225
1277
|
{
|
|
1226
1278
|
name: "ntnyq/antfu",
|
|
1227
1279
|
plugins: {
|
|
1228
|
-
antfu:
|
|
1280
|
+
antfu: pluginAntfu
|
|
1229
1281
|
},
|
|
1230
1282
|
rules: {
|
|
1231
1283
|
// required `object-curly-newline` to be disabled
|
|
@@ -1240,26 +1292,25 @@ var configAntfu = (options = {}) => [
|
|
|
1240
1292
|
}
|
|
1241
1293
|
];
|
|
1242
1294
|
|
|
1243
|
-
|
|
1244
|
-
var javscriptRules = {
|
|
1295
|
+
const javscriptRules = {
|
|
1245
1296
|
"jsdoc/no-types": "off",
|
|
1246
1297
|
"jsdoc/no-undefined-types": "error",
|
|
1247
1298
|
"jsdoc/require-param-type": "error",
|
|
1248
1299
|
"jsdoc/require-property-type": "error",
|
|
1249
1300
|
"jsdoc/require-returns-type": "error"
|
|
1250
1301
|
};
|
|
1251
|
-
|
|
1302
|
+
const typescriptRules = {
|
|
1252
1303
|
"jsdoc/no-undefined-types": "off",
|
|
1253
1304
|
"jsdoc/require-param-type": "off",
|
|
1254
1305
|
"jsdoc/require-property-type": "off",
|
|
1255
1306
|
"jsdoc/require-returns-type": "off",
|
|
1256
1307
|
"jsdoc/no-types": "error"
|
|
1257
1308
|
};
|
|
1258
|
-
|
|
1309
|
+
const configJsdoc = (options = {}) => [
|
|
1259
1310
|
{
|
|
1260
1311
|
name: "ntnyq/jsdoc",
|
|
1261
1312
|
plugins: {
|
|
1262
|
-
jsdoc:
|
|
1313
|
+
jsdoc: pluginJsdoc
|
|
1263
1314
|
},
|
|
1264
1315
|
rules: {
|
|
1265
1316
|
// Disabled rules
|
|
@@ -1332,21 +1383,20 @@ var configJsdoc = (options = {}) => [
|
|
|
1332
1383
|
}
|
|
1333
1384
|
];
|
|
1334
1385
|
|
|
1335
|
-
|
|
1336
|
-
var configJsonc = (options = {}) => {
|
|
1386
|
+
const configJsonc = (options = {}) => {
|
|
1337
1387
|
const { files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC] } = options;
|
|
1338
1388
|
return [
|
|
1339
1389
|
{
|
|
1340
1390
|
name: "ntnyq/jsonc",
|
|
1341
1391
|
files,
|
|
1342
1392
|
plugins: {
|
|
1343
|
-
jsonc:
|
|
1393
|
+
jsonc: pluginJsonc
|
|
1344
1394
|
},
|
|
1345
1395
|
languageOptions: {
|
|
1346
1396
|
parser: parserJsonc
|
|
1347
1397
|
},
|
|
1348
1398
|
rules: {
|
|
1349
|
-
...
|
|
1399
|
+
...pluginJsonc.configs["recommended-with-jsonc"].rules,
|
|
1350
1400
|
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
1351
1401
|
"jsonc/comma-dangle": ["error", "never"],
|
|
1352
1402
|
"jsonc/comma-style": ["error", "last"],
|
|
@@ -1380,12 +1430,11 @@ var configJsonc = (options = {}) => {
|
|
|
1380
1430
|
];
|
|
1381
1431
|
};
|
|
1382
1432
|
|
|
1383
|
-
|
|
1384
|
-
var configNtnyq = (options = {}) => [
|
|
1433
|
+
const configNtnyq = (options = {}) => [
|
|
1385
1434
|
{
|
|
1386
1435
|
name: "ntnyq/ntnyq",
|
|
1387
1436
|
plugins: {
|
|
1388
|
-
ntnyq:
|
|
1437
|
+
ntnyq: pluginNtnyq
|
|
1389
1438
|
},
|
|
1390
1439
|
rules: {
|
|
1391
1440
|
"ntnyq/no-duplicate-exports": "error",
|
|
@@ -1396,15 +1445,14 @@ var configNtnyq = (options = {}) => [
|
|
|
1396
1445
|
}
|
|
1397
1446
|
];
|
|
1398
1447
|
|
|
1399
|
-
|
|
1400
|
-
var configPinia = (options = {}) => {
|
|
1448
|
+
const configPinia = (options = {}) => {
|
|
1401
1449
|
const { files = [GLOB_PINIA_STORE] } = options;
|
|
1402
1450
|
return [
|
|
1403
1451
|
{
|
|
1404
1452
|
name: "ntnyq/pinia",
|
|
1405
1453
|
files,
|
|
1406
1454
|
plugins: {
|
|
1407
|
-
pinia:
|
|
1455
|
+
pinia: pluginPinia
|
|
1408
1456
|
},
|
|
1409
1457
|
rules: {
|
|
1410
1458
|
"pinia/never-export-initialized-store": "error",
|
|
@@ -1427,14 +1475,13 @@ var configPinia = (options = {}) => {
|
|
|
1427
1475
|
];
|
|
1428
1476
|
};
|
|
1429
1477
|
|
|
1430
|
-
|
|
1431
|
-
var configDepend = (options = {}) => {
|
|
1478
|
+
const configDepend = (options = {}) => {
|
|
1432
1479
|
const {
|
|
1433
1480
|
files = [GLOB_SRC],
|
|
1434
1481
|
// check package.json file
|
|
1435
1482
|
packageJson: enableCheckPackageJson = true
|
|
1436
1483
|
} = options;
|
|
1437
|
-
const
|
|
1484
|
+
const configs = [
|
|
1438
1485
|
{
|
|
1439
1486
|
name: "ntnyq/depend",
|
|
1440
1487
|
files,
|
|
@@ -1449,7 +1496,7 @@ var configDepend = (options = {}) => {
|
|
|
1449
1496
|
}
|
|
1450
1497
|
];
|
|
1451
1498
|
if (enableCheckPackageJson) {
|
|
1452
|
-
|
|
1499
|
+
configs.push({
|
|
1453
1500
|
name: "ntnyq/depend/package-json",
|
|
1454
1501
|
files: [GLOB_PACKAGE_JSON],
|
|
1455
1502
|
plugins: {
|
|
@@ -1465,11 +1512,10 @@ var configDepend = (options = {}) => {
|
|
|
1465
1512
|
}
|
|
1466
1513
|
});
|
|
1467
1514
|
}
|
|
1468
|
-
return
|
|
1515
|
+
return configs;
|
|
1469
1516
|
};
|
|
1470
1517
|
|
|
1471
|
-
|
|
1472
|
-
var PRETTIER_DEFAULT_OPTIONS = {
|
|
1518
|
+
const PRETTIER_DEFAULT_OPTIONS = {
|
|
1473
1519
|
arrowParens: "avoid",
|
|
1474
1520
|
bracketSameLine: false,
|
|
1475
1521
|
bracketSpacing: true,
|
|
@@ -1496,25 +1542,24 @@ var PRETTIER_DEFAULT_OPTIONS = {
|
|
|
1496
1542
|
vueIndentScriptAndStyle: false
|
|
1497
1543
|
};
|
|
1498
1544
|
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
// fallbackSort: { order: 'asc', type: 'alphabetical' },
|
|
1545
|
+
const PERFECTIONIST_COMMON_RULE_OPTIONS = {
|
|
1546
|
+
fallbackSort: { order: "asc", type: "alphabetical" },
|
|
1502
1547
|
ignoreCase: true,
|
|
1503
1548
|
order: "asc",
|
|
1504
1549
|
type: "alphabetical"
|
|
1505
1550
|
};
|
|
1506
|
-
|
|
1551
|
+
const PERFECTIONIST_EXTRA_RULE_OPTIONS = {
|
|
1507
1552
|
newlinesBetween: "ignore",
|
|
1508
1553
|
partitionByComment: ["@pg", "@perfectionist-group"]
|
|
1509
1554
|
};
|
|
1510
|
-
|
|
1555
|
+
const PERFECTIONIST_SORT_OBJECTS_GROUPS = [
|
|
1511
1556
|
"property",
|
|
1512
1557
|
"multiline-property",
|
|
1513
1558
|
"method",
|
|
1514
1559
|
"multiline-method",
|
|
1515
1560
|
"unknown"
|
|
1516
1561
|
];
|
|
1517
|
-
|
|
1562
|
+
const PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS = [
|
|
1518
1563
|
"required-property",
|
|
1519
1564
|
"optional-property",
|
|
1520
1565
|
"required-method",
|
|
@@ -1527,7 +1572,7 @@ var PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS = [
|
|
|
1527
1572
|
"index-signature",
|
|
1528
1573
|
"multiline-index-signature"
|
|
1529
1574
|
];
|
|
1530
|
-
|
|
1575
|
+
const PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS = [
|
|
1531
1576
|
/**
|
|
1532
1577
|
* eg. 'foobar', 24, false
|
|
1533
1578
|
*/
|
|
@@ -1577,7 +1622,7 @@ var PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS = [
|
|
|
1577
1622
|
*/
|
|
1578
1623
|
"nullish"
|
|
1579
1624
|
];
|
|
1580
|
-
|
|
1625
|
+
const PERFECTIONIST_SORT_IMPORTS_GROUPS = [
|
|
1581
1626
|
// Side effect style imports (e.g. 'normalize.css')
|
|
1582
1627
|
"side-effect-style",
|
|
1583
1628
|
// Styles (e.g. *.{css,scss,less})
|
|
@@ -1613,10 +1658,9 @@ var PERFECTIONIST_SORT_IMPORTS_GROUPS = [
|
|
|
1613
1658
|
*/
|
|
1614
1659
|
"unknown"
|
|
1615
1660
|
];
|
|
1616
|
-
|
|
1661
|
+
const PERFECTIONIST_SORT_CLASSES_GROUPS = ["unknown"];
|
|
1617
1662
|
|
|
1618
|
-
|
|
1619
|
-
var configFormat = (options = {}) => {
|
|
1663
|
+
const configFormat = (options = {}) => {
|
|
1620
1664
|
const {
|
|
1621
1665
|
css: enableCSS = true,
|
|
1622
1666
|
html: enableHTML = true,
|
|
@@ -1627,16 +1671,16 @@ var configFormat = (options = {}) => {
|
|
|
1627
1671
|
...PRETTIER_DEFAULT_OPTIONS,
|
|
1628
1672
|
...prettierOptions
|
|
1629
1673
|
};
|
|
1630
|
-
const
|
|
1674
|
+
const configs = [
|
|
1631
1675
|
{
|
|
1632
1676
|
name: "ntnyq/format/setup",
|
|
1633
1677
|
plugins: {
|
|
1634
|
-
format:
|
|
1678
|
+
format: pluginFormat
|
|
1635
1679
|
}
|
|
1636
1680
|
}
|
|
1637
1681
|
];
|
|
1638
1682
|
if (enableCSS) {
|
|
1639
|
-
|
|
1683
|
+
configs.push(
|
|
1640
1684
|
{
|
|
1641
1685
|
name: "ntnyq/format/css",
|
|
1642
1686
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
@@ -1685,7 +1729,7 @@ var configFormat = (options = {}) => {
|
|
|
1685
1729
|
);
|
|
1686
1730
|
}
|
|
1687
1731
|
if (enableHTML) {
|
|
1688
|
-
|
|
1732
|
+
configs.push({
|
|
1689
1733
|
name: "ntnyq/format/html",
|
|
1690
1734
|
files: [GLOB_HTML],
|
|
1691
1735
|
languageOptions: {
|
|
@@ -1701,19 +1745,18 @@ var configFormat = (options = {}) => {
|
|
|
1701
1745
|
}
|
|
1702
1746
|
});
|
|
1703
1747
|
}
|
|
1704
|
-
return
|
|
1748
|
+
return configs;
|
|
1705
1749
|
};
|
|
1706
1750
|
|
|
1707
|
-
|
|
1708
|
-
var configRegexp = (options = {}) => {
|
|
1751
|
+
const configRegexp = (options = {}) => {
|
|
1709
1752
|
const recommendedConfig = pluginRegexp.configs["flat/recommended"];
|
|
1710
|
-
const
|
|
1753
|
+
const recommendedRules = {
|
|
1711
1754
|
...recommendedConfig.rules
|
|
1712
1755
|
};
|
|
1713
1756
|
if (options.severity === "warn") {
|
|
1714
|
-
for (const key in
|
|
1715
|
-
if (
|
|
1716
|
-
|
|
1757
|
+
for (const key in recommendedRules) {
|
|
1758
|
+
if (recommendedRules[key] === "error") {
|
|
1759
|
+
recommendedRules[key] = "warn";
|
|
1717
1760
|
}
|
|
1718
1761
|
}
|
|
1719
1762
|
}
|
|
@@ -1722,7 +1765,7 @@ var configRegexp = (options = {}) => {
|
|
|
1722
1765
|
...recommendedConfig,
|
|
1723
1766
|
name: "ntnyq/regexp",
|
|
1724
1767
|
rules: {
|
|
1725
|
-
...
|
|
1768
|
+
...recommendedRules,
|
|
1726
1769
|
// Overrides rules
|
|
1727
1770
|
...options.overrides
|
|
1728
1771
|
}
|
|
@@ -1730,12 +1773,11 @@ var configRegexp = (options = {}) => {
|
|
|
1730
1773
|
];
|
|
1731
1774
|
};
|
|
1732
1775
|
|
|
1733
|
-
|
|
1734
|
-
var configUnoCSS = (options = {}) => [
|
|
1776
|
+
const configUnoCSS = (options = {}) => [
|
|
1735
1777
|
{
|
|
1736
1778
|
name: "ntnyq/unocss",
|
|
1737
1779
|
plugins: {
|
|
1738
|
-
unocss:
|
|
1780
|
+
unocss: pluginUnoCSS
|
|
1739
1781
|
},
|
|
1740
1782
|
rules: {
|
|
1741
1783
|
"unocss/order-attributify": options.attributify ? "error" : "off",
|
|
@@ -1746,13 +1788,7 @@ var configUnoCSS = (options = {}) => [
|
|
|
1746
1788
|
}
|
|
1747
1789
|
];
|
|
1748
1790
|
|
|
1749
|
-
|
|
1750
|
-
import { builtinCommands } from "eslint-plugin-command/commands";
|
|
1751
|
-
import createCommandConfig from "eslint-plugin-command/config";
|
|
1752
|
-
|
|
1753
|
-
// src/commands/regexper.ts
|
|
1754
|
-
import { defineCommand } from "eslint-plugin-command/commands";
|
|
1755
|
-
var regexper = defineCommand({
|
|
1791
|
+
const regexper = defineCommand({
|
|
1756
1792
|
name: "regexper",
|
|
1757
1793
|
// @regexper https://regexper.com/#%2F(%5Cb%7C%5Cs%7C%5E)(%40regexper)(%5Cs%5CS%2B)%3F(%5Cb%7C%5Cs%7C%24)%2F
|
|
1758
1794
|
match: /(\b|\s|^)(@regexper)(\s\S+)?(\b|\s|$)/,
|
|
@@ -1795,11 +1831,9 @@ var regexper = defineCommand({
|
|
|
1795
1831
|
}
|
|
1796
1832
|
});
|
|
1797
1833
|
|
|
1798
|
-
|
|
1799
|
-
var commands = [regexper];
|
|
1834
|
+
const commands = [regexper];
|
|
1800
1835
|
|
|
1801
|
-
|
|
1802
|
-
var configCommand = (options = {}) => [
|
|
1836
|
+
const configCommand = (options = {}) => [
|
|
1803
1837
|
{
|
|
1804
1838
|
...createCommandConfig({
|
|
1805
1839
|
...options,
|
|
@@ -1816,8 +1850,7 @@ var configCommand = (options = {}) => [
|
|
|
1816
1850
|
}
|
|
1817
1851
|
];
|
|
1818
1852
|
|
|
1819
|
-
|
|
1820
|
-
var configIgnores = (customIgnores = []) => [
|
|
1853
|
+
const configIgnores = (customIgnores = []) => [
|
|
1821
1854
|
{
|
|
1822
1855
|
name: "ntnyq/ignores",
|
|
1823
1856
|
ignores: [
|
|
@@ -1828,8 +1861,7 @@ var configIgnores = (customIgnores = []) => [
|
|
|
1828
1861
|
}
|
|
1829
1862
|
];
|
|
1830
1863
|
|
|
1831
|
-
|
|
1832
|
-
var configImportX = (options = {}) => {
|
|
1864
|
+
const configImportX = (options = {}) => {
|
|
1833
1865
|
const {
|
|
1834
1866
|
// use typescript resolve if possible
|
|
1835
1867
|
preferTypeScriptResolver = true,
|
|
@@ -1839,7 +1871,7 @@ var configImportX = (options = {}) => {
|
|
|
1839
1871
|
{
|
|
1840
1872
|
name: "ntnyq/import-x",
|
|
1841
1873
|
plugins: {
|
|
1842
|
-
"import-x":
|
|
1874
|
+
"import-x": pluginImportX
|
|
1843
1875
|
},
|
|
1844
1876
|
settings: {
|
|
1845
1877
|
"import-x/resolver-next": [
|
|
@@ -1853,7 +1885,7 @@ var configImportX = (options = {}) => {
|
|
|
1853
1885
|
".json",
|
|
1854
1886
|
".node"
|
|
1855
1887
|
]
|
|
1856
|
-
}) : createNodeResolver({
|
|
1888
|
+
}) : pluginImportX.createNodeResolver({
|
|
1857
1889
|
extensions: [".js", ".mjs", ".ts", ".mts", ".d.ts", ".json"]
|
|
1858
1890
|
})
|
|
1859
1891
|
]
|
|
@@ -1882,8 +1914,7 @@ var configImportX = (options = {}) => {
|
|
|
1882
1914
|
];
|
|
1883
1915
|
};
|
|
1884
1916
|
|
|
1885
|
-
|
|
1886
|
-
var disabledRules2 = {
|
|
1917
|
+
const disabledRules = {
|
|
1887
1918
|
"unicorn/better-regex": "off",
|
|
1888
1919
|
"unicorn/explicit-length-check": "off",
|
|
1889
1920
|
"unicorn/no-array-callback-reference": "off",
|
|
@@ -1893,11 +1924,11 @@ var disabledRules2 = {
|
|
|
1893
1924
|
"unicorn/prefer-global-this": "off",
|
|
1894
1925
|
"unicorn/prefer-top-level-await": "off"
|
|
1895
1926
|
};
|
|
1896
|
-
|
|
1927
|
+
const configUnicorn = (options = {}) => [
|
|
1897
1928
|
{
|
|
1898
1929
|
name: "ntnyq/unicorn",
|
|
1899
1930
|
plugins: {
|
|
1900
|
-
unicorn:
|
|
1931
|
+
unicorn: pluginUnicorn
|
|
1901
1932
|
},
|
|
1902
1933
|
rules: {
|
|
1903
1934
|
"unicorn/consistent-assert": "error",
|
|
@@ -1989,43 +2020,38 @@ var configUnicorn = (options = {}) => [
|
|
|
1989
2020
|
*/
|
|
1990
2021
|
"unicorn/prefer-set-has": "error",
|
|
1991
2022
|
"unicorn/prefer-set-size": "error",
|
|
1992
|
-
...
|
|
2023
|
+
...disabledRules,
|
|
1993
2024
|
// Overrides rules
|
|
1994
2025
|
...options.overrides
|
|
1995
2026
|
}
|
|
1996
2027
|
}
|
|
1997
2028
|
];
|
|
1998
2029
|
|
|
1999
|
-
|
|
2000
|
-
var configDeMorgan = (options = {}) => [
|
|
2030
|
+
const configDeMorgan = (options = {}) => [
|
|
2001
2031
|
{
|
|
2002
|
-
...
|
|
2032
|
+
...pluginDeMorgan.configs.recommended,
|
|
2003
2033
|
name: "ntnyq/de-morgan",
|
|
2004
2034
|
rules: {
|
|
2005
|
-
...
|
|
2035
|
+
...pluginDeMorgan.configs.recommended.rules,
|
|
2006
2036
|
// Overrides rules
|
|
2007
2037
|
...options.overrides
|
|
2008
2038
|
}
|
|
2009
2039
|
}
|
|
2010
2040
|
];
|
|
2011
2041
|
|
|
2012
|
-
|
|
2013
|
-
var configMarkdown = (options = {}) => {
|
|
2042
|
+
const configMarkdown = (options = {}) => {
|
|
2014
2043
|
const {
|
|
2015
2044
|
/**
|
|
2016
2045
|
* code block files
|
|
2017
2046
|
*/
|
|
2018
2047
|
files = [GLOB_MARKDOWN_CODE],
|
|
2019
|
-
|
|
2020
|
-
* other extensions
|
|
2021
|
-
*/
|
|
2022
|
-
extensions = []
|
|
2048
|
+
extraFileExtensions = []
|
|
2023
2049
|
} = options;
|
|
2024
|
-
const
|
|
2050
|
+
const configs$1 = [
|
|
2025
2051
|
/**
|
|
2026
2052
|
* extracting code blocks to be linted individually
|
|
2027
2053
|
*/
|
|
2028
|
-
...
|
|
2054
|
+
...pluginMarkdown.configs.processor.map((config) => ({
|
|
2029
2055
|
...config,
|
|
2030
2056
|
name: `ntnyq/${config.name}`
|
|
2031
2057
|
})),
|
|
@@ -2037,7 +2063,7 @@ var configMarkdown = (options = {}) => {
|
|
|
2037
2063
|
files,
|
|
2038
2064
|
ignores: [GLOB_MARKDOWN_NESTED],
|
|
2039
2065
|
processor: mergeProcessors([
|
|
2040
|
-
|
|
2066
|
+
pluginMarkdown.processors.markdown,
|
|
2041
2067
|
// Just pass through processor
|
|
2042
2068
|
processorPassThrough
|
|
2043
2069
|
])
|
|
@@ -2054,7 +2080,7 @@ var configMarkdown = (options = {}) => {
|
|
|
2054
2080
|
files: [
|
|
2055
2081
|
...files,
|
|
2056
2082
|
// more nested extensions to disable
|
|
2057
|
-
...
|
|
2083
|
+
...extraFileExtensions.map((ext) => `${GLOB_MARKDOWN}/**/*${ext}`)
|
|
2058
2084
|
],
|
|
2059
2085
|
languageOptions: {
|
|
2060
2086
|
parserOptions: {
|
|
@@ -2067,7 +2093,6 @@ var configMarkdown = (options = {}) => {
|
|
|
2067
2093
|
}
|
|
2068
2094
|
},
|
|
2069
2095
|
rules: {
|
|
2070
|
-
"@typescript-eslint/comma-dangle": "off",
|
|
2071
2096
|
"@typescript-eslint/consistent-type-imports": "off",
|
|
2072
2097
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
2073
2098
|
"@typescript-eslint/no-namespace": "off",
|
|
@@ -2094,11 +2119,10 @@ var configMarkdown = (options = {}) => {
|
|
|
2094
2119
|
}
|
|
2095
2120
|
}
|
|
2096
2121
|
];
|
|
2097
|
-
return
|
|
2122
|
+
return configs$1;
|
|
2098
2123
|
};
|
|
2099
2124
|
|
|
2100
|
-
|
|
2101
|
-
var configPrettier = (options = {}) => {
|
|
2125
|
+
const configPrettier = (options = {}) => {
|
|
2102
2126
|
const {
|
|
2103
2127
|
disabledFiles = [GLOB_SVG, GLOB_TOML, GLOB_ASTRO, GLOB_SVELTE],
|
|
2104
2128
|
// User defined disabled files
|
|
@@ -2108,7 +2132,7 @@ var configPrettier = (options = {}) => {
|
|
|
2108
2132
|
{
|
|
2109
2133
|
name: "ntnyq/prettier",
|
|
2110
2134
|
plugins: {
|
|
2111
|
-
prettier:
|
|
2135
|
+
prettier: pluginPrettier
|
|
2112
2136
|
},
|
|
2113
2137
|
rules: {
|
|
2114
2138
|
"vue/array-bracket-newline": "off",
|
|
@@ -2148,7 +2172,7 @@ var configPrettier = (options = {}) => {
|
|
|
2148
2172
|
"vue/space-infix-ops": "off",
|
|
2149
2173
|
"vue/space-unary-ops": "off",
|
|
2150
2174
|
"vue/template-curly-spacing": "off",
|
|
2151
|
-
...
|
|
2175
|
+
...pluginPrettier.configs.recommended.rules,
|
|
2152
2176
|
"prettier/prettier": options.severity || "warn",
|
|
2153
2177
|
// Overrides rules
|
|
2154
2178
|
...options.overrides
|
|
@@ -2161,7 +2185,7 @@ var configPrettier = (options = {}) => {
|
|
|
2161
2185
|
name: "ntnyq/prettier/disabled",
|
|
2162
2186
|
files: [...disabledFiles, ...userDisabledFiles],
|
|
2163
2187
|
plugins: {
|
|
2164
|
-
prettier:
|
|
2188
|
+
prettier: pluginPrettier
|
|
2165
2189
|
},
|
|
2166
2190
|
rules: {
|
|
2167
2191
|
"prettier/prettier": "off"
|
|
@@ -2170,14 +2194,12 @@ var configPrettier = (options = {}) => {
|
|
|
2170
2194
|
];
|
|
2171
2195
|
};
|
|
2172
2196
|
|
|
2173
|
-
|
|
2174
|
-
import globals from "globals";
|
|
2175
|
-
var configSpecials = (options = {}) => {
|
|
2197
|
+
const configSpecials = (options = {}) => {
|
|
2176
2198
|
const {
|
|
2177
2199
|
// Enable shadcn-vue support
|
|
2178
2200
|
shadcnVue: enableShadcnVue = hasShadcnVue()
|
|
2179
2201
|
} = options;
|
|
2180
|
-
const
|
|
2202
|
+
const configs = [
|
|
2181
2203
|
{
|
|
2182
2204
|
name: "ntnyq/specials/scripts",
|
|
2183
2205
|
files: [`**/scripts/${GLOB_SRC}`],
|
|
@@ -2232,8 +2254,8 @@ var configSpecials = (options = {}) => {
|
|
|
2232
2254
|
name: "ntnyq/specials/config-file",
|
|
2233
2255
|
files: [`**/*.config*.${GLOB_SRC_EXT}`],
|
|
2234
2256
|
plugins: {
|
|
2235
|
-
"import-x":
|
|
2236
|
-
perfectionist:
|
|
2257
|
+
"import-x": pluginImportX,
|
|
2258
|
+
perfectionist: pluginPerfectionist
|
|
2237
2259
|
},
|
|
2238
2260
|
rules: {
|
|
2239
2261
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
@@ -2253,7 +2275,7 @@ var configSpecials = (options = {}) => {
|
|
|
2253
2275
|
];
|
|
2254
2276
|
if (enableShadcnVue) {
|
|
2255
2277
|
const shadcnOptions = resolveSubOptions(options, "shadcnVue");
|
|
2256
|
-
|
|
2278
|
+
configs.push({
|
|
2257
2279
|
name: "ntnyq/specials/shadcn-vue",
|
|
2258
2280
|
files: shadcnOptions.files || [
|
|
2259
2281
|
"**/components/ui/**/*.ts",
|
|
@@ -2270,14 +2292,12 @@ var configSpecials = (options = {}) => {
|
|
|
2270
2292
|
});
|
|
2271
2293
|
}
|
|
2272
2294
|
if (options.specialCaseConfigs) {
|
|
2273
|
-
|
|
2295
|
+
configs.push(...options.specialCaseConfigs);
|
|
2274
2296
|
}
|
|
2275
|
-
return
|
|
2297
|
+
return configs;
|
|
2276
2298
|
};
|
|
2277
2299
|
|
|
2278
|
-
|
|
2279
|
-
import createGitIgnoreConfig from "eslint-config-flat-gitignore";
|
|
2280
|
-
var configGitIgnore = (options = {}) => {
|
|
2300
|
+
const configGitIgnore = (options = {}) => {
|
|
2281
2301
|
options.strict ??= false;
|
|
2282
2302
|
return [
|
|
2283
2303
|
{
|
|
@@ -2287,10 +2307,7 @@ var configGitIgnore = (options = {}) => {
|
|
|
2287
2307
|
];
|
|
2288
2308
|
};
|
|
2289
2309
|
|
|
2290
|
-
|
|
2291
|
-
import jsConfig from "@eslint/js";
|
|
2292
|
-
import globals2 from "globals";
|
|
2293
|
-
var strictRules = {
|
|
2310
|
+
const strictRules = {
|
|
2294
2311
|
complexity: ["error", { max: 30 }],
|
|
2295
2312
|
"max-depth": ["error", { max: 5 }],
|
|
2296
2313
|
"max-lines": [
|
|
@@ -2312,7 +2329,7 @@ var strictRules = {
|
|
|
2312
2329
|
"max-nested-callbacks": ["error", { max: 10 }],
|
|
2313
2330
|
"max-params": ["error", { max: 5 }]
|
|
2314
2331
|
};
|
|
2315
|
-
|
|
2332
|
+
const configJavaScript = (options = {}) => [
|
|
2316
2333
|
{
|
|
2317
2334
|
...jsConfig.configs.recommended,
|
|
2318
2335
|
name: "ntnyq/js/recommended"
|
|
@@ -2322,9 +2339,9 @@ var configJavaScript = (options = {}) => [
|
|
|
2322
2339
|
languageOptions: {
|
|
2323
2340
|
sourceType: "module",
|
|
2324
2341
|
globals: {
|
|
2325
|
-
...
|
|
2326
|
-
...
|
|
2327
|
-
...
|
|
2342
|
+
...globals.browser,
|
|
2343
|
+
...globals.es2021,
|
|
2344
|
+
...globals.node
|
|
2328
2345
|
}
|
|
2329
2346
|
},
|
|
2330
2347
|
rules: {
|
|
@@ -2510,7 +2527,7 @@ var configJavaScript = (options = {}) => [
|
|
|
2510
2527
|
}
|
|
2511
2528
|
}
|
|
2512
2529
|
];
|
|
2513
|
-
|
|
2530
|
+
const configJSX = () => [
|
|
2514
2531
|
{
|
|
2515
2532
|
name: "ntnyq/jsx",
|
|
2516
2533
|
files: [GLOB_JSX_ONLY],
|
|
@@ -2524,9 +2541,7 @@ var configJSX = () => [
|
|
|
2524
2541
|
}
|
|
2525
2542
|
];
|
|
2526
2543
|
|
|
2527
|
-
|
|
2528
|
-
import process4 from "node:process";
|
|
2529
|
-
var typeAwareRules = {
|
|
2544
|
+
const typeAwareRules = {
|
|
2530
2545
|
// too strict
|
|
2531
2546
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
2532
2547
|
"dot-notation": "off",
|
|
@@ -2558,16 +2573,17 @@ var typeAwareRules = {
|
|
|
2558
2573
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
2559
2574
|
"@typescript-eslint/unbound-method": "error"
|
|
2560
2575
|
};
|
|
2561
|
-
|
|
2576
|
+
const recommendedRules = configs.recommended.reduce(
|
|
2562
2577
|
(rules, config) => {
|
|
2563
2578
|
return { ...rules, ...config.rules || {} };
|
|
2564
2579
|
},
|
|
2565
2580
|
{}
|
|
2566
2581
|
);
|
|
2567
|
-
|
|
2582
|
+
const configTypeScript = (options = {}) => {
|
|
2568
2583
|
const enableTypeAwareLint = !!options?.tsconfigPath;
|
|
2569
2584
|
const {
|
|
2570
|
-
|
|
2585
|
+
allowDefaultProject = [],
|
|
2586
|
+
extraFileExtensions = [],
|
|
2571
2587
|
filesTypeAware = [GLOB_TS, GLOB_TSX],
|
|
2572
2588
|
ignoresTypeAware = [GLOB_ASTRO, `${GLOB_MARKDOWN}/**`],
|
|
2573
2589
|
overridesTypeAwareRules = {},
|
|
@@ -2576,17 +2592,17 @@ var configTypeScript = (options = {}) => {
|
|
|
2576
2592
|
const files = options.files ?? [
|
|
2577
2593
|
GLOB_TS,
|
|
2578
2594
|
GLOB_TSX,
|
|
2579
|
-
// Enable typescript in these
|
|
2580
|
-
...
|
|
2595
|
+
// Enable typescript in these files
|
|
2596
|
+
...extraFileExtensions.map((ext) => `**/*${ext}`)
|
|
2581
2597
|
];
|
|
2582
2598
|
function createParserConfig(enableTypeAware = false, files2 = [], ignores = []) {
|
|
2583
2599
|
const typescriptParserOptions = {
|
|
2584
|
-
extraFileExtensions
|
|
2600
|
+
extraFileExtensions,
|
|
2585
2601
|
sourceType: "module",
|
|
2586
2602
|
...enableTypeAware ? {
|
|
2587
|
-
tsconfigRootDir:
|
|
2603
|
+
tsconfigRootDir: process.cwd(),
|
|
2588
2604
|
projectService: {
|
|
2589
|
-
allowDefaultProject: ["./*.js"],
|
|
2605
|
+
allowDefaultProject: ["./*.js", ...allowDefaultProject],
|
|
2590
2606
|
defaultProject: options.tsconfigPath
|
|
2591
2607
|
}
|
|
2592
2608
|
} : {},
|
|
@@ -2597,7 +2613,7 @@ var configTypeScript = (options = {}) => {
|
|
|
2597
2613
|
files: files2,
|
|
2598
2614
|
ignores: [...ignores],
|
|
2599
2615
|
languageOptions: {
|
|
2600
|
-
parser,
|
|
2616
|
+
parser: parser,
|
|
2601
2617
|
parserOptions: typescriptParserOptions
|
|
2602
2618
|
}
|
|
2603
2619
|
};
|
|
@@ -2608,7 +2624,7 @@ var configTypeScript = (options = {}) => {
|
|
|
2608
2624
|
name: "ntnyq/ts/setup",
|
|
2609
2625
|
plugins: {
|
|
2610
2626
|
"@typescript-eslint": plugin,
|
|
2611
|
-
antfu:
|
|
2627
|
+
antfu: pluginAntfu
|
|
2612
2628
|
}
|
|
2613
2629
|
},
|
|
2614
2630
|
...enableTypeAwareLint ? [
|
|
@@ -2751,11 +2767,10 @@ var configTypeScript = (options = {}) => {
|
|
|
2751
2767
|
];
|
|
2752
2768
|
};
|
|
2753
2769
|
|
|
2754
|
-
|
|
2755
|
-
var configESLintPlugin = async (options = {}) => {
|
|
2770
|
+
const configESLintPlugin = async (options = {}) => {
|
|
2756
2771
|
await ensurePackages(["eslint-plugin-eslint-plugin"]);
|
|
2757
2772
|
const pluginESLintPlugin = await interopDefault(
|
|
2758
|
-
import(
|
|
2773
|
+
import('eslint-plugin-eslint-plugin')
|
|
2759
2774
|
);
|
|
2760
2775
|
return [
|
|
2761
2776
|
{
|
|
@@ -2772,9 +2787,7 @@ var configESLintPlugin = async (options = {}) => {
|
|
|
2772
2787
|
];
|
|
2773
2788
|
};
|
|
2774
2789
|
|
|
2775
|
-
|
|
2776
|
-
import { createConfig } from "eslint-plugin-github-action";
|
|
2777
|
-
var configGitHubAction = (options = {}) => {
|
|
2790
|
+
const configGitHubAction = (options = {}) => {
|
|
2778
2791
|
const {
|
|
2779
2792
|
files = [GLOB_GITHUB_ACTION],
|
|
2780
2793
|
rules = {},
|
|
@@ -2797,8 +2810,7 @@ var configGitHubAction = (options = {}) => {
|
|
|
2797
2810
|
];
|
|
2798
2811
|
};
|
|
2799
2812
|
|
|
2800
|
-
|
|
2801
|
-
var configPerfectionist = (options = {}) => {
|
|
2813
|
+
const configPerfectionist = (options = {}) => {
|
|
2802
2814
|
const {
|
|
2803
2815
|
partitionByComment = PERFECTIONIST_EXTRA_RULE_OPTIONS.partitionByComment,
|
|
2804
2816
|
sortConstants: enableSortConstants = true,
|
|
@@ -2854,7 +2866,7 @@ var configPerfectionist = (options = {}) => {
|
|
|
2854
2866
|
}
|
|
2855
2867
|
]
|
|
2856
2868
|
};
|
|
2857
|
-
const
|
|
2869
|
+
const sharedRules = {
|
|
2858
2870
|
"perfectionist/sort-enums": [
|
|
2859
2871
|
"error",
|
|
2860
2872
|
{
|
|
@@ -2968,16 +2980,16 @@ var configPerfectionist = (options = {}) => {
|
|
|
2968
2980
|
}
|
|
2969
2981
|
]
|
|
2970
2982
|
};
|
|
2971
|
-
const
|
|
2983
|
+
const configs = [
|
|
2972
2984
|
{
|
|
2973
2985
|
name: options.all ? "ntnyq/perfectionist/all" : "ntnyq/perfectionist/common",
|
|
2974
2986
|
plugins: {
|
|
2975
|
-
perfectionist:
|
|
2987
|
+
perfectionist: pluginPerfectionist
|
|
2976
2988
|
},
|
|
2977
2989
|
rules: {
|
|
2978
2990
|
...commonRules,
|
|
2979
2991
|
...options.all ? {
|
|
2980
|
-
...
|
|
2992
|
+
...sharedRules,
|
|
2981
2993
|
...sortEnumsRules,
|
|
2982
2994
|
...sortTypesRules,
|
|
2983
2995
|
...sortConstantsRules,
|
|
@@ -2989,17 +3001,17 @@ var configPerfectionist = (options = {}) => {
|
|
|
2989
3001
|
}
|
|
2990
3002
|
];
|
|
2991
3003
|
if (options.all) {
|
|
2992
|
-
return
|
|
3004
|
+
return configs;
|
|
2993
3005
|
}
|
|
2994
3006
|
if (enableSortEnums) {
|
|
2995
|
-
|
|
3007
|
+
configs.push({
|
|
2996
3008
|
name: "ntnyq/perfectionist/enums",
|
|
2997
3009
|
files: [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`],
|
|
2998
3010
|
plugins: {
|
|
2999
|
-
perfectionist:
|
|
3011
|
+
perfectionist: pluginPerfectionist
|
|
3000
3012
|
},
|
|
3001
3013
|
rules: {
|
|
3002
|
-
...
|
|
3014
|
+
...sharedRules,
|
|
3003
3015
|
...sortEnumsRules,
|
|
3004
3016
|
// Overrides rules
|
|
3005
3017
|
...options.overridesEnumsRules
|
|
@@ -3007,14 +3019,14 @@ var configPerfectionist = (options = {}) => {
|
|
|
3007
3019
|
});
|
|
3008
3020
|
}
|
|
3009
3021
|
if (enableSortTypes) {
|
|
3010
|
-
|
|
3022
|
+
configs.push({
|
|
3011
3023
|
name: "ntnyq/perfectionist/types",
|
|
3012
3024
|
files: [...GLOB_TYPES],
|
|
3013
3025
|
plugins: {
|
|
3014
|
-
perfectionist:
|
|
3026
|
+
perfectionist: pluginPerfectionist
|
|
3015
3027
|
},
|
|
3016
3028
|
rules: {
|
|
3017
|
-
...
|
|
3029
|
+
...sharedRules,
|
|
3018
3030
|
...sortTypesRules,
|
|
3019
3031
|
// Overrides rules
|
|
3020
3032
|
...options.overridesTypesRules
|
|
@@ -3022,29 +3034,28 @@ var configPerfectionist = (options = {}) => {
|
|
|
3022
3034
|
});
|
|
3023
3035
|
}
|
|
3024
3036
|
if (enableSortConstants) {
|
|
3025
|
-
|
|
3037
|
+
configs.push({
|
|
3026
3038
|
name: "ntnyq/perfectionist/constants",
|
|
3027
3039
|
files: [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`],
|
|
3028
3040
|
plugins: {
|
|
3029
|
-
perfectionist:
|
|
3041
|
+
perfectionist: pluginPerfectionist
|
|
3030
3042
|
},
|
|
3031
3043
|
rules: {
|
|
3032
|
-
...
|
|
3044
|
+
...sharedRules,
|
|
3033
3045
|
...sortConstantsRules,
|
|
3034
3046
|
// Overrides rules
|
|
3035
3047
|
...options.overridesConstantsRules
|
|
3036
3048
|
}
|
|
3037
3049
|
});
|
|
3038
3050
|
}
|
|
3039
|
-
return
|
|
3051
|
+
return configs;
|
|
3040
3052
|
};
|
|
3041
3053
|
|
|
3042
|
-
|
|
3043
|
-
var configUnusedImports = (options = {}) => [
|
|
3054
|
+
const configUnusedImports = (options = {}) => [
|
|
3044
3055
|
{
|
|
3045
3056
|
name: "ntnyq/unused-imports",
|
|
3046
3057
|
plugins: {
|
|
3047
|
-
"unused-imports":
|
|
3058
|
+
"unused-imports": pluginUnusedImports
|
|
3048
3059
|
},
|
|
3049
3060
|
rules: {
|
|
3050
3061
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -3068,15 +3079,14 @@ var configUnusedImports = (options = {}) => [
|
|
|
3068
3079
|
}
|
|
3069
3080
|
];
|
|
3070
3081
|
|
|
3071
|
-
|
|
3072
|
-
var configESLintComments = (options = {}) => [
|
|
3082
|
+
const configESLintComments = (options = {}) => [
|
|
3073
3083
|
{
|
|
3074
3084
|
name: "ntnyq/eslint-comments",
|
|
3075
3085
|
plugins: {
|
|
3076
|
-
"@eslint-community/eslint-comments":
|
|
3086
|
+
"@eslint-community/eslint-comments": pluginComments
|
|
3077
3087
|
},
|
|
3078
3088
|
rules: {
|
|
3079
|
-
...
|
|
3089
|
+
...pluginComments.configs.recommended.rules,
|
|
3080
3090
|
"@eslint-community/eslint-comments/disable-enable-pair": [
|
|
3081
3091
|
"error",
|
|
3082
3092
|
{ allowWholeFile: true }
|
|
@@ -3087,13 +3097,12 @@ var configESLintComments = (options = {}) => [
|
|
|
3087
3097
|
}
|
|
3088
3098
|
];
|
|
3089
3099
|
|
|
3090
|
-
// src/core.ts
|
|
3091
3100
|
function defineESLintConfig(options = {}, ...userConfigs) {
|
|
3092
3101
|
const {
|
|
3093
3102
|
/**
|
|
3094
|
-
*
|
|
3103
|
+
* Shareable options
|
|
3095
3104
|
*/
|
|
3096
|
-
|
|
3105
|
+
shareable = {},
|
|
3097
3106
|
/**
|
|
3098
3107
|
* Conditional by deps
|
|
3099
3108
|
*/
|
|
@@ -3121,17 +3130,19 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3121
3130
|
githubAction: enableGitHubAction = true,
|
|
3122
3131
|
perfectionist: enablePerfectionist = true,
|
|
3123
3132
|
// disabled by default
|
|
3133
|
+
pnpm: enablePnpm = false,
|
|
3124
3134
|
svgo: enableSVGO = false,
|
|
3125
3135
|
eslintPlugin: enableESLintPlugin = false
|
|
3126
3136
|
} = options;
|
|
3127
|
-
const
|
|
3137
|
+
const configs = [];
|
|
3138
|
+
const { extraFileExtensions = [] } = shareable;
|
|
3128
3139
|
if (enableVue) {
|
|
3129
|
-
|
|
3140
|
+
extraFileExtensions.push(".vue");
|
|
3130
3141
|
}
|
|
3131
3142
|
if (enableGitIgnore) {
|
|
3132
|
-
|
|
3143
|
+
configs.push(configGitIgnore(resolveSubOptions(options, "gitignore")));
|
|
3133
3144
|
}
|
|
3134
|
-
|
|
3145
|
+
configs.push(
|
|
3135
3146
|
configIgnores(options.ignores),
|
|
3136
3147
|
configJSX(),
|
|
3137
3148
|
configNode({
|
|
@@ -3157,7 +3168,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3157
3168
|
})
|
|
3158
3169
|
);
|
|
3159
3170
|
if (enablePerfectionist) {
|
|
3160
|
-
|
|
3171
|
+
configs.push(
|
|
3161
3172
|
configPerfectionist({
|
|
3162
3173
|
...resolveSubOptions(options, "perfectionist"),
|
|
3163
3174
|
overrides: getOverrides(options, "perfectionist")
|
|
@@ -3165,14 +3176,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3165
3176
|
);
|
|
3166
3177
|
}
|
|
3167
3178
|
if (enableUnicorn) {
|
|
3168
|
-
|
|
3179
|
+
configs.push(
|
|
3169
3180
|
configUnicorn({
|
|
3170
3181
|
overrides: getOverrides(options, "unicorn")
|
|
3171
3182
|
})
|
|
3172
3183
|
);
|
|
3173
3184
|
}
|
|
3174
3185
|
if (enablePinia) {
|
|
3175
|
-
|
|
3186
|
+
configs.push(
|
|
3176
3187
|
configPinia({
|
|
3177
3188
|
...resolveSubOptions(options, "pinia"),
|
|
3178
3189
|
overrides: getOverrides(options, "pinia")
|
|
@@ -3180,14 +3191,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3180
3191
|
);
|
|
3181
3192
|
}
|
|
3182
3193
|
if (enableDeMorgan) {
|
|
3183
|
-
|
|
3194
|
+
configs.push(
|
|
3184
3195
|
configDeMorgan({
|
|
3185
3196
|
overrides: getOverrides(options, "deMorgan")
|
|
3186
3197
|
})
|
|
3187
3198
|
);
|
|
3188
3199
|
}
|
|
3189
3200
|
if (enableRegexp) {
|
|
3190
|
-
|
|
3201
|
+
configs.push(
|
|
3191
3202
|
configRegexp({
|
|
3192
3203
|
...resolveSubOptions(options, "regexp"),
|
|
3193
3204
|
overrides: getOverrides(options, "regexp")
|
|
@@ -3195,25 +3206,25 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3195
3206
|
);
|
|
3196
3207
|
}
|
|
3197
3208
|
if (enableTypeScript) {
|
|
3198
|
-
|
|
3209
|
+
configs.push(
|
|
3199
3210
|
configTypeScript({
|
|
3200
3211
|
...resolveSubOptions(options, "typescript"),
|
|
3201
|
-
|
|
3202
|
-
|
|
3212
|
+
overrides: getOverrides(options, "typescript"),
|
|
3213
|
+
extraFileExtensions
|
|
3203
3214
|
})
|
|
3204
3215
|
);
|
|
3205
3216
|
}
|
|
3206
3217
|
if (enableVue) {
|
|
3207
|
-
|
|
3218
|
+
configs.push(
|
|
3208
3219
|
configVue({
|
|
3209
3220
|
...resolveSubOptions(options, "vue"),
|
|
3210
|
-
|
|
3211
|
-
|
|
3221
|
+
overrides: getOverrides(options, "vue"),
|
|
3222
|
+
extraFileExtensions
|
|
3212
3223
|
})
|
|
3213
3224
|
);
|
|
3214
3225
|
}
|
|
3215
3226
|
if (enableYML) {
|
|
3216
|
-
|
|
3227
|
+
configs.push(
|
|
3217
3228
|
configYml({
|
|
3218
3229
|
...resolveSubOptions(options, "yml"),
|
|
3219
3230
|
overrides: getOverrides(options, "yml")
|
|
@@ -3221,7 +3232,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3221
3232
|
);
|
|
3222
3233
|
}
|
|
3223
3234
|
if (enableTOML) {
|
|
3224
|
-
|
|
3235
|
+
configs.push(
|
|
3225
3236
|
configToml({
|
|
3226
3237
|
...resolveSubOptions(options, "toml"),
|
|
3227
3238
|
overrides: getOverrides(options, "toml")
|
|
@@ -3229,7 +3240,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3229
3240
|
);
|
|
3230
3241
|
}
|
|
3231
3242
|
if (enableJSONC) {
|
|
3232
|
-
|
|
3243
|
+
configs.push(
|
|
3233
3244
|
configJsonc({
|
|
3234
3245
|
...resolveSubOptions(options, "jsonc"),
|
|
3235
3246
|
overrides: getOverrides(options, "jsonc")
|
|
@@ -3237,10 +3248,10 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3237
3248
|
);
|
|
3238
3249
|
}
|
|
3239
3250
|
if (enableSort) {
|
|
3240
|
-
|
|
3251
|
+
configs.push(configSort(resolveSubOptions(options, "sort")));
|
|
3241
3252
|
}
|
|
3242
3253
|
if (enableTest) {
|
|
3243
|
-
|
|
3254
|
+
configs.push(
|
|
3244
3255
|
configTest({
|
|
3245
3256
|
...resolveSubOptions(options, "test"),
|
|
3246
3257
|
overrides: getOverrides(options, "test")
|
|
@@ -3248,30 +3259,30 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3248
3259
|
);
|
|
3249
3260
|
}
|
|
3250
3261
|
if (enableUnoCSS) {
|
|
3251
|
-
|
|
3262
|
+
configs.push(
|
|
3252
3263
|
configUnoCSS({
|
|
3253
3264
|
overrides: getOverrides(options, "unocss")
|
|
3254
3265
|
})
|
|
3255
3266
|
);
|
|
3256
3267
|
}
|
|
3257
3268
|
if (enableMarkdown) {
|
|
3258
|
-
|
|
3269
|
+
configs.push(
|
|
3259
3270
|
configMarkdown({
|
|
3260
3271
|
...resolveSubOptions(options, "markdown"),
|
|
3261
|
-
|
|
3262
|
-
|
|
3272
|
+
overrides: getOverrides(options, "markdown"),
|
|
3273
|
+
extraFileExtensions
|
|
3263
3274
|
})
|
|
3264
3275
|
);
|
|
3265
3276
|
}
|
|
3266
3277
|
if (enableAntfu) {
|
|
3267
|
-
|
|
3278
|
+
configs.push(
|
|
3268
3279
|
configAntfu({
|
|
3269
3280
|
overrides: getOverrides(options, "antfu")
|
|
3270
3281
|
})
|
|
3271
3282
|
);
|
|
3272
3283
|
}
|
|
3273
3284
|
if (enableDepend) {
|
|
3274
|
-
|
|
3285
|
+
configs.push(
|
|
3275
3286
|
configDepend({
|
|
3276
3287
|
...resolveSubOptions(options, "depend"),
|
|
3277
3288
|
overrides: getOverrides(options, "depend")
|
|
@@ -3279,175 +3290,51 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3279
3290
|
);
|
|
3280
3291
|
}
|
|
3281
3292
|
if (enableNtnyq) {
|
|
3282
|
-
|
|
3293
|
+
configs.push(
|
|
3283
3294
|
configNtnyq({
|
|
3284
3295
|
overrides: getOverrides(options, "ntnyq")
|
|
3285
3296
|
})
|
|
3286
3297
|
);
|
|
3287
3298
|
}
|
|
3288
3299
|
if (enableGitHubAction) {
|
|
3289
|
-
|
|
3300
|
+
configs.push(
|
|
3290
3301
|
configGitHubAction({
|
|
3291
3302
|
overrides: getOverrides(options, "githubAction")
|
|
3292
3303
|
})
|
|
3293
3304
|
);
|
|
3294
3305
|
}
|
|
3295
3306
|
if (enableESLintPlugin) {
|
|
3296
|
-
|
|
3307
|
+
configs.push(
|
|
3297
3308
|
configESLintPlugin({
|
|
3298
3309
|
overrides: getOverrides(options, "eslintPlugin")
|
|
3299
3310
|
})
|
|
3300
3311
|
);
|
|
3301
3312
|
}
|
|
3313
|
+
if (enablePnpm) {
|
|
3314
|
+
configs.push(
|
|
3315
|
+
configPnpm({
|
|
3316
|
+
...resolveSubOptions(options, "pnpm"),
|
|
3317
|
+
overrides: getOverrides(options, "pnpm")
|
|
3318
|
+
})
|
|
3319
|
+
);
|
|
3320
|
+
}
|
|
3302
3321
|
if (enableSVGO) {
|
|
3303
|
-
|
|
3322
|
+
configs.push(configSVGO(resolveSubOptions(options, "svgo")));
|
|
3304
3323
|
}
|
|
3305
|
-
const specialsConfigs = configSpecials(
|
|
3324
|
+
const specialsConfigs = configSpecials(
|
|
3325
|
+
resolveSubOptions(options, "specials")
|
|
3326
|
+
);
|
|
3306
3327
|
const prettierConfigs = enablePrettier ? configPrettier({
|
|
3307
3328
|
...resolveSubOptions(options, "prettier"),
|
|
3308
3329
|
overrides: getOverrides(options, "prettier")
|
|
3309
3330
|
}) : [];
|
|
3310
3331
|
const composer = new FlatConfigComposer(
|
|
3311
|
-
...
|
|
3332
|
+
...configs,
|
|
3312
3333
|
...userConfigs,
|
|
3313
3334
|
...specialsConfigs,
|
|
3314
3335
|
...prettierConfigs
|
|
3315
3336
|
);
|
|
3316
3337
|
return composer;
|
|
3317
3338
|
}
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
GLOB_ASTRO,
|
|
3321
|
-
GLOB_ASTRO_TS,
|
|
3322
|
-
GLOB_CSS,
|
|
3323
|
-
GLOB_DIST,
|
|
3324
|
-
GLOB_DTS,
|
|
3325
|
-
GLOB_EXCLUDE,
|
|
3326
|
-
GLOB_GITHUB_ACTION,
|
|
3327
|
-
GLOB_HTML,
|
|
3328
|
-
GLOB_JS,
|
|
3329
|
-
GLOB_JSON,
|
|
3330
|
-
GLOB_JSON5,
|
|
3331
|
-
GLOB_JSONC,
|
|
3332
|
-
GLOB_JSX,
|
|
3333
|
-
GLOB_JSX_ONLY,
|
|
3334
|
-
GLOB_LESS,
|
|
3335
|
-
GLOB_LOCKFILE,
|
|
3336
|
-
GLOB_MARKDOWN,
|
|
3337
|
-
GLOB_MARKDOWN_CODE,
|
|
3338
|
-
GLOB_MARKDOWN_NESTED,
|
|
3339
|
-
GLOB_NODE_MODULES,
|
|
3340
|
-
GLOB_PACKAGE_JSON,
|
|
3341
|
-
GLOB_PINIA_STORE,
|
|
3342
|
-
GLOB_POSTCSS,
|
|
3343
|
-
GLOB_SCSS,
|
|
3344
|
-
GLOB_SRC,
|
|
3345
|
-
GLOB_SRC_EXT,
|
|
3346
|
-
GLOB_STYLE,
|
|
3347
|
-
GLOB_SVELTE,
|
|
3348
|
-
GLOB_SVG,
|
|
3349
|
-
GLOB_TEST,
|
|
3350
|
-
GLOB_TOML,
|
|
3351
|
-
GLOB_TS,
|
|
3352
|
-
GLOB_TSCONFIG_JSON,
|
|
3353
|
-
GLOB_TSX,
|
|
3354
|
-
GLOB_TSX_ONLY,
|
|
3355
|
-
GLOB_TYPES,
|
|
3356
|
-
GLOB_TYPE_TEST,
|
|
3357
|
-
GLOB_VUE,
|
|
3358
|
-
GLOB_YAML,
|
|
3359
|
-
PERFECTIONIST_COMMON_RULE_OPTIONS,
|
|
3360
|
-
PERFECTIONIST_EXTRA_RULE_OPTIONS,
|
|
3361
|
-
PERFECTIONIST_SORT_CLASSES_GROUPS,
|
|
3362
|
-
PERFECTIONIST_SORT_IMPORTS_GROUPS,
|
|
3363
|
-
PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS,
|
|
3364
|
-
PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS,
|
|
3365
|
-
PERFECTIONIST_SORT_OBJECTS_GROUPS,
|
|
3366
|
-
PRETTIER_DEFAULT_OPTIONS,
|
|
3367
|
-
combineConfigs,
|
|
3368
|
-
configAntfu,
|
|
3369
|
-
configCommand,
|
|
3370
|
-
configDeMorgan,
|
|
3371
|
-
configDepend,
|
|
3372
|
-
configESLintComments,
|
|
3373
|
-
configESLintPlugin,
|
|
3374
|
-
configFormat,
|
|
3375
|
-
configGitHubAction,
|
|
3376
|
-
configGitIgnore,
|
|
3377
|
-
configIgnores,
|
|
3378
|
-
configImportX,
|
|
3379
|
-
configJSX,
|
|
3380
|
-
configJavaScript,
|
|
3381
|
-
configJsdoc,
|
|
3382
|
-
configJsonc,
|
|
3383
|
-
configMarkdown,
|
|
3384
|
-
configNode,
|
|
3385
|
-
configNtnyq,
|
|
3386
|
-
configPerfectionist,
|
|
3387
|
-
configPinia,
|
|
3388
|
-
configPrettier,
|
|
3389
|
-
configRegexp,
|
|
3390
|
-
configSVGO,
|
|
3391
|
-
configSort,
|
|
3392
|
-
configSpecials,
|
|
3393
|
-
configTest,
|
|
3394
|
-
configToml,
|
|
3395
|
-
configTypeScript,
|
|
3396
|
-
configUnicorn,
|
|
3397
|
-
configUnoCSS,
|
|
3398
|
-
configUnusedImports,
|
|
3399
|
-
configVue,
|
|
3400
|
-
configYml,
|
|
3401
|
-
configs as configsTypeScript,
|
|
3402
|
-
createNodeResolver,
|
|
3403
|
-
createTypeScriptImportResolver,
|
|
3404
|
-
defineESLintConfig,
|
|
3405
|
-
ensurePackages,
|
|
3406
|
-
getOverrides,
|
|
3407
|
-
hasPinia,
|
|
3408
|
-
hasShadcnVue,
|
|
3409
|
-
hasTypeScript,
|
|
3410
|
-
hasUnoCSS,
|
|
3411
|
-
hasVitest,
|
|
3412
|
-
hasVue,
|
|
3413
|
-
interopDefault,
|
|
3414
|
-
isInGitHooksOrRunByNanoStagedOrRunByTSX,
|
|
3415
|
-
mergePrettierOptions,
|
|
3416
|
-
mergeProcessors,
|
|
3417
|
-
parserJsonc,
|
|
3418
|
-
parserPlain,
|
|
3419
|
-
parserToml,
|
|
3420
|
-
parser as parserTypeScript,
|
|
3421
|
-
parserVue,
|
|
3422
|
-
parserYaml,
|
|
3423
|
-
default8 as pluginAntfu,
|
|
3424
|
-
default24 as pluginComments,
|
|
3425
|
-
default19 as pluginDeMorgan,
|
|
3426
|
-
pluginDepend,
|
|
3427
|
-
default13 as pluginFormat,
|
|
3428
|
-
default21 as pluginGitHubAction,
|
|
3429
|
-
default17 as pluginImportX,
|
|
3430
|
-
default9 as pluginJsdoc,
|
|
3431
|
-
default10 as pluginJsonc,
|
|
3432
|
-
default7 as pluginMarkdown,
|
|
3433
|
-
default20 as pluginNoOnlyTests,
|
|
3434
|
-
default2 as pluginNode,
|
|
3435
|
-
default12 as pluginNtnyq,
|
|
3436
|
-
default22 as pluginPerfectionist,
|
|
3437
|
-
default11 as pluginPinia,
|
|
3438
|
-
default18 as pluginPrettier,
|
|
3439
|
-
pluginRegexp,
|
|
3440
|
-
default5 as pluginSvgo,
|
|
3441
|
-
default6 as pluginToml,
|
|
3442
|
-
plugin as pluginTypeScript,
|
|
3443
|
-
default16 as pluginUnicorn,
|
|
3444
|
-
default14 as pluginUnoCSS,
|
|
3445
|
-
default23 as pluginUnusedImports,
|
|
3446
|
-
default15 as pluginVitest,
|
|
3447
|
-
default3 as pluginVue,
|
|
3448
|
-
default4 as pluginYml,
|
|
3449
|
-
processorPassThrough,
|
|
3450
|
-
default25 as processorVueBlocks,
|
|
3451
|
-
resolveSubOptions,
|
|
3452
|
-
toArray
|
|
3453
|
-
};
|
|
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 };
|