Skip to content

Commit 054e79a

Browse files
committed
PR feedback
1 parent 47fbf81 commit 054e79a

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

‎core-build/gulp-core-build-typescript/src/LintCmdTask.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class LintCmdTask extends RSCTask<ILintCmdTaskConfig> {
4040
public executeTask(): Promise<void> {
4141
this.initializeRushStackCompiler();
4242

43-
const tslintRunner: TLintRunner = new this._rushStackCompiler.LintRunner(
43+
const lintRunner: TLintRunner = new this._rushStackCompiler.LintRunner(
4444
{
4545
displayAsError: this.taskConfig.displayAsError,
4646

@@ -51,6 +51,6 @@ export class LintCmdTask extends RSCTask<ILintCmdTaskConfig> {
5151
this._terminalProvider
5252
);
5353

54-
return tslintRunner.invoke();
54+
return lintRunner.invoke();
5555
}
5656
}

‎stack/rush-stack-compiler-shared/src/shared/LintRunner.ts‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)