@cany748/eslint-config 4.2.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +954 -1346
- package/dist/index.mjs +87 -59
- package/package.json +38 -40
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import pluginComments from "@eslint-community/eslint-plugin-eslint-comments";
|
|
2
|
+
import pluginE18e from "@e18e/eslint-plugin";
|
|
2
3
|
import pluginPrettier from "eslint-plugin-prettier";
|
|
3
4
|
import configPrettier from "eslint-plugin-prettier/recommended";
|
|
4
5
|
import * as pluginImport from "eslint-plugin-import-x";
|
|
@@ -9,7 +10,6 @@ import { configs } from "eslint-plugin-regexp";
|
|
|
9
10
|
import pluginUnicorn from "eslint-plugin-unicorn";
|
|
10
11
|
import { isPackageExists } from "local-pkg";
|
|
11
12
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
12
|
-
|
|
13
13
|
//#region src/configs/comments.ts
|
|
14
14
|
function comments() {
|
|
15
15
|
return [{
|
|
@@ -21,7 +21,6 @@ function comments() {
|
|
|
21
21
|
}
|
|
22
22
|
}];
|
|
23
23
|
}
|
|
24
|
-
|
|
25
24
|
//#endregion
|
|
26
25
|
//#region src/globs.ts
|
|
27
26
|
const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -107,7 +106,6 @@ const GLOB_EXCLUDE = [
|
|
|
107
106
|
"**/auto-import?(s).d.ts",
|
|
108
107
|
"**/components.d.ts"
|
|
109
108
|
];
|
|
110
|
-
|
|
111
109
|
//#endregion
|
|
112
110
|
//#region src/configs/disables.ts
|
|
113
111
|
function disables() {
|
|
@@ -155,7 +153,22 @@ function disables() {
|
|
|
155
153
|
}
|
|
156
154
|
];
|
|
157
155
|
}
|
|
158
|
-
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/configs/e18e.ts
|
|
158
|
+
function e18e(options = {}) {
|
|
159
|
+
const { isInEditor = false, modernization = true, type = "app", moduleReplacements = type === "lib" && isInEditor, overrides = {}, performanceImprovements = true } = options;
|
|
160
|
+
const configs = pluginE18e.configs;
|
|
161
|
+
return [{
|
|
162
|
+
name: "e18e",
|
|
163
|
+
plugins: { e18e: pluginE18e },
|
|
164
|
+
rules: {
|
|
165
|
+
...modernization ? { ...configs.modernization.rules } : {},
|
|
166
|
+
...moduleReplacements ? { ...configs.moduleReplacements.rules } : {},
|
|
167
|
+
...performanceImprovements ? { ...configs.performanceImprovements.rules } : {},
|
|
168
|
+
...overrides
|
|
169
|
+
}
|
|
170
|
+
}];
|
|
171
|
+
}
|
|
159
172
|
//#endregion
|
|
160
173
|
//#region src/utils.ts
|
|
161
174
|
const parserPlain = {
|
|
@@ -180,8 +193,8 @@ const parserPlain = {
|
|
|
180
193
|
/**
|
|
181
194
|
* Combine array and non-array configs into a single array.
|
|
182
195
|
*/
|
|
183
|
-
async function combine(...configs
|
|
184
|
-
return (await Promise.all(configs
|
|
196
|
+
async function combine(...configs) {
|
|
197
|
+
return (await Promise.all(configs)).flat();
|
|
185
198
|
}
|
|
186
199
|
function toArray(value) {
|
|
187
200
|
return Array.isArray(value) ? value : [value];
|
|
@@ -198,7 +211,6 @@ function isInEditorEnv() {
|
|
|
198
211
|
if (isInGitHooksOrLintStaged()) return false;
|
|
199
212
|
return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
|
|
200
213
|
}
|
|
201
|
-
|
|
202
214
|
//#endregion
|
|
203
215
|
//#region src/configs/formatters.ts
|
|
204
216
|
function formatters(options = true) {
|
|
@@ -208,12 +220,12 @@ function formatters(options = true) {
|
|
|
208
220
|
html: true,
|
|
209
221
|
markdown: true
|
|
210
222
|
};
|
|
211
|
-
const configs
|
|
223
|
+
const configs = [{
|
|
212
224
|
name: "formatter/setup",
|
|
213
225
|
plugins: { prettier: pluginPrettier },
|
|
214
226
|
rules: configPrettier.rules
|
|
215
227
|
}];
|
|
216
|
-
if (options.css) configs
|
|
228
|
+
if (options.css) configs.push({
|
|
217
229
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
218
230
|
languageOptions: { parser: parserPlain },
|
|
219
231
|
name: "formatter/css",
|
|
@@ -229,38 +241,36 @@ function formatters(options = true) {
|
|
|
229
241
|
name: "formatter/less",
|
|
230
242
|
rules: { "prettier/prettier": ["error", { parser: "less" }] }
|
|
231
243
|
});
|
|
232
|
-
if (options.graphql) configs
|
|
244
|
+
if (options.graphql) configs.push({
|
|
233
245
|
files: [GLOB_GRAPHQL],
|
|
234
246
|
languageOptions: { parser: parserPlain },
|
|
235
247
|
name: "formatter/graphql",
|
|
236
248
|
rules: { "prettier/prettier": ["error", { parser: "graphql" }] }
|
|
237
249
|
});
|
|
238
|
-
if (options.html) configs
|
|
250
|
+
if (options.html) configs.push({
|
|
239
251
|
files: [GLOB_HTML],
|
|
240
252
|
languageOptions: { parser: parserPlain },
|
|
241
253
|
name: "formatter/html",
|
|
242
254
|
rules: { "prettier/prettier": ["error", { parser: "html" }] }
|
|
243
255
|
});
|
|
244
|
-
if (options.markdown) configs
|
|
256
|
+
if (options.markdown) configs.push({
|
|
245
257
|
files: [GLOB_MARKDOWN],
|
|
246
258
|
languageOptions: { parser: parserPlain },
|
|
247
259
|
name: "formatter/markdown",
|
|
248
260
|
rules: { "prettier/prettier": ["error", { parser: "markdown" }] }
|
|
249
261
|
});
|
|
250
|
-
return configs
|
|
262
|
+
return configs;
|
|
251
263
|
}
|
|
252
|
-
|
|
253
264
|
//#endregion
|
|
254
265
|
//#region src/configs/ignores.ts
|
|
255
266
|
function ignores(userIgnores = []) {
|
|
256
|
-
let ignores
|
|
257
|
-
ignores
|
|
267
|
+
let ignores = [...GLOB_EXCLUDE];
|
|
268
|
+
ignores = typeof userIgnores === "function" ? userIgnores(ignores) : [...ignores, ...userIgnores];
|
|
258
269
|
return [{
|
|
259
|
-
ignores
|
|
270
|
+
ignores,
|
|
260
271
|
name: "ignores"
|
|
261
272
|
}];
|
|
262
273
|
}
|
|
263
|
-
|
|
264
274
|
//#endregion
|
|
265
275
|
//#region src/configs/imports.ts
|
|
266
276
|
function imports() {
|
|
@@ -283,7 +293,6 @@ function imports() {
|
|
|
283
293
|
}
|
|
284
294
|
}];
|
|
285
295
|
}
|
|
286
|
-
|
|
287
296
|
//#endregion
|
|
288
297
|
//#region src/configs/javascript.ts
|
|
289
298
|
function javascript(options = {}) {
|
|
@@ -532,7 +541,6 @@ function javascript(options = {}) {
|
|
|
532
541
|
}
|
|
533
542
|
}];
|
|
534
543
|
}
|
|
535
|
-
|
|
536
544
|
//#endregion
|
|
537
545
|
//#region src/configs/jsonc.ts
|
|
538
546
|
async function jsonc(options = {}) {
|
|
@@ -541,19 +549,42 @@ async function jsonc(options = {}) {
|
|
|
541
549
|
GLOB_JSON5,
|
|
542
550
|
GLOB_JSONC
|
|
543
551
|
] } = options;
|
|
544
|
-
const [pluginJsonc, parserJsonc] = await Promise.all([interopDefault(import("eslint-plugin-jsonc")), interopDefault(import("jsonc-eslint-parser"))]);
|
|
545
552
|
return [{
|
|
546
553
|
name: "jsonc",
|
|
547
554
|
files,
|
|
548
|
-
|
|
549
|
-
plugins: { jsonc:
|
|
555
|
+
language: "jsonc/x",
|
|
556
|
+
plugins: { jsonc: await interopDefault(import("eslint-plugin-jsonc")) },
|
|
550
557
|
rules: {
|
|
551
|
-
|
|
552
|
-
|
|
558
|
+
strict: "off",
|
|
559
|
+
"no-unused-expressions": "off",
|
|
560
|
+
"no-unused-vars": "off",
|
|
561
|
+
"jsonc/no-bigint-literals": "error",
|
|
562
|
+
"jsonc/no-binary-expression": "error",
|
|
563
|
+
"jsonc/no-binary-numeric-literals": "error",
|
|
564
|
+
"jsonc/no-dupe-keys": "error",
|
|
565
|
+
"jsonc/no-escape-sequence-in-identifier": "error",
|
|
566
|
+
"jsonc/no-hexadecimal-numeric-literals": "error",
|
|
567
|
+
"jsonc/no-infinity": "error",
|
|
568
|
+
"jsonc/no-irregular-whitespace": "error",
|
|
569
|
+
"jsonc/no-multi-str": "error",
|
|
570
|
+
"jsonc/no-nan": "error",
|
|
571
|
+
"jsonc/no-number-props": "error",
|
|
572
|
+
"jsonc/no-numeric-separators": "error",
|
|
573
|
+
"jsonc/no-octal-numeric-literals": "error",
|
|
574
|
+
"jsonc/no-octal": "error",
|
|
575
|
+
"jsonc/no-parenthesized": "error",
|
|
576
|
+
"jsonc/no-plus-sign": "error",
|
|
577
|
+
"jsonc/no-regexp-literals": "error",
|
|
578
|
+
"jsonc/no-sparse-arrays": "error",
|
|
579
|
+
"jsonc/no-template-literals": "error",
|
|
580
|
+
"jsonc/no-undefined-value": "error",
|
|
581
|
+
"jsonc/no-unicode-codepoint-escapes": "error",
|
|
582
|
+
"jsonc/no-useless-escape": "error",
|
|
583
|
+
"jsonc/valid-json-number": "error",
|
|
584
|
+
"jsonc/vue-custom-block/no-parsing-error": "error"
|
|
553
585
|
}
|
|
554
586
|
}];
|
|
555
587
|
}
|
|
556
|
-
|
|
557
588
|
//#endregion
|
|
558
589
|
//#region src/configs/node.ts
|
|
559
590
|
function node() {
|
|
@@ -577,7 +608,6 @@ function node() {
|
|
|
577
608
|
}
|
|
578
609
|
}];
|
|
579
610
|
}
|
|
580
|
-
|
|
581
611
|
//#endregion
|
|
582
612
|
//#region src/configs/regexp.ts
|
|
583
613
|
function regexp(options = {}) {
|
|
@@ -592,7 +622,6 @@ function regexp(options = {}) {
|
|
|
592
622
|
}
|
|
593
623
|
}];
|
|
594
624
|
}
|
|
595
|
-
|
|
596
625
|
//#endregion
|
|
597
626
|
//#region src/configs/sort.ts
|
|
598
627
|
/**
|
|
@@ -828,7 +857,6 @@ function sortTsconfig() {
|
|
|
828
857
|
] }
|
|
829
858
|
}];
|
|
830
859
|
}
|
|
831
|
-
|
|
832
860
|
//#endregion
|
|
833
861
|
//#region src/configs/test.ts
|
|
834
862
|
let _pluginTest;
|
|
@@ -863,25 +891,24 @@ async function test(options = {}) {
|
|
|
863
891
|
}
|
|
864
892
|
}];
|
|
865
893
|
}
|
|
866
|
-
|
|
867
894
|
//#endregion
|
|
868
895
|
//#region src/configs/typescript.ts
|
|
869
896
|
async function typescript(options = {}) {
|
|
870
897
|
const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, type = "app" } = options;
|
|
871
898
|
const files = options.files ?? [
|
|
872
|
-
|
|
873
|
-
|
|
899
|
+
"**/*.?([cm])ts",
|
|
900
|
+
"**/*.?([cm])tsx",
|
|
874
901
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
875
902
|
];
|
|
876
|
-
const filesTypeAware = options.filesTypeAware ?? [
|
|
877
|
-
const ignoresTypeAware = options.ignoresTypeAware ?? [
|
|
903
|
+
const filesTypeAware = options.filesTypeAware ?? ["**/*.?([cm])ts", "**/*.?([cm])tsx"];
|
|
904
|
+
const ignoresTypeAware = options.ignoresTypeAware ?? [`**/*.md/**`, "**/*.astro/*.ts"];
|
|
878
905
|
const tsconfigPath = options?.tsconfigPath;
|
|
879
906
|
const isTypeAware = !!tsconfigPath;
|
|
880
907
|
const [pluginTs, parserTs] = await Promise.all([interopDefault(import("@typescript-eslint/eslint-plugin")), interopDefault(import("@typescript-eslint/parser"))]);
|
|
881
|
-
function makeParser(typeAware, files
|
|
908
|
+
function makeParser(typeAware, files, ignores) {
|
|
882
909
|
return {
|
|
883
|
-
files
|
|
884
|
-
...ignores
|
|
910
|
+
files,
|
|
911
|
+
...ignores ? { ignores } : {},
|
|
885
912
|
languageOptions: {
|
|
886
913
|
parser: parserTs,
|
|
887
914
|
parserOptions: {
|
|
@@ -972,7 +999,6 @@ async function typescript(options = {}) {
|
|
|
972
999
|
}] : []
|
|
973
1000
|
];
|
|
974
1001
|
}
|
|
975
|
-
|
|
976
1002
|
//#endregion
|
|
977
1003
|
//#region src/configs/unicorn.ts
|
|
978
1004
|
function unicorn() {
|
|
@@ -994,7 +1020,6 @@ function unicorn() {
|
|
|
994
1020
|
}
|
|
995
1021
|
}];
|
|
996
1022
|
}
|
|
997
|
-
|
|
998
1023
|
//#endregion
|
|
999
1024
|
//#region src/configs/unocss.ts
|
|
1000
1025
|
async function unocss() {
|
|
@@ -1003,7 +1028,6 @@ async function unocss() {
|
|
|
1003
1028
|
name: "unocss"
|
|
1004
1029
|
}];
|
|
1005
1030
|
}
|
|
1006
|
-
|
|
1007
1031
|
//#endregion
|
|
1008
1032
|
//#region src/configs/vue.ts
|
|
1009
1033
|
async function vue(options = {}) {
|
|
@@ -1099,7 +1123,6 @@ async function vue(options = {}) {
|
|
|
1099
1123
|
}
|
|
1100
1124
|
}];
|
|
1101
1125
|
}
|
|
1102
|
-
|
|
1103
1126
|
//#endregion
|
|
1104
1127
|
//#region src/factory.ts
|
|
1105
1128
|
const flatConfigProps = [
|
|
@@ -1128,48 +1151,53 @@ const VuePackages = [
|
|
|
1128
1151
|
* The merged ESLint configurations.
|
|
1129
1152
|
*/
|
|
1130
1153
|
const factoryConfig = function(options = {}, ...userConfigs) {
|
|
1131
|
-
const { componentExts = [], formatters: enableFormatters = true, gitignore: enableGitignore = true, ignores: userIgnores = [], jsonc: enableJSONC = true, regexp: enableRegexp = true, test: enableTest = true, typescript: enableTypeScript = isPackageExists("typescript"), unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
|
|
1154
|
+
const { componentExts = [], formatters: enableFormatters = true, gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, jsonc: enableJSONC = true, node: enableNode = true, e18e: enableE18e = true, regexp: enableRegexp = true, test: enableTest = true, typescript: enableTypeScript = isPackageExists("typescript"), unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
|
|
1132
1155
|
let isInEditor = options.isInEditor;
|
|
1133
1156
|
if (isInEditor == null) {
|
|
1134
1157
|
isInEditor = isInEditorEnv();
|
|
1135
1158
|
if (isInEditor) console.log("[@cany748/eslint-config] Detected running in editor, some rules are disabled.");
|
|
1136
1159
|
}
|
|
1137
|
-
const configs
|
|
1138
|
-
if (enableGitignore) if (typeof enableGitignore === "boolean") configs
|
|
1139
|
-
else configs
|
|
1140
|
-
configs
|
|
1160
|
+
const configs = [];
|
|
1161
|
+
if (enableGitignore) if (typeof enableGitignore === "boolean") configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({ strict: false })]));
|
|
1162
|
+
else configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r(enableGitignore)]));
|
|
1163
|
+
configs.push(comments(), ignores(userIgnores), javascript({
|
|
1141
1164
|
isInEditor,
|
|
1142
1165
|
overrides: options.javascript?.overrides
|
|
1143
|
-
}),
|
|
1166
|
+
}), unicorn());
|
|
1167
|
+
if (enableImports) configs.push(imports());
|
|
1168
|
+
if (enableNode) configs.push(node());
|
|
1144
1169
|
if (enableVue) componentExts.push("vue");
|
|
1145
|
-
if (
|
|
1170
|
+
if (enableE18e) configs.push(e18e({
|
|
1171
|
+
isInEditor,
|
|
1172
|
+
...enableE18e === true ? {} : enableE18e
|
|
1173
|
+
}));
|
|
1174
|
+
if (enableTypeScript) configs.push(typescript({
|
|
1146
1175
|
...typeof enableTypeScript === "boolean" ? {} : enableTypeScript || {},
|
|
1147
1176
|
componentExts,
|
|
1148
1177
|
type: options.type
|
|
1149
1178
|
}));
|
|
1150
|
-
if (enableRegexp) configs
|
|
1151
|
-
if (enableTest) configs
|
|
1179
|
+
if (enableRegexp) configs.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
|
|
1180
|
+
if (enableTest) configs.push(test({
|
|
1152
1181
|
isInEditor,
|
|
1153
1182
|
overrides: typeof enableTest === "boolean" ? {} : enableTest?.overrides
|
|
1154
1183
|
}));
|
|
1155
|
-
if (enableVue) configs
|
|
1184
|
+
if (enableVue) configs.push(vue({
|
|
1156
1185
|
...typeof enableVue === "boolean" ? {} : enableVue || {},
|
|
1157
1186
|
typescript: !!enableTypeScript
|
|
1158
1187
|
}));
|
|
1159
|
-
if (enableUnoCSS) configs
|
|
1160
|
-
if (enableJSONC) configs
|
|
1161
|
-
if (enableFormatters) configs
|
|
1162
|
-
configs
|
|
1188
|
+
if (enableUnoCSS) configs.push(unocss());
|
|
1189
|
+
if (enableJSONC) configs.push(jsonc(typeof enableJSONC === "boolean" ? {} : enableJSONC), sortPackageJson(), sortTsconfig());
|
|
1190
|
+
if (enableFormatters) configs.push(formatters(enableFormatters));
|
|
1191
|
+
configs.push(disables());
|
|
1163
1192
|
if ("files" in options) throw new Error("[@cany748/eslint-config] The first argument should not contain the \"files\" property as the options are supposed to be global. Place it in the second or later config instead.");
|
|
1164
1193
|
const fusedConfig = flatConfigProps.reduce((acc, key) => {
|
|
1165
1194
|
if (key in options) acc[key] = options[key];
|
|
1166
1195
|
return acc;
|
|
1167
1196
|
}, {});
|
|
1168
|
-
if (Object.keys(fusedConfig).length > 0) configs
|
|
1197
|
+
if (Object.keys(fusedConfig).length > 0) configs.push([fusedConfig]);
|
|
1169
1198
|
let composer = new FlatConfigComposer();
|
|
1170
|
-
composer = composer.append(...configs
|
|
1199
|
+
composer = composer.append(...configs, ...userConfigs);
|
|
1171
1200
|
return composer;
|
|
1172
1201
|
};
|
|
1173
|
-
|
|
1174
1202
|
//#endregion
|
|
1175
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, combine, comments, disables, factoryConfig, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsonc, node, parserPlain, regexp, sortPackageJson, sortTsconfig, test, toArray, typescript, unicorn, unocss, vue };
|
|
1203
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, combine, comments, disables, e18e, factoryConfig, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsonc, node, parserPlain, regexp, sortPackageJson, sortTsconfig, test, toArray, typescript, unicorn, unocss, vue };
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cany748/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
5
|
-
"packageManager": "pnpm@10.25.0",
|
|
4
|
+
"version": "5.0.0",
|
|
6
5
|
"exports": {
|
|
7
6
|
".": "./dist/index.mjs"
|
|
8
7
|
},
|
|
@@ -12,20 +11,10 @@
|
|
|
12
11
|
"files": [
|
|
13
12
|
"dist"
|
|
14
13
|
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "pnpm typegen && tsdown --clean --dts",
|
|
17
|
-
"typegen": "bun scripts/typegen.ts",
|
|
18
|
-
"dev": "npx @eslint/config-inspector --config eslint.config.ts",
|
|
19
|
-
"lint": "eslint",
|
|
20
|
-
"lint:fix": "eslint --fix",
|
|
21
|
-
"release": "bumpp && pnpm publish",
|
|
22
|
-
"typecheck": "tsc --noEmit",
|
|
23
|
-
"prepare": "simple-git-hooks"
|
|
24
|
-
},
|
|
25
14
|
"peerDependencies": {
|
|
26
|
-
"@unocss/eslint-plugin": "^66.
|
|
27
|
-
"eslint-plugin-vue": "^10.
|
|
28
|
-
"typescript-eslint": "^8.
|
|
15
|
+
"@unocss/eslint-plugin": "^66.6.7",
|
|
16
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
17
|
+
"typescript-eslint": "^8.58.0"
|
|
29
18
|
},
|
|
30
19
|
"peerDependenciesMeta": {
|
|
31
20
|
"@unocss/eslint-plugin": {
|
|
@@ -39,42 +28,51 @@
|
|
|
39
28
|
}
|
|
40
29
|
},
|
|
41
30
|
"dependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"eslint": "^
|
|
45
|
-
"eslint
|
|
31
|
+
"@e18e/eslint-plugin": "^0.3.0",
|
|
32
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
|
|
33
|
+
"@vitest/eslint-plugin": "^1.6.14",
|
|
34
|
+
"eslint": "^10.2.0",
|
|
35
|
+
"eslint-config-flat-gitignore": "^2.3.0",
|
|
46
36
|
"eslint-config-prettier": "^10.1.8",
|
|
47
|
-
"eslint-flat-config-utils": "^
|
|
48
|
-
"eslint-plugin-import-x": "^4.16.
|
|
49
|
-
"eslint-plugin-jsonc": "^
|
|
50
|
-
"eslint-plugin-n": "^17.
|
|
37
|
+
"eslint-flat-config-utils": "^3.1.0",
|
|
38
|
+
"eslint-plugin-import-x": "^4.16.2",
|
|
39
|
+
"eslint-plugin-jsonc": "^3.1.2",
|
|
40
|
+
"eslint-plugin-n": "^17.24.0",
|
|
51
41
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
52
|
-
"eslint-plugin-prettier": "^5.5.
|
|
53
|
-
"eslint-plugin-regexp": "^
|
|
54
|
-
"eslint-plugin-unicorn": "^
|
|
55
|
-
"eslint-plugin-unused-imports": "^4.
|
|
56
|
-
"globals": "^
|
|
42
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
43
|
+
"eslint-plugin-regexp": "^3.1.0",
|
|
44
|
+
"eslint-plugin-unicorn": "^64.0.0",
|
|
45
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
46
|
+
"globals": "^17.4.0",
|
|
57
47
|
"jiti": "^2.6.1",
|
|
58
|
-
"jsonc-eslint-parser": "^2.4.2",
|
|
59
48
|
"local-pkg": "^1.1.2",
|
|
60
|
-
"prettier": "^3.
|
|
49
|
+
"prettier": "^3.8.1"
|
|
61
50
|
},
|
|
62
51
|
"devDependencies": {
|
|
63
|
-
"@types/node": "^25.
|
|
64
|
-
"@unocss/eslint-plugin": "^66.
|
|
65
|
-
"bumpp": "^
|
|
66
|
-
"eslint-plugin-vue": "^10.
|
|
67
|
-
"eslint-typegen": "^2.3.
|
|
68
|
-
"lint-staged": "^16.
|
|
52
|
+
"@types/node": "^25.5.2",
|
|
53
|
+
"@unocss/eslint-plugin": "^66.6.7",
|
|
54
|
+
"bumpp": "^11.0.1",
|
|
55
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
56
|
+
"eslint-typegen": "^2.3.1",
|
|
57
|
+
"lint-staged": "^16.4.0",
|
|
69
58
|
"simple-git-hooks": "^2.13.1",
|
|
70
|
-
"tsdown": "^0.
|
|
71
|
-
"typescript": "^
|
|
72
|
-
"typescript-eslint": "^8.
|
|
59
|
+
"tsdown": "^0.21.7",
|
|
60
|
+
"typescript": "^6.0.2",
|
|
61
|
+
"typescript-eslint": "^8.58.0"
|
|
73
62
|
},
|
|
74
63
|
"simple-git-hooks": {
|
|
75
64
|
"pre-commit": "pnpm lint-staged"
|
|
76
65
|
},
|
|
77
66
|
"lint-staged": {
|
|
78
67
|
"*": "eslint --fix"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "pnpm typegen && tsdown --clean --dts",
|
|
71
|
+
"typegen": "bun scripts/typegen.ts",
|
|
72
|
+
"dev": "pnpm dlx @eslint/config-inspector --config eslint.config.ts",
|
|
73
|
+
"lint": "eslint",
|
|
74
|
+
"lint:fix": "eslint --fix",
|
|
75
|
+
"release": "bumpp && pnpm publish",
|
|
76
|
+
"typecheck": "tsc --noEmit"
|
|
79
77
|
}
|
|
80
|
-
}
|
|
78
|
+
}
|