@zjutjh/eslint-config 0.7.2 → 0.7.4

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 CHANGED
@@ -5,7 +5,7 @@ zjutjh 的 ESLint 配置,适用于 JS, TS, Vue3 等项目。
5
5
  ## 使用方式
6
6
 
7
7
  > [!IMPORTANT]
8
- > ESLint 版本需要 ^9.9.0 以上,Node 版本需要 ^18.18.0 以上
8
+ > ESLint 版本需要 ^9.9.0 以上,Node 版本需要 ^20.19.0 以上
9
9
 
10
10
  ```sh
11
11
  # 确保你已经安装了 eslint
@@ -24,12 +24,16 @@ import zjutjh from "@zjutjh/eslint-config";
24
24
  export default zjutjh();
25
25
  ```
26
26
 
27
+ ### 命令行配置
28
+
29
+ 本地的 git hooks 以及 CI 环境需要用命令来执行 lint。
30
+
27
31
  在 `package.json` 中添加如下命令。
28
32
 
29
33
  ```json
30
34
  {
31
35
  "scripts": {
32
- "lint": "eslint ."
36
+ "lint": "eslint"
33
37
  }
34
38
  }
35
39
  ```
@@ -41,10 +45,30 @@ $ npm run lint
41
45
  ```
42
46
 
43
47
  > [!NOTE]
44
- > 项目第一次接入时运行 `eslint .` 可能会有安装依赖的交互式命令,按照提示完成依赖安装即可。
48
+ > 项目第一次接入时运行 `eslint` 可能会有安装依赖的交互式命令,按照提示完成依赖安装即可。
45
49
  >
46
50
  > 在每次修改依赖配置后,最好也运行一遍 lint 命令,部分配置项可能需要安装额外的依赖。
47
51
 
52
+ ### 编辑器配置
53
+
54
+ > [!IMPORTANT]
55
+ > 配置编辑器插件之前,请先行一遍 lint 命令,安装所需的依赖。
56
+
57
+ 常见的 IDE 有 VSCode 或者类似的套壳 IDE(如 Cursor, Trae 等),除了要安装 [eslint 插件](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) 之外,为了 lint JavaScript 以外的文件,还需要在项目里面给插件配置 lint 范围。
58
+
59
+ ```jsonc
60
+ // 可以参考仓库下的 .vscode/settings.json
61
+ // @filename .vscode/settings.json
62
+ {
63
+ "eslint.validate": [
64
+ "vue",
65
+ "typescript"
66
+ // JSX 项目要配置
67
+ // "typescriptreact"
68
+ ]
69
+ }
70
+ ```
71
+
48
72
  大部分场景到这里就能使用了,不需要额外的配置。如果你想自定义一些配置,请往下看。
49
73
 
50
74
  ### 自定义配置
@@ -138,7 +162,6 @@ stylistic 只对 js(x) 和 ts(x) 进行格式化,而 prettier 还对其他文
138
162
  如果你要**在编辑器中**自动格式化这些文件,需要配置编辑器来允许 eslint 校验这些类型的文件。
139
163
 
140
164
  ```jsonc
141
- // 可以参考仓库下的 .vscode/settings.json 给 vscode 配置
142
165
  // @filename .vscode/settings.json
143
166
  {
144
167
  "prettier.enable": false, // 如果安装了 prettier 插件,需要在项目中关闭
package/dist/index.d.ts CHANGED
@@ -1,43 +1,45 @@
1
- import { Linter } from 'eslint';
2
- import { ParserOptions } from '@typescript-eslint/parser';
3
- import { Options } from 'prettier';
1
+ import { ParserOptions } from "@typescript-eslint/parser";
2
+ import { Linter } from "eslint";
3
+ import { Options } from "prettier";
4
4
 
5
+ //#region src/types.d.ts
5
6
  interface OverridesConfigs {
6
- vue?: Linter.RulesRecord;
7
- ts?: Linter.RulesRecord;
8
- stylistic?: Linter.RulesRecord;
9
- react?: Linter.RulesRecord;
7
+ vue?: Linter.RulesRecord;
8
+ ts?: Linter.RulesRecord;
9
+ stylistic?: Linter.RulesRecord;
10
+ react?: Linter.RulesRecord;
10
11
  }
11
12
  interface OptionsConfig extends OptionsComponentExts {
12
- vue?: boolean;
13
- ts?: boolean | OptionsTypeScriptParserOptions;
14
- taro?: boolean;
15
- jsx?: boolean;
16
- react?: boolean;
17
- prettier?: boolean | OptionsPrettier;
18
- ignores?: string[];
19
- overrides?: OverridesConfigs;
13
+ vue?: boolean;
14
+ ts?: boolean | OptionsTypeScriptParserOptions;
15
+ taro?: boolean;
16
+ jsx?: boolean;
17
+ react?: boolean;
18
+ prettier?: boolean | OptionsPrettier;
19
+ ignores?: string[];
20
+ overrides?: OverridesConfigs;
20
21
  }
21
22
  interface OptionsComponentExts {
22
- componentExts?: string[];
23
+ componentExts?: string[];
23
24
  }
24
25
  interface OptionsTypeScriptParserOptions {
25
- parserOptions?: Partial<ParserOptions>;
26
+ parserOptions?: Partial<ParserOptions>;
26
27
  }
27
28
  interface OptionsPrettier {
28
- prettierSelfOptions?: Options;
29
- /** 对哪些文件启用 prettier,默认全部启用 */
30
- lang?: {
31
- /** js, ts, vue 文件 */
32
- es: boolean;
33
- /** css, less, scss 文件 */
34
- css: boolean;
35
- html: boolean;
36
- /** json, json5, jsonc 文件 */
37
- json: boolean;
38
- };
29
+ prettierSelfOptions?: Options;
30
+ /** 对哪些文件启用 prettier,默认全部启用 */
31
+ lang?: {
32
+ /** js, ts, vue 文件 */
33
+ es: boolean;
34
+ /** css, less, scss 文件 */
35
+ css: boolean;
36
+ html: boolean;
37
+ /** json, json5, jsonc 文件 */
38
+ json: boolean;
39
+ };
39
40
  }
40
-
41
+ //#endregion
42
+ //#region src/factory.d.ts
41
43
  declare function zjutjh(options?: OptionsConfig, ...userConfigs: Awaited<Linter.Config[]>): Promise<Linter.Config<Linter.RulesRecord>[]>;
42
-
43
- export { zjutjh as default };
44
+ //#endregion
45
+ export { zjutjh as default };
package/dist/index.js CHANGED
@@ -1,552 +1,476 @@
1
- // src/factory.ts
2
- import { isPackageExists as isPackageExists2 } from "local-pkg";
1
+ import { isPackageExists } from "local-pkg";
2
+ import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
3
+ import eslintJS from "@eslint/js";
4
+ import globals from "globals";
5
+ import pluginStylistic from "@stylistic/eslint-plugin";
3
6
 
4
- // src/globs.ts
5
- var GLOB_VUE = "**/*.vue";
6
- var GLOB_JS = "**/*.?([cm])js";
7
- var GLOB_TS = "**/*.?([cm])ts";
8
- var GLOB_JSX = "**/*.?([cm])jsx";
9
- var GLOB_TSX = "**/*.?([cm])tsx";
10
- var GLOB_CSS = "**/*.css";
11
- var GLOB_SCSS = "**/*.scss";
12
- var GLOB_LESS = "**/*.less";
13
- var GLOB_HTML = "**/*.html";
14
- var GLOB_JSON = "**/*.json";
15
- var GLOB_JSON5 = "**/*.json5";
16
- var GLOB_JSONC = "**/*.jsonc";
17
- var GLOBS_EXCLUDES = [
18
- "**/node_modules",
19
- "**/dist",
20
- "**/package-lock.json",
21
- "**/yarn.lock",
22
- "**/pnpm-lock.yaml",
23
- "**/bun.lockb",
24
- "**/output",
25
- "**/coverage",
26
- "**/temp",
27
- "**/.temp",
28
- "**/tmp",
29
- "**/.tmp",
30
- "**/.history",
31
- "**/.vitepress/cache",
32
- "**/.nuxt",
33
- "**/.next",
34
- "**/.svelte-kit",
35
- "**/.vercel",
36
- "**/.changeset",
37
- "**/.idea",
38
- "**/.cache",
39
- "**/.output",
40
- "**/.vite-inspect",
41
- "**/.yarn",
42
- "**/vite.config.*.timestamp-*",
43
- "**/CHANGELOG*.md",
44
- "**/*.min.*",
45
- "**/LICENSE*",
46
- "**/__snapshots__",
47
- "**/auto-import?(s).d.ts",
48
- "**/components.d.ts"
7
+ //#region src/globs.ts
8
+ const GLOB_VUE = "**/*.vue";
9
+ const GLOB_JS = "**/*.?([cm])js";
10
+ const GLOB_TS = "**/*.?([cm])ts";
11
+ const GLOB_JSX = "**/*.?([cm])jsx";
12
+ const GLOB_TSX = "**/*.?([cm])tsx";
13
+ const GLOB_CSS = "**/*.css";
14
+ const GLOB_SCSS = "**/*.scss";
15
+ const GLOB_LESS = "**/*.less";
16
+ const GLOB_HTML = "**/*.html";
17
+ const GLOB_JSON = "**/*.json";
18
+ const GLOB_JSON5 = "**/*.json5";
19
+ const GLOB_JSONC = "**/*.jsonc";
20
+ /**
21
+ * @see https://github.com/antfu/eslint-config/blob/04ae86dd43e86d8b925555d85adf080494efeab3/src/globs.ts#L56
22
+ */
23
+ const GLOBS_EXCLUDES = [
24
+ "**/node_modules",
25
+ "**/dist",
26
+ "**/package-lock.json",
27
+ "**/yarn.lock",
28
+ "**/pnpm-lock.yaml",
29
+ "**/bun.lockb",
30
+ "**/output",
31
+ "**/coverage",
32
+ "**/temp",
33
+ "**/.temp",
34
+ "**/tmp",
35
+ "**/.tmp",
36
+ "**/.history",
37
+ "**/.vitepress/cache",
38
+ "**/.nuxt",
39
+ "**/.next",
40
+ "**/.svelte-kit",
41
+ "**/.vercel",
42
+ "**/.changeset",
43
+ "**/.idea",
44
+ "**/.cache",
45
+ "**/.output",
46
+ "**/.vite-inspect",
47
+ "**/.yarn",
48
+ "**/vite.config.*.timestamp-*",
49
+ "**/CHANGELOG*.md",
50
+ "**/*.min.*",
51
+ "**/LICENSE*",
52
+ "**/__snapshots__",
53
+ "**/auto-import?(s).d.ts",
54
+ "**/components.d.ts"
49
55
  ];
50
56
 
51
- // src/configs/ignores.ts
57
+ //#endregion
58
+ //#region src/configs/ignores.ts
52
59
  function ignores(options) {
53
- return [
54
- {
55
- name: "zjutjh/ignores",
56
- ignores: [
57
- ...GLOBS_EXCLUDES,
58
- ...options?.userIgnores ?? []
59
- ]
60
- }
61
- ];
60
+ return [{
61
+ name: "zjutjh/ignores",
62
+ ignores: [...GLOBS_EXCLUDES, ...options?.userIgnores ?? []]
63
+ }];
62
64
  }
63
65
 
64
- // src/configs/imports.ts
65
- import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
66
+ //#endregion
67
+ //#region src/configs/imports.ts
66
68
  function imports() {
67
- return [
68
- {
69
- name: "zjutjh/imports/setup",
70
- plugins: {
71
- "simple-import-sort": simpleImportSortPlugin
72
- }
73
- },
74
- {
75
- name: "zjutjh/imports/rules",
76
- rules: {
77
- "simple-import-sort/imports": "error",
78
- "simple-import-sort/exports": "error"
79
- }
80
- }
81
- ];
69
+ return [{
70
+ name: "zjutjh/imports/setup",
71
+ plugins: { "simple-import-sort": simpleImportSortPlugin }
72
+ }, {
73
+ name: "zjutjh/imports/rules",
74
+ rules: {
75
+ "simple-import-sort/imports": "error",
76
+ "simple-import-sort/exports": "error"
77
+ }
78
+ }];
82
79
  }
83
80
 
84
- // src/configs/javascript.ts
85
- import eslintJS from "@eslint/js";
86
- import globals from "globals";
81
+ //#endregion
82
+ //#region src/configs/javascript.ts
87
83
  function javascript() {
88
- return [
89
- {
90
- name: "zjutjh/javascript/setup",
91
- languageOptions: {
92
- ecmaVersion: 2022,
93
- globals: {
94
- ...globals.browser,
95
- ...globals.es2021,
96
- ...globals.node,
97
- document: "readonly",
98
- navigator: "readonly",
99
- window: "readonly"
100
- },
101
- parserOptions: {
102
- ecmaFeatures: {
103
- jsx: true
104
- },
105
- ecmaVersion: 2022,
106
- sourceType: "module"
107
- },
108
- sourceType: "module"
109
- },
110
- linterOptions: {
111
- reportUnusedDisableDirectives: true
112
- }
113
- },
114
- {
115
- name: "zjutjh/javascript/rules",
116
- rules: {
117
- ...eslintJS.configs.recommended.rules,
118
- "camelcase": "warn",
119
- "no-warning-comments": "warn",
120
- "no-console": ["warn", { allow: ["warn", "error", "info"] }],
121
- "no-var": "error",
122
- "no-undef": "off",
123
- "prefer-const": "warn",
124
- "arrow-body-style": "error",
125
- "no-nested-ternary": "error",
126
- "curly": "error",
127
- "no-else-return": "error",
128
- "no-implicit-coercion": "error"
129
- }
130
- }
131
- ];
84
+ return [{
85
+ name: "zjutjh/javascript/setup",
86
+ languageOptions: {
87
+ ecmaVersion: 2022,
88
+ globals: {
89
+ ...globals.browser,
90
+ ...globals.es2021,
91
+ ...globals.node,
92
+ document: "readonly",
93
+ navigator: "readonly",
94
+ window: "readonly"
95
+ },
96
+ parserOptions: {
97
+ ecmaFeatures: { jsx: true },
98
+ ecmaVersion: 2022,
99
+ sourceType: "module"
100
+ },
101
+ sourceType: "module"
102
+ },
103
+ linterOptions: { reportUnusedDisableDirectives: true }
104
+ }, {
105
+ name: "zjutjh/javascript/rules",
106
+ rules: {
107
+ ...eslintJS.configs.recommended.rules,
108
+ "camelcase": "warn",
109
+ "no-warning-comments": "warn",
110
+ "no-console": ["warn", { allow: [
111
+ "warn",
112
+ "error",
113
+ "info"
114
+ ] }],
115
+ "no-var": "error",
116
+ "no-undef": "off",
117
+ "prefer-const": "warn",
118
+ "arrow-body-style": "error",
119
+ "no-nested-ternary": "error",
120
+ "curly": "error",
121
+ "no-else-return": "error",
122
+ "no-implicit-coercion": "error"
123
+ }
124
+ }];
132
125
  }
133
126
 
134
- // src/configs/jsx.ts
127
+ //#endregion
128
+ //#region src/configs/jsx.ts
135
129
  function jsx() {
136
- return [
137
- {
138
- name: "zjutjh/jsx/setup",
139
- files: [GLOB_TSX, GLOB_JSX],
140
- languageOptions: {
141
- parserOptions: {
142
- ecmaFeatures: {
143
- jsx: true
144
- }
145
- }
146
- }
147
- }
148
- ];
130
+ return [{
131
+ name: "zjutjh/jsx/setup",
132
+ files: [GLOB_TSX, GLOB_JSX],
133
+ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }
134
+ }];
149
135
  }
150
136
 
151
- // src/utils.ts
152
- import { isPackageExists } from "local-pkg";
137
+ //#endregion
138
+ //#region src/utils.ts
153
139
  async function interopDefault(m) {
154
- const resolved = await m;
155
- return resolved.default || resolved;
140
+ const resolved = await m;
141
+ return resolved.default || resolved;
156
142
  }
157
143
  async function ensurePackages(packages) {
158
- const nonExistingPackages = packages.filter((i) => i && !isPackageExists(i));
159
- if (nonExistingPackages.length === 0) {
160
- return;
161
- }
162
- const p = await import("@clack/prompts");
163
- const confirmed = await p.confirm({
164
- message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`
165
- });
166
- if (confirmed) {
167
- const { installPackage } = await import("@antfu/install-pkg");
168
- await installPackage(nonExistingPackages, { dev: true });
169
- }
144
+ const nonExistingPackages = packages.filter((i) => i && !isPackageExists(i));
145
+ if (nonExistingPackages.length === 0) return;
146
+ if (await (await import("@clack/prompts")).confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` })) {
147
+ const { installPackage } = await import("@antfu/install-pkg");
148
+ await installPackage(nonExistingPackages, { dev: true });
149
+ }
170
150
  }
171
151
  function resolveSubOptions(options, key) {
172
- if (typeof options[key] === "boolean") {
173
- return {};
174
- }
175
- return options[key] || {};
152
+ if (typeof options[key] === "boolean") return {};
153
+ return options[key] || {};
176
154
  }
177
155
  function getOverrides(options, key) {
178
- return {
179
- ...options.overrides?.[key]
180
- };
156
+ return { ...options.overrides?.[key] };
181
157
  }
182
158
 
183
- // src/configs/prettier.ts
184
- var prettierOptions = {
185
- printWidth: 100,
186
- tabWidth: 2,
187
- useTabs: false,
188
- semi: true,
189
- singleQuote: false,
190
- quoteProps: "as-needed",
191
- jsxSingleQuote: false,
192
- trailingComma: "none",
193
- bracketSpacing: true,
194
- bracketSameLine: false,
195
- arrowParens: "always",
196
- requirePragma: false,
197
- insertPragma: false,
198
- proseWrap: "preserve",
199
- htmlWhitespaceSensitivity: "css",
200
- vueIndentScriptAndStyle: false,
201
- endOfLine: "lf",
202
- embeddedLanguageFormatting: "auto",
203
- singleAttributePerLine: false
159
+ //#endregion
160
+ //#region src/configs/prettier.ts
161
+ /**
162
+ * @see https://prettier.io/docs/options
163
+ */
164
+ const prettierOptions = {
165
+ printWidth: 100,
166
+ tabWidth: 2,
167
+ useTabs: false,
168
+ semi: true,
169
+ singleQuote: false,
170
+ quoteProps: "as-needed",
171
+ jsxSingleQuote: false,
172
+ trailingComma: "none",
173
+ bracketSpacing: true,
174
+ bracketSameLine: false,
175
+ arrowParens: "always",
176
+ requirePragma: false,
177
+ insertPragma: false,
178
+ proseWrap: "preserve",
179
+ htmlWhitespaceSensitivity: "css",
180
+ vueIndentScriptAndStyle: false,
181
+ endOfLine: "lf",
182
+ embeddedLanguageFormatting: "auto",
183
+ singleAttributePerLine: false
204
184
  };
205
185
  async function prettier(options) {
206
- await ensurePackages([
207
- "eslint-plugin-format",
208
- "eslint-plugin-prettier",
209
- "eslint-config-prettier",
210
- "prettier"
211
- ]);
212
- const [configPrettier, pluginFormat] = await Promise.all([
213
- interopDefault(import("eslint-plugin-prettier/recommended")),
214
- interopDefault(import("eslint-plugin-format"))
215
- ]);
216
- const {
217
- es: enableESFormat = true,
218
- html: enableHTMLFormat = true,
219
- css: enableCSSFormat = true,
220
- json: enableJSONFormat = true
221
- } = options?.lang ?? {};
222
- const mergedPrettierOptions = {
223
- ...prettierOptions,
224
- ...options?.prettierSelfOptions
225
- };
226
- return [
227
- enableESFormat ? {
228
- name: "zjutjh/prettier/setup",
229
- files: [GLOB_VUE, GLOB_TS, GLOB_JS, GLOB_TSX, GLOB_JSX],
230
- ...configPrettier
231
- } : {},
232
- enableESFormat ? {
233
- name: "zjutjh/prettier/es",
234
- files: [GLOB_VUE, GLOB_TS, GLOB_JS, GLOB_TSX, GLOB_JSX],
235
- rules: {
236
- "prettier/prettier": ["error", mergedPrettierOptions]
237
- }
238
- } : {},
239
- enableCSSFormat ? {
240
- name: "zjutjh/prettier/css",
241
- files: [GLOB_CSS, GLOB_LESS, GLOB_SCSS],
242
- languageOptions: {
243
- parser: pluginFormat.parserPlain
244
- },
245
- plugins: {
246
- format: pluginFormat
247
- },
248
- rules: {
249
- "format/prettier": ["error", { parser: "css", mergedPrettierOptions }]
250
- }
251
- } : {},
252
- enableHTMLFormat ? {
253
- name: "zjutjh/prettier/html",
254
- files: [GLOB_HTML],
255
- languageOptions: {
256
- parser: pluginFormat.parserPlain
257
- },
258
- plugins: {
259
- format: pluginFormat
260
- },
261
- rules: {
262
- "format/prettier": ["error", { parser: "html", mergedPrettierOptions }]
263
- }
264
- } : {},
265
- enableJSONFormat ? {
266
- name: "zjutjh/prettier/json",
267
- files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
268
- languageOptions: {
269
- parser: pluginFormat.parserPlain
270
- },
271
- plugins: {
272
- format: pluginFormat
273
- },
274
- rules: {
275
- "format/prettier": ["error", { parser: "json", mergedPrettierOptions }]
276
- }
277
- } : {}
278
- ];
186
+ await ensurePackages([
187
+ "eslint-plugin-format",
188
+ "eslint-plugin-prettier",
189
+ "eslint-config-prettier",
190
+ "prettier"
191
+ ]);
192
+ const [configPrettier, pluginFormat] = await Promise.all([interopDefault(import("eslint-plugin-prettier/recommended")), interopDefault(import("eslint-plugin-format"))]);
193
+ const { es: enableESFormat = true, html: enableHTMLFormat = true, css: enableCSSFormat = true, json: enableJSONFormat = true } = options?.lang ?? {};
194
+ const mergedPrettierOptions = {
195
+ ...prettierOptions,
196
+ ...options?.prettierSelfOptions
197
+ };
198
+ return [
199
+ enableESFormat ? {
200
+ name: "zjutjh/prettier/setup",
201
+ files: [
202
+ GLOB_VUE,
203
+ GLOB_TS,
204
+ GLOB_JS,
205
+ GLOB_TSX,
206
+ GLOB_JSX
207
+ ],
208
+ ...configPrettier
209
+ } : {},
210
+ enableESFormat ? {
211
+ name: "zjutjh/prettier/es",
212
+ files: [
213
+ GLOB_VUE,
214
+ GLOB_TS,
215
+ GLOB_JS,
216
+ GLOB_TSX,
217
+ GLOB_JSX
218
+ ],
219
+ rules: { "prettier/prettier": ["error", mergedPrettierOptions] }
220
+ } : {},
221
+ enableCSSFormat ? {
222
+ name: "zjutjh/prettier/css",
223
+ files: [
224
+ GLOB_CSS,
225
+ GLOB_LESS,
226
+ GLOB_SCSS
227
+ ],
228
+ languageOptions: { parser: pluginFormat.parserPlain },
229
+ plugins: { format: pluginFormat },
230
+ rules: { "format/prettier": ["error", {
231
+ parser: "css",
232
+ mergedPrettierOptions
233
+ }] }
234
+ } : {},
235
+ enableHTMLFormat ? {
236
+ name: "zjutjh/prettier/html",
237
+ files: [GLOB_HTML],
238
+ languageOptions: { parser: pluginFormat.parserPlain },
239
+ plugins: { format: pluginFormat },
240
+ rules: { "format/prettier": ["error", {
241
+ parser: "html",
242
+ mergedPrettierOptions
243
+ }] }
244
+ } : {},
245
+ enableJSONFormat ? {
246
+ name: "zjutjh/prettier/json",
247
+ files: [
248
+ GLOB_JSON,
249
+ GLOB_JSON5,
250
+ GLOB_JSONC
251
+ ],
252
+ languageOptions: { parser: pluginFormat.parserPlain },
253
+ plugins: { format: pluginFormat },
254
+ rules: { "format/prettier": ["error", {
255
+ parser: "json",
256
+ mergedPrettierOptions
257
+ }] }
258
+ } : {}
259
+ ];
279
260
  }
280
261
 
281
- // src/configs/react.ts
262
+ //#endregion
263
+ //#region src/configs/react.ts
282
264
  async function react(options) {
283
- await ensurePackages([
284
- "@eslint-react/eslint-plugin",
285
- "eslint-plugin-react-hooks",
286
- "eslint-plugin-react-refresh"
287
- ]);
288
- const [
289
- pluginReact,
290
- pluginReactHooks,
291
- pluginReactRefresh
292
- ] = await Promise.all([
293
- interopDefault(import("@eslint-react/eslint-plugin")),
294
- interopDefault(import("eslint-plugin-react-hooks")),
295
- interopDefault(import("eslint-plugin-react-refresh"))
296
- ]);
297
- const plugins = pluginReact.configs.all.plugins;
298
- return [
299
- {
300
- name: "zjutjh/react/setup",
301
- plugins: {
302
- // @ts-expect-error 依赖的类型有问题,不影响使用
303
- "@eslint-react": plugins["@eslint-react"],
304
- // @ts-expect-error 依赖的类型有问题,不影响使用
305
- "@eslint-react/debug": plugins["@eslint-react/debug"],
306
- // @ts-expect-error 依赖的类型有问题,不影响使用
307
- "@eslint-react/dom": plugins["@eslint-react/dom"],
308
- // @ts-expect-error 依赖的类型有问题,不影响使用
309
- "@eslint-react/hooks-extra": plugins["@eslint-react/hooks-extra"],
310
- // @ts-expect-error 依赖的类型有问题,不影响使用
311
- "@eslint-react/naming-convention": plugins["@eslint-react/naming-convention"],
312
- // @ts-expect-error 依赖的类型有问题,不影响使用
313
- "@eslint-react/web-api": plugins["@eslint-react/web-api"],
314
- "react-hooks": pluginReactHooks,
315
- "react-refresh": pluginReactRefresh
316
- }
317
- },
318
- {
319
- name: "zjutjh/react/rules",
320
- files: [GLOB_JSX, GLOB_TSX, GLOB_JS, GLOB_TS],
321
- rules: {
322
- ...pluginReact.configs.recommended.rules,
323
- ...pluginReactHooks.configs.recommended.rules,
324
- "react-refresh/only-export-components": "warn",
325
- ...options.overrides
326
- }
327
- }
328
- ];
265
+ await ensurePackages([
266
+ "@eslint-react/eslint-plugin",
267
+ "eslint-plugin-react-hooks",
268
+ "eslint-plugin-react-refresh"
269
+ ]);
270
+ const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all([
271
+ interopDefault(import("@eslint-react/eslint-plugin")),
272
+ interopDefault(import("eslint-plugin-react-hooks")),
273
+ interopDefault(import("eslint-plugin-react-refresh"))
274
+ ]);
275
+ const plugins = pluginReact.configs.all.plugins;
276
+ return [{
277
+ name: "zjutjh/react/setup",
278
+ plugins: {
279
+ "@eslint-react": plugins["@eslint-react"],
280
+ "@eslint-react/debug": plugins["@eslint-react/debug"],
281
+ "@eslint-react/dom": plugins["@eslint-react/dom"],
282
+ "@eslint-react/hooks-extra": plugins["@eslint-react/hooks-extra"],
283
+ "@eslint-react/naming-convention": plugins["@eslint-react/naming-convention"],
284
+ "@eslint-react/web-api": plugins["@eslint-react/web-api"],
285
+ "react-hooks": pluginReactHooks,
286
+ "react-refresh": pluginReactRefresh
287
+ }
288
+ }, {
289
+ name: "zjutjh/react/rules",
290
+ files: [
291
+ GLOB_JSX,
292
+ GLOB_TSX,
293
+ GLOB_JS,
294
+ GLOB_TS
295
+ ],
296
+ rules: {
297
+ ...pluginReact.configs.recommended.rules,
298
+ ...pluginReactHooks.configs.recommended.rules,
299
+ "react-refresh/only-export-components": "warn",
300
+ ...options.overrides
301
+ }
302
+ }];
329
303
  }
330
304
 
331
- // src/configs/stylistic.ts
332
- import pluginStylistic from "@stylistic/eslint-plugin";
305
+ //#endregion
306
+ //#region src/configs/stylistic.ts
333
307
  function stylistic(options) {
334
- return [
335
- {
336
- name: "zjutjh/stylistic/rules",
337
- plugins: {
338
- "@stylistic": pluginStylistic
339
- },
340
- rules: {
341
- "@stylistic/indent": ["error", 2],
342
- "@stylistic/keyword-spacing": "error",
343
- "@stylistic/key-spacing": "error",
344
- "@stylistic/no-trailing-spaces": "error",
345
- "@stylistic/linebreak-style": ["error", "unix"],
346
- "@stylistic/quotes": ["error", "double"],
347
- "@stylistic/function-call-spacing": "error",
348
- "@stylistic/semi": "error",
349
- "@stylistic/no-multiple-empty-lines": ["warn", { max: 1 }],
350
- "@stylistic/object-curly-spacing": ["error", "always"],
351
- "@stylistic/arrow-spacing": "error",
352
- "@stylistic/block-spacing": "error",
353
- "@stylistic/brace-style": "error",
354
- "@stylistic/comma-dangle": "error",
355
- "@stylistic/no-multi-spaces": "error",
356
- "@stylistic/comma-spacing": "error",
357
- "@stylistic/switch-colon-spacing": "error",
358
- "@stylistic/type-annotation-spacing": "error",
359
- "@stylistic/space-before-blocks": "error",
360
- "@stylistic/space-before-function-paren": ["error", {
361
- "anonymous": "never",
362
- "named": "never",
363
- "asyncArrow": "always"
364
- }],
365
- "@stylistic/space-in-parens": "error",
366
- "@stylistic/space-infix-ops": "error",
367
- "@stylistic/spaced-comment": "error",
368
- ...options.overrides
369
- }
370
- }
371
- ];
308
+ return [{
309
+ name: "zjutjh/stylistic/rules",
310
+ plugins: { "@stylistic": pluginStylistic },
311
+ rules: {
312
+ "@stylistic/indent": ["error", 2],
313
+ "@stylistic/keyword-spacing": "error",
314
+ "@stylistic/key-spacing": "error",
315
+ "@stylistic/no-trailing-spaces": "error",
316
+ "@stylistic/linebreak-style": ["error", "unix"],
317
+ "@stylistic/quotes": ["error", "double"],
318
+ "@stylistic/function-call-spacing": "error",
319
+ "@stylistic/semi": "error",
320
+ "@stylistic/no-multiple-empty-lines": ["warn", { max: 1 }],
321
+ "@stylistic/object-curly-spacing": ["error", "always"],
322
+ "@stylistic/arrow-spacing": "error",
323
+ "@stylistic/block-spacing": "error",
324
+ "@stylistic/brace-style": "error",
325
+ "@stylistic/comma-dangle": "error",
326
+ "@stylistic/no-multi-spaces": "error",
327
+ "@stylistic/comma-spacing": "error",
328
+ "@stylistic/switch-colon-spacing": "error",
329
+ "@stylistic/type-annotation-spacing": "error",
330
+ "@stylistic/space-before-blocks": "error",
331
+ "@stylistic/space-before-function-paren": ["error", {
332
+ "anonymous": "never",
333
+ "named": "never",
334
+ "asyncArrow": "always"
335
+ }],
336
+ "@stylistic/space-in-parens": "error",
337
+ "@stylistic/space-infix-ops": "error",
338
+ "@stylistic/spaced-comment": "error",
339
+ ...options.overrides
340
+ }
341
+ }];
372
342
  }
373
343
 
374
- // src/configs/typescript.ts
344
+ //#endregion
345
+ //#region src/configs/typescript.ts
375
346
  async function typescript(options) {
376
- const {
377
- componentExts = [],
378
- overrides,
379
- parserOptions
380
- } = options;
381
- const files = [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)];
382
- await ensurePackages([
383
- "@typescript-eslint/eslint-plugin",
384
- "@typescript-eslint/parser"
385
- ]);
386
- const [
387
- pluginTs,
388
- parserTs
389
- ] = await Promise.all([
390
- await interopDefault(import("@typescript-eslint/eslint-plugin")),
391
- await interopDefault(import("@typescript-eslint/parser"))
392
- ]);
393
- return [
394
- {
395
- name: "zjutjh/typescript/setup",
396
- plugins: {
397
- // @ts-expect-error 依赖的类型有问题,不影响使用
398
- "@typescript-eslint": pluginTs
399
- }
400
- },
401
- {
402
- name: "zjutjh/typescript/parser",
403
- files,
404
- languageOptions: {
405
- parser: parserTs,
406
- parserOptions: {
407
- ecmaVersion: 2022,
408
- sourceType: "module",
409
- projectService: {
410
- allowDefaultProject: ["./*.js"],
411
- defaultProject: "./tsconfig.json"
412
- },
413
- tsconfigRootDir: process.cwd(),
414
- ...parserOptions
415
- }
416
- }
417
- },
418
- {
419
- name: "zjutjh/typescript/rules",
420
- files,
421
- rules: {
422
- ...pluginTs.configs.strict.rules,
423
- "@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
424
- "@typescript-eslint/no-shadow": "error",
425
- "@typescript-eslint/no-non-null-assertion": "error",
426
- "@typescript-eslint/no-empty-function": "error",
427
- "@typescript-eslint/no-explicit-any": "off",
428
- "@typescript-eslint/no-unnecessary-condition": "error",
429
- "@typescript-eslint/no-unused-expressions": ["error", {
430
- allowShortCircuit: true,
431
- allowTaggedTemplates: true,
432
- allowTernary: true
433
- }],
434
- ...overrides
435
- }
436
- }
437
- ];
347
+ const { componentExts = [], overrides, parserOptions } = options;
348
+ const files = [
349
+ GLOB_TS,
350
+ GLOB_TSX,
351
+ ...componentExts.map((ext) => `**/*.${ext}`)
352
+ ];
353
+ await ensurePackages(["@typescript-eslint/eslint-plugin", "@typescript-eslint/parser"]);
354
+ const [pluginTs, parserTs] = await Promise.all([await interopDefault(import("@typescript-eslint/eslint-plugin")), await interopDefault(import("@typescript-eslint/parser"))]);
355
+ return [
356
+ {
357
+ name: "zjutjh/typescript/setup",
358
+ plugins: { "@typescript-eslint": pluginTs }
359
+ },
360
+ {
361
+ name: "zjutjh/typescript/parser",
362
+ files,
363
+ languageOptions: {
364
+ parser: parserTs,
365
+ parserOptions: {
366
+ ecmaVersion: 2022,
367
+ sourceType: "module",
368
+ projectService: {
369
+ allowDefaultProject: ["./*.js"],
370
+ defaultProject: "./tsconfig.json"
371
+ },
372
+ tsconfigRootDir: process.cwd(),
373
+ ...parserOptions
374
+ }
375
+ }
376
+ },
377
+ {
378
+ name: "zjutjh/typescript/rules",
379
+ files,
380
+ rules: {
381
+ ...pluginTs.configs.strict.rules,
382
+ "@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
383
+ "@typescript-eslint/no-shadow": "error",
384
+ "@typescript-eslint/no-non-null-assertion": "error",
385
+ "@typescript-eslint/no-empty-function": "error",
386
+ "@typescript-eslint/no-explicit-any": "off",
387
+ "@typescript-eslint/no-unnecessary-condition": "error",
388
+ "@typescript-eslint/no-unused-expressions": ["error", {
389
+ allowShortCircuit: true,
390
+ allowTaggedTemplates: true,
391
+ allowTernary: true
392
+ }],
393
+ ...overrides
394
+ }
395
+ }
396
+ ];
438
397
  }
439
398
 
440
- // src/configs/vue.ts
399
+ //#endregion
400
+ //#region src/configs/vue.ts
441
401
  async function vue(options) {
442
- await ensurePackages([
443
- "eslint-plugin-vue",
444
- "vue-eslint-parser"
445
- ]);
446
- const [
447
- pluginVue,
448
- parserVue
449
- ] = await Promise.all([
450
- interopDefault(import("eslint-plugin-vue")),
451
- interopDefault(import("vue-eslint-parser"))
452
- ]);
453
- return [
454
- {
455
- name: "zjutjh/vue/setup",
456
- plugins: {
457
- vue: pluginVue
458
- }
459
- },
460
- {
461
- name: "zjutjh/vue/rules",
462
- files: [GLOB_VUE],
463
- languageOptions: {
464
- parser: parserVue,
465
- parserOptions: {
466
- ecmaFeatures: {
467
- jsx: true
468
- },
469
- extraFileExtensions: [".vue"],
470
- parser: options?.ts ? await interopDefault(import("@typescript-eslint/parser")) : null,
471
- sourceType: "module"
472
- }
473
- },
474
- processor: pluginVue.processors[".vue"],
475
- rules: {
476
- ...pluginVue.configs["flat/recommended"].map((c) => c.rules).reduce((prev, curr) => ({ ...prev, ...curr }), {}),
477
- ...pluginVue.configs["flat/essential"].map((c) => c.rules).reduce((prev, curr) => ({ ...prev, ...curr }), {}),
478
- ...pluginVue.configs["flat/strongly-recommended"].map((c) => c.rules).reduce((prev, curr) => ({ ...prev, ...curr }), {}),
479
- "vue/multi-word-component-names": ["warn", { ignores: ["index"] }],
480
- "vue/component-name-in-template-casing": ["error", "kebab-case", { "registeredComponentsOnly": true }],
481
- "vue/max-attributes-per-line": ["error", { "singleline": { "max": 3 } }],
482
- "vue/prefer-true-attribute-shorthand": ["warn", options?.taro ? "never" : "always"],
483
- ...options?.overrides
484
- }
485
- }
486
- ];
402
+ await ensurePackages(["eslint-plugin-vue", "vue-eslint-parser"]);
403
+ const [pluginVue, parserVue] = await Promise.all([interopDefault(import("eslint-plugin-vue")), interopDefault(import("vue-eslint-parser"))]);
404
+ return [{
405
+ name: "zjutjh/vue/setup",
406
+ plugins: { vue: pluginVue }
407
+ }, {
408
+ name: "zjutjh/vue/rules",
409
+ files: [GLOB_VUE],
410
+ languageOptions: {
411
+ parser: parserVue,
412
+ parserOptions: {
413
+ ecmaFeatures: { jsx: true },
414
+ extraFileExtensions: [".vue"],
415
+ parser: options?.ts ? await interopDefault(import("@typescript-eslint/parser")) : null,
416
+ sourceType: "module"
417
+ }
418
+ },
419
+ processor: pluginVue.processors[".vue"],
420
+ rules: {
421
+ ...pluginVue.configs["flat/recommended"].map((c) => c.rules).reduce((prev, curr) => ({
422
+ ...prev,
423
+ ...curr
424
+ }), {}),
425
+ ...pluginVue.configs["flat/essential"].map((c) => c.rules).reduce((prev, curr) => ({
426
+ ...prev,
427
+ ...curr
428
+ }), {}),
429
+ ...pluginVue.configs["flat/strongly-recommended"].map((c) => c.rules).reduce((prev, curr) => ({
430
+ ...prev,
431
+ ...curr
432
+ }), {}),
433
+ "vue/multi-word-component-names": ["warn", { ignores: ["index"] }],
434
+ "vue/component-name-in-template-casing": [
435
+ "error",
436
+ "kebab-case",
437
+ { "registeredComponentsOnly": true }
438
+ ],
439
+ "vue/max-attributes-per-line": ["error", { "singleline": { "max": 3 } }],
440
+ "vue/prefer-true-attribute-shorthand": ["warn", options?.taro ? "never" : "always"],
441
+ ...options?.overrides
442
+ }
443
+ }];
487
444
  }
488
445
 
489
- // src/factory.ts
446
+ //#endregion
447
+ //#region src/factory.ts
490
448
  async function zjutjh(options = {}, ...userConfigs) {
491
- const {
492
- componentExts = [],
493
- vue: enableVue = isPackageExists2("vue"),
494
- ts: enableTs = isPackageExists2("typescript"),
495
- taro: enableTaro = isPackageExists2("@tarojs/taro"),
496
- jsx: enableJSX = isPackageExists2("react"),
497
- react: enableReact = isPackageExists2("react"),
498
- ignores: userIgnores,
499
- prettier: enablePrettier = false
500
- } = options;
501
- const configs = [];
502
- configs.push(
503
- ignores({ userIgnores }),
504
- javascript(),
505
- imports(),
506
- stylistic({
507
- overrides: getOverrides(options, "stylistic")
508
- })
509
- );
510
- if (enableVue) {
511
- componentExts.push("vue");
512
- }
513
- const typescriptOptions = resolveSubOptions(options, "ts");
514
- if (enableTs) {
515
- configs.push(
516
- await typescript({
517
- ...typescriptOptions,
518
- overrides: getOverrides(options, "ts")
519
- })
520
- );
521
- }
522
- if (enableVue) {
523
- configs.push(
524
- await vue({
525
- ts: Boolean(enableTs),
526
- taro: enableTaro,
527
- overrides: getOverrides(options, "vue")
528
- })
529
- );
530
- }
531
- if (enableJSX) {
532
- configs.push(jsx());
533
- }
534
- if (enableReact) {
535
- configs.push(
536
- await react({
537
- overrides: getOverrides(options, "react")
538
- })
539
- );
540
- }
541
- const codeStyleOptions = resolveSubOptions(options, "prettier");
542
- if (enablePrettier) {
543
- configs.push(await prettier(codeStyleOptions));
544
- }
545
- return configs.flat(1).concat(userConfigs);
449
+ const { componentExts = [], vue: enableVue = isPackageExists("vue"), ts: enableTs = isPackageExists("typescript"), taro: enableTaro = isPackageExists("@tarojs/taro"), jsx: enableJSX = isPackageExists("react"), react: enableReact = isPackageExists("react"), ignores: userIgnores, prettier: enablePrettier = false } = options;
450
+ const configs = [];
451
+ configs.push(ignores({ userIgnores }), javascript(), imports(), stylistic({ overrides: getOverrides(options, "stylistic") }));
452
+ if (enableVue) componentExts.push("vue");
453
+ const typescriptOptions = resolveSubOptions(options, "ts");
454
+ if (enableTs) configs.push(await typescript({
455
+ ...typescriptOptions,
456
+ componentExts,
457
+ overrides: getOverrides(options, "ts")
458
+ }));
459
+ if (enableVue) configs.push(await vue({
460
+ ts: Boolean(enableTs),
461
+ taro: enableTaro,
462
+ overrides: getOverrides(options, "vue")
463
+ }));
464
+ if (enableJSX) configs.push(jsx());
465
+ if (enableReact) configs.push(await react({ overrides: getOverrides(options, "react") }));
466
+ const codeStyleOptions = resolveSubOptions(options, "prettier");
467
+ if (enablePrettier) configs.push(await prettier(codeStyleOptions));
468
+ return configs.flat(1).concat(userConfigs);
546
469
  }
547
470
 
548
- // src/index.ts
549
- var index_default = zjutjh;
550
- export {
551
- index_default as default
552
- };
471
+ //#endregion
472
+ //#region src/index.ts
473
+ var src_default = zjutjh;
474
+
475
+ //#endregion
476
+ export { src_default as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zjutjh/eslint-config",
3
3
  "type": "module",
4
- "version": "0.7.2",
4
+ "version": "0.7.4",
5
5
  "license": "ISC",
6
6
  "author": "zjutjh",
7
7
  "description": "Eslint config used by zjutjh",
@@ -15,7 +15,7 @@
15
15
  }
16
16
  },
17
17
  "engines": {
18
- "node": ">=18.18.0"
18
+ "node": ">=20.19.0"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -28,18 +28,18 @@
28
28
  "pre-commit": "pnpx lint-staged"
29
29
  },
30
30
  "peerDependencies": {
31
- "@eslint-react/eslint-plugin": "^1.48.5",
32
- "@typescript-eslint/eslint-plugin": "^8.31.1",
33
- "@typescript-eslint/parser": "^8.31.1",
34
- "eslint": "^9.25.1",
35
- "eslint-config-prettier": "^10.1.2",
36
- "eslint-plugin-format": "^1.0.1",
37
- "eslint-plugin-prettier": "^5.2.6",
31
+ "@eslint-react/eslint-plugin": "^2.0.0",
32
+ "@typescript-eslint/eslint-plugin": "^8.44.1",
33
+ "@typescript-eslint/parser": "^8.44.1",
34
+ "eslint": "^9.36.0",
35
+ "eslint-config-prettier": "^10.1.8",
36
+ "eslint-plugin-format": "^1.0.2",
37
+ "eslint-plugin-prettier": "^5.5.4",
38
38
  "eslint-plugin-react-hooks": "^5.2.0",
39
- "eslint-plugin-react-refresh": "^0.4.20",
40
- "eslint-plugin-vue": "^10.1.0",
41
- "prettier": "^3.5.3",
42
- "vue-eslint-parser": "^10.1.3"
39
+ "eslint-plugin-react-refresh": "^0.4.22",
40
+ "eslint-plugin-vue": "^10.5.0",
41
+ "prettier": "^3.6.2",
42
+ "vue-eslint-parser": "^10.2.0"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "@eslint-react/eslint-plugin": {
@@ -77,37 +77,37 @@
77
77
  }
78
78
  },
79
79
  "dependencies": {
80
- "@antfu/install-pkg": "^1.0.0",
81
- "@clack/prompts": "^0.10.1",
82
- "@eslint/js": "^9.25.1",
83
- "@stylistic/eslint-plugin": "^4.2.0",
80
+ "@antfu/install-pkg": "^1.1.0",
81
+ "@clack/prompts": "^0.11.0",
82
+ "@eslint/js": "^9.36.0",
83
+ "@stylistic/eslint-plugin": "^5.4.0",
84
84
  "eslint-plugin-simple-import-sort": "^12.1.1",
85
- "globals": "^16.0.0",
86
- "local-pkg": "^1.1.1"
85
+ "globals": "^16.4.0",
86
+ "local-pkg": "^1.1.2"
87
87
  },
88
88
  "devDependencies": {
89
- "@eslint-react/eslint-plugin": "^1.48.5",
90
- "@eslint/config-inspector": "^1.0.2",
91
- "@types/node": "^22.15.3",
92
- "@typescript-eslint/eslint-plugin": "^8.31.1",
93
- "@typescript-eslint/parser": "^8.31.1",
94
- "bumpp": "^10.1.0",
95
- "eslint": "^9.25.1",
96
- "eslint-config-prettier": "^10.1.2",
97
- "eslint-plugin-format": "^1.0.1",
98
- "eslint-plugin-prettier": "^5.2.6",
89
+ "@eslint-react/eslint-plugin": "^2.0.0",
90
+ "@eslint/config-inspector": "^1.3.0",
91
+ "@types/node": "^22.18.6",
92
+ "@typescript-eslint/eslint-plugin": "^8.44.1",
93
+ "@typescript-eslint/parser": "^8.44.1",
94
+ "bumpp": "^10.2.3",
95
+ "eslint": "^9.36.0",
96
+ "eslint-config-prettier": "^10.1.8",
97
+ "eslint-plugin-format": "^1.0.2",
98
+ "eslint-plugin-prettier": "^5.5.4",
99
99
  "eslint-plugin-react-hooks": "^5.2.0",
100
- "eslint-plugin-react-refresh": "^0.4.20",
101
- "eslint-plugin-vue": "^10.1.0",
102
- "jiti": "^2.4.2",
103
- "prettier": "^3.5.3",
104
- "simple-git-hooks": "^2.13.0",
105
- "tsup": "^8.4.0",
106
- "typescript": "^5.8.3",
107
- "vue-eslint-parser": "^10.1.3"
100
+ "eslint-plugin-react-refresh": "^0.4.22",
101
+ "eslint-plugin-vue": "^10.5.0",
102
+ "jiti": "^2.6.0",
103
+ "prettier": "^3.6.2",
104
+ "simple-git-hooks": "^2.13.1",
105
+ "tsdown": "^0.15.4",
106
+ "typescript": "^5.9.2",
107
+ "vue-eslint-parser": "^10.2.0"
108
108
  },
109
109
  "scripts": {
110
- "build": "tsup",
110
+ "build": "tsdown",
111
111
  "lint": "eslint .",
112
112
  "typecheck": "tsc --noEmit",
113
113
  "dev": "config-inspector",