File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { eslintFix } from "@/command/eslint-fix" ;
2
+ import { impSort } from "@/command/eslint-import-sort" ;
2
3
import { checkGitUserEmail } from "@/command/git-user" ;
3
4
import { prettierFormat } from "@/command/prettier-format" ;
4
5
import { execCommand } from "@/helper" ;
5
- import { impSort } from "@/command/eslint-import-sort" ;
6
6
7
7
async function lint ( ) {
8
8
await checkGitUserEmail ( "^[a-zA-Z0-9._%+-]+@(gmail)\\.(com)$" ) ;
9
9
await prettierFormat ( [ "./src/" , "./scripts/" ] ) ;
10
- await execCommand ( "git" , [ "add" , "." ] ) ;
11
10
await eslintFix ( [ "./src/" , "./scripts/" ] ) ;
12
11
await impSort ( [ "./src/" , "./scripts/" ] ) ;
12
+ await execCommand ( "git" , [ "add" , "." ] ) ;
13
13
}
14
14
15
15
lint ( ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { ESLint } from "eslint";
6
6
import fs from "fs-extra" ;
7
7
8
8
import { ACTIVATION , impSortGlob } from "@/config" ;
9
- import { loggerInfo , printError , printSuccess } from "@/helper" ;
9
+ import { loggerInfo , printError , printInfo } from "@/helper" ;
10
10
import { ImpSortOptions } from "@/types" ;
11
11
12
12
const generateEnquirer = async ( ) : Promise < ImpSortOptions > => {
@@ -61,7 +61,7 @@ export const impSort = async (paths: string[]) => {
61
61
const formatter = await eslint . loadFormatter ( "stylish" ) ;
62
62
const resultText = await formatter . format ( results ) ;
63
63
if ( ! resultText ) {
64
- printSuccess ( "模块导入顺序已修复完毕" ) ;
64
+ printInfo ( "模块导入顺序已修复完毕" ) ;
65
65
} else {
66
66
printError ( resultText ) ;
67
67
}
You can’t perform that action at this time.
0 commit comments