Skip to content

Commit f693c97

Browse files
committed
💅 ci(app): 修复构建顺序
1 parent 4ccf979 commit f693c97

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/lint-script.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { eslintFix } from "@/command/eslint-fix";
2+
import { impSort } from "@/command/eslint-import-sort";
23
import { checkGitUserEmail } from "@/command/git-user";
34
import { prettierFormat } from "@/command/prettier-format";
45
import { execCommand } from "@/helper";
5-
import { impSort } from "@/command/eslint-import-sort";
66

77
async function lint() {
88
await checkGitUserEmail("^[a-zA-Z0-9._%+-]+@(gmail)\\.(com)$");
99
await prettierFormat(["./src/", "./scripts/"]);
10-
await execCommand("git", ["add", "."]);
1110
await eslintFix(["./src/", "./scripts/"]);
1211
await impSort(["./src/", "./scripts/"]);
12+
await execCommand("git", ["add", "."]);
1313
}
1414

1515
lint();

src/command/eslint-import-sort.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ESLint } from "eslint";
66
import fs from "fs-extra";
77

88
import { ACTIVATION, impSortGlob } from "@/config";
9-
import { loggerInfo, printError, printSuccess } from "@/helper";
9+
import { loggerInfo, printError, printInfo } from "@/helper";
1010
import { ImpSortOptions } from "@/types";
1111

1212
const generateEnquirer = async (): Promise<ImpSortOptions> => {
@@ -61,7 +61,7 @@ export const impSort = async (paths: string[]) => {
6161
const formatter = await eslint.loadFormatter("stylish");
6262
const resultText = await formatter.format(results);
6363
if (!resultText) {
64-
printSuccess("模块导入顺序已修复完毕");
64+
printInfo("模块导入顺序已修复完毕");
6565
} else {
6666
printError(resultText);
6767
}

0 commit comments

Comments
 (0)