@seayoo-web/scripts 1.2.12 → 1.3.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.js +15 -7
- package/package.json +1 -1
- package/types/src/eslint.d.ts +3 -7
package/dist/index.js
CHANGED
|
@@ -9,8 +9,7 @@ import { existsSync, readFileSync } from "fs";
|
|
|
9
9
|
import "colors";
|
|
10
10
|
import { g as getNowTime, a as getCommitInfo, c as createPageDeployTag } from "./git-BbsLu9cn.js";
|
|
11
11
|
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
|
|
12
|
-
import { vueTsConfigs } from "@vue/eslint-config-typescript";
|
|
13
|
-
import { defineConfigWithVueTs } from "@vue/eslint-config-typescript";
|
|
12
|
+
import { vueTsConfigs, defineConfigWithVueTs } from "@vue/eslint-config-typescript";
|
|
14
13
|
import { flatConfigs } from "eslint-plugin-import";
|
|
15
14
|
import pluginVue from "eslint-plugin-vue";
|
|
16
15
|
function defineLibBuildConfig(option) {
|
|
@@ -152,7 +151,7 @@ function definePageBuildConfig(option) {
|
|
|
152
151
|
"regenerator-runtime/runtime.js",
|
|
153
152
|
"core-js/es/array/flat",
|
|
154
153
|
"core-js/es/global-this",
|
|
155
|
-
"core-js/es/promise
|
|
154
|
+
"core-js/es/promise",
|
|
156
155
|
"core-js/es/symbol"
|
|
157
156
|
]
|
|
158
157
|
}),
|
|
@@ -235,6 +234,14 @@ function defineAppBuildConfig(option) {
|
|
|
235
234
|
});
|
|
236
235
|
}
|
|
237
236
|
const vueEslintConfig = [
|
|
237
|
+
{
|
|
238
|
+
name: "app/files-to-lint",
|
|
239
|
+
files: ["**/*.{ts,mts,tsx,vue,mjs}"]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "app/files-to-ignore",
|
|
243
|
+
ignores: ["*.mjs", "**/dist/**", "**/bin/**", "**/types/**", "**/dist-ssr/**", "**/coverage/**"]
|
|
244
|
+
},
|
|
238
245
|
pluginVue.configs["flat/essential"],
|
|
239
246
|
vueTsConfigs.recommended,
|
|
240
247
|
skipFormatting,
|
|
@@ -275,6 +282,9 @@ const importEslintConfig = [
|
|
|
275
282
|
}
|
|
276
283
|
}
|
|
277
284
|
];
|
|
285
|
+
function defineEslintConfig(...options) {
|
|
286
|
+
return defineConfigWithVueTs(vueEslintConfig, importEslintConfig, options);
|
|
287
|
+
}
|
|
278
288
|
const stylelintConfig = {
|
|
279
289
|
extends: ["stylelint-config-standard", "stylelint-config-recess-order"],
|
|
280
290
|
overrides: [
|
|
@@ -295,13 +305,11 @@ const stylelintConfig = {
|
|
|
295
305
|
export {
|
|
296
306
|
EnvPrefix,
|
|
297
307
|
defineAppBuildConfig,
|
|
298
|
-
|
|
308
|
+
defineEslintConfig,
|
|
299
309
|
defineLibBuildConfig,
|
|
300
310
|
definePageBuildConfig,
|
|
301
311
|
getBuildEnv,
|
|
302
312
|
htmlInjectPlugin,
|
|
303
|
-
importEslintConfig,
|
|
304
313
|
stylelintConfig,
|
|
305
|
-
transformEnvs
|
|
306
|
-
vueEslintConfig
|
|
314
|
+
transformEnvs
|
|
307
315
|
};
|
package/package.json
CHANGED
package/types/src/eslint.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { type TSESLint } from "@typescript-eslint/utils";
|
|
2
|
-
export
|
|
2
|
+
export type ESLintFlatConfig = TSESLint.FlatConfig.Config;
|
|
3
3
|
/**
|
|
4
|
-
* vue eslint
|
|
4
|
+
* 导出默认的 eslint 配置,包括 vue 基本 eslint 和 import order lint
|
|
5
5
|
*/
|
|
6
|
-
export declare
|
|
7
|
-
/**
|
|
8
|
-
* import 规则,含排序配置
|
|
9
|
-
*/
|
|
10
|
-
export declare const importEslintConfig: TSESLint.FlatConfig.Config[];
|
|
6
|
+
export declare function defineEslintConfig(...options: ESLintFlatConfig[]): ESLintFlatConfig[];
|