File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9797 "gulp-watch" : " ^5.0.1" ,
9898 "highlight.js" : " 9.15.8" ,
9999 "html-webpack-plugin" : " 3.2.0" ,
100- "husky" : " 3.0.0 " ,
100+ "husky" : " 1.3.1 " ,
101101 "inquirer" : " 6.4.1" ,
102102 "isomorphic-fetch" : " 2.2.1" ,
103103 "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>) {
136136 }
137137
138138 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 ( ' ' ) } ` ) ;
144142 process . exit ( 1 ) ;
145143 }
146144}
You can’t perform that action at this time.
0 commit comments