@seayoo-web/scripts 1.3.0 → 1.3.1

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 CHANGED
@@ -252,6 +252,20 @@ const vueEslintConfig = [
252
252
  }
253
253
  }
254
254
  ];
255
+ const importOrderRuleConfig = {
256
+ groups: ["builtin", "external", "internal", "parent", "sibling", "index", "type"],
257
+ pathGroups: [
258
+ {
259
+ pattern: "@/**",
260
+ group: "internal"
261
+ }
262
+ ],
263
+ "newlines-between": "always",
264
+ alphabetize: {
265
+ order: "asc",
266
+ caseInsensitive: true
267
+ }
268
+ };
255
269
  const importEslintConfig = [
256
270
  flatConfigs.recommended,
257
271
  {
@@ -262,23 +276,7 @@ const importEslintConfig = [
262
276
  "import/no-named-as-default": "off",
263
277
  "import/no-named-as-default-member": "off",
264
278
  "import/export": ["error"],
265
- "import/order": [
266
- "error",
267
- {
268
- groups: ["builtin", "external", "internal", "parent", "sibling", "index", "type"],
269
- pathGroups: [
270
- {
271
- pattern: "@/**",
272
- group: "internal"
273
- }
274
- ],
275
- "newlines-between": "always",
276
- alphabetize: {
277
- order: "asc",
278
- caseInsensitive: true
279
- }
280
- }
281
- ]
279
+ "import/order": ["error", importOrderRuleConfig]
282
280
  }
283
281
  }
284
282
  ];
@@ -310,6 +308,7 @@ export {
310
308
  definePageBuildConfig,
311
309
  getBuildEnv,
312
310
  htmlInjectPlugin,
311
+ importOrderRuleConfig,
313
312
  stylelintConfig,
314
313
  transformEnvs
315
314
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/scripts",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "scripts for seayoo web monorepos",
5
5
  "type": "module",
6
6
  "source": "index.ts",
@@ -1,6 +1,19 @@
1
1
  import { type TSESLint } from "@typescript-eslint/utils";
2
+ /** 默认的 import order 检查配置 */
3
+ export declare const importOrderRuleConfig: {
4
+ groups: string[];
5
+ pathGroups: {
6
+ pattern: string;
7
+ group: string;
8
+ }[];
9
+ "newlines-between": string;
10
+ alphabetize: {
11
+ order: string;
12
+ caseInsensitive: boolean;
13
+ };
14
+ };
2
15
  export type ESLintFlatConfig = TSESLint.FlatConfig.Config;
3
16
  /**
4
- * 导出默认的 eslint 配置,包括 vue 基本 eslint 和 import order lint
17
+ * 导出默认的 eslint 配置,内置了 vue eslint 和 import lint
5
18
  */
6
19
  export declare function defineEslintConfig(...options: ESLintFlatConfig[]): ESLintFlatConfig[];