diff --git a/.eslintrc b/.eslintrc index edd1712fc98..966f58e82e3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -35,7 +35,7 @@ "@typescript-eslint/no-namespace": "off", "@typescript-eslint/no-object-literal-type-assertion": "off", "@typescript-eslint/no-parameter-properties": "off", - "@typescript-eslint/no-this-alias": "off", + "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-triple-slash-reference": "off", "@typescript-eslint/no-unnecessary-qualifier": "off", "@typescript-eslint/no-unnecessary-type-assertion": "off", diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index c3b2ef3e6ec..f21d7ea9b90 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -26,7 +26,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase { // Read in and evaluate the test list const testList = this.tests && this.tests.length ? this.tests : this.enumerateTestFiles(); - // tslint:disable-next-line:no-this-assignment + // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; describe(`${this.kind()} code samples`, function(this: Mocha.ISuiteCallbackContext) { this.timeout(600_000); // 10 minutes @@ -36,7 +36,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase { }); } private runTest(directoryName: string) { - // tslint:disable-next-line:no-this-assignment + // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; const timeout = 600_000; // 10 minutes describe(directoryName, function(this: Mocha.ISuiteCallbackContext) {