@@ -24,26 +24,22 @@ export class LintRunner extends RushStackCompilerBase<ILintRunnerConfig> {
2424 this . _tslintRunner = new TslintRunner ( taskOptions , rootPath , terminalProvider ) ;
2525 }
2626
27- public invoke ( ) : Promise < void > {
27+ public async invoke ( ) : Promise < void > {
2828 const tslintFilePath : string = path . join ( this . _standardBuildFolders . projectFolderPath , 'tslint.json' ) ;
2929
30- let promise : Promise < void > = Promise . resolve ( ) ;
31-
3230 if ( FileSystem . exists ( tslintFilePath ) ) {
33- promise = promise . then ( ( ) => this . _tslintRunner . invoke ( ) ) ;
31+ await this . _tslintRunner . invoke ( ) ;
3432 }
3533
36- // ESLint supports a crazy amount of different filenames and formats for its config file. To reduce
37- // pointless inconsistency, we only support JSON and JavaScript. They are the most conventional formats,
34+ // ESLint supports too many different filenames and formats for its config file. To avoid
35+ // needless inconsistency, we only support JSON and JavaScript. They are the most conventional formats,
3836 // and have useful tradeoffs: JSON is deterministic, whereas JavaScript enables certain workarounds
3937 // for limitations of the format.
4038 const eslintFilePath1 : string = path . join ( this . _standardBuildFolders . projectFolderPath , '.eslintrc.js' ) ;
4139 const eslintFilePath2 : string = path . join ( this . _standardBuildFolders . projectFolderPath , '.eslintrc.json' ) ;
4240
4341 if ( FileSystem . exists ( eslintFilePath1 ) || FileSystem . exists ( eslintFilePath2 ) ) {
44- promise = promise . then ( ( ) => this . _eslintRunner . invoke ( ) ) ;
42+ await this . _eslintRunner . invoke ( ) ;
4543 }
46-
47- return promise ;
4844 }
4945}
0 commit comments