File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 97
97
"gulp-watch" : " ^5.0.1" ,
98
98
"highlight.js" : " 9.15.8" ,
99
99
"html-webpack-plugin" : " 3.2.0" ,
100
- "husky" : " 3.0.0 " ,
100
+ "husky" : " 1.3.1 " ,
101
101
"inquirer" : " 6.4.1" ,
102
102
"isomorphic-fetch" : " 2.2.1" ,
103
103
"jest" : " 24.8.0" ,
Original file line number Diff line number Diff line change @@ -136,11 +136,9 @@ export async function lint(options?: Partial<DefaultOptions>) {
136
136
}
137
137
138
138
if ( mergedOptions . needFix && lintResult . results . some ( each => each . output ) ) {
139
- console . log (
140
- colors . yellow (
141
- `${ lintResult . results . filter ( each => each . output ) . length } files autofixed, please recheck your code.` ,
142
- ) ,
143
- ) ;
139
+ const fixedFiles = lintResult . results . filter ( each => each . output ) ;
140
+ console . log ( colors . yellow ( `${ fixedFiles . length } files autofixed, please recheck your code.` ) ) ;
141
+ execSync ( `git add ${ fixedFiles . map ( file => file . filePath ) . join ( ' ' ) } ` ) ;
144
142
process . exit ( 1 ) ;
145
143
}
146
144
}
You can’t perform that action at this time.
0 commit comments