diff --git a/news/3 Code Health/4060.md b/news/3 Code Health/4060.md new file mode 100644 index 000000000000..e8d2dc865386 --- /dev/null +++ b/news/3 Code Health/4060.md @@ -0,0 +1 @@ +Remove TSLint comments since we use ESLint. diff --git a/src/client/common/utils/version.ts b/src/client/common/utils/version.ts index c28bf85dfd70..4ef9c3b3d92c 100644 --- a/src/client/common/utils/version.ts +++ b/src/client/common/utils/version.ts @@ -391,14 +391,12 @@ export function areSimilarVersions { let clientFactory: ILanguageClientFactory; let server: DotNetLanguageServerProxy; diff --git a/src/test/common/extensions.unit.test.ts b/src/test/common/extensions.unit.test.ts index 5a6da7f81e88..133382b251fa 100644 --- a/src/test/common/extensions.unit.test.ts +++ b/src/test/common/extensions.unit.test.ts @@ -73,7 +73,6 @@ suite('String Extensions', () => { expect(formatString.format('one', 'two', 'three')).to.be.equal(expectedString); }); test('String should remove quotes', () => { - //tslint:disable:no-multiline-string const quotedString = `'foo is "bar" is foo' is bar'`; const quotedString2 = `foo is "bar" is foo' is bar'`; const quotedString3 = `foo is "bar" is foo' is bar`; @@ -85,7 +84,6 @@ suite('String Extensions', () => { expect(quotedString4.trimQuotes()).to.be.equal(expectedString); }); test('String should replace all substrings with new substring', () => { - //tslint:disable:no-multiline-string const oldString = `foo \\ foo \\ foo`; const expectedString = `foo \\\\ foo \\\\ foo`; const oldString2 = `\\ foo \\ foo`; diff --git a/src/test/common/platform/filesystem.unit.test.ts b/src/test/common/platform/filesystem.unit.test.ts index 0578439132cf..8c54b0c08ab7 100644 --- a/src/test/common/platform/filesystem.unit.test.ts +++ b/src/test/common/platform/filesystem.unit.test.ts @@ -24,7 +24,6 @@ function Uri(filename: string): vscode.Uri { } function createDummyStat(filetype: FileType): FileStat { - //tslint:disable-next-line:no-any return { type: filetype } as any; } @@ -91,7 +90,6 @@ suite('Raw FileSystem', () => { const stat = TypeMoq.Mock.ofType(undefined, TypeMoq.MockBehavior.Strict); // This is necessary because passing "mock.object" to // Promise.resolve() triggers the lookup. - //tslint:disable-next-line:no-any stat.setup((s: any) => s.then) .returns(() => undefined) .verifiable(TypeMoq.Times.atLeast(0)); @@ -174,7 +172,6 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102, - //tslint:disable-next-line:no-any } as any; const old = createMockLegacyStat(); setupStatFileType(old, testData.filetype); @@ -687,7 +684,6 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102, - //tslint:disable-next-line:no-any } as any; const lstat = createMockLegacyStat(); setupStatFileType(lstat, FileType.Unknown); @@ -712,7 +708,6 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102, - //tslint:disable-next-line:no-any } as any; const lstat = createMockLegacyStat(); lstat @@ -742,7 +737,6 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102, - //tslint:disable-next-line:no-any } as any; const lstat = createMockLegacyStat(); lstat @@ -800,7 +794,6 @@ suite('Raw FileSystem', () => { suite('createReadStream', () => { test('wraps the low-level function', () => { const filename = 'x/y/z/spam.py'; - //tslint:disable-next-line:no-any const expected = {} as any; raw.setup((r) => r.createReadStream(filename)) // expect the specific filename .returns(() => expected); @@ -824,7 +817,6 @@ suite('Raw FileSystem', () => { suite('createWriteStream', () => { test('wraps the low-level function', () => { const filename = 'x/y/z/spam.py'; - //tslint:disable-next-line:no-any const expected = {} as any; raw.setup((r) => r.createWriteStream(filename)) // expect the specific filename .returns(() => expected); @@ -880,7 +872,6 @@ suite('FileSystemUtils', () => { const stat = TypeMoq.Mock.ofType(undefined, TypeMoq.MockBehavior.Strict); // This is necessary because passing "mock.object" to // Promise.resolve() triggers the lookup. - //tslint:disable-next-line:no-any stat.setup((s: any) => s.then) .returns(() => undefined) .verifiable(TypeMoq.Times.atLeast(0)); diff --git a/src/test/linters/lint.functional.test.ts b/src/test/linters/lint.functional.test.ts index b100c4957887..165aa1f3967d 100644 --- a/src/test/linters/lint.functional.test.ts +++ b/src/test/linters/lint.functional.test.ts @@ -587,7 +587,7 @@ function getMessages(product: Product): ILintMessage[] { } default: { throwUnknownProduct(product); - return []; // to quiet tslint + return []; } } } diff --git a/src/test/linters/lint.unit.test.ts b/src/test/linters/lint.unit.test.ts index 2caeb7d358d0..4b0806ea91da 100644 --- a/src/test/linters/lint.unit.test.ts +++ b/src/test/linters/lint.unit.test.ts @@ -591,7 +591,7 @@ class TestFixture extends BaseTestFixture { } default: { throwUnknownProduct(product); - return []; // to quiet tslint + return []; } } this.setMessages(messages, product); diff --git a/src/test/mocks/vsc/charCode.ts b/src/test/mocks/vsc/charCode.ts index 2e62d54c93b8..d0fac68fbc57 100644 --- a/src/test/mocks/vsc/charCode.ts +++ b/src/test/mocks/vsc/charCode.ts @@ -4,8 +4,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* tslint:disable */ - // Names from https://blog.codinghorror.com/ascii-pronunciation-rules-for-programmers/ /** diff --git a/src/test/mocks/vsc/uri.ts b/src/test/mocks/vsc/uri.ts index ff33e0bbe1d4..671c60c1ba65 100644 --- a/src/test/mocks/vsc/uri.ts +++ b/src/test/mocks/vsc/uri.ts @@ -6,8 +6,6 @@ 'use strict'; -/* tslint:disable */ - import * as pathImport from 'path'; import { CharCode } from './charCode'; diff --git a/src/test/pythonEnvironments/discovery/locators/windowsKnownPathsLocator.functional.test.ts b/src/test/pythonEnvironments/discovery/locators/windowsKnownPathsLocator.functional.test.ts index e7fcf3831ceb..cd7715a1bf75 100644 --- a/src/test/pythonEnvironments/discovery/locators/windowsKnownPathsLocator.functional.test.ts +++ b/src/test/pythonEnvironments/discovery/locators/windowsKnownPathsLocator.functional.test.ts @@ -69,15 +69,12 @@ suite('Python envs locator - WindowsPathEnvVarLocator', async () => { suiteSetup(async function () { if (!IS_WINDOWS) { if (!process.env.PVSC_TEST_FORCE) { - // tslint:disable-next-line:no-invalid-this this.skip(); } - // tslint:disable:no-require-imports // eslint-disable-next-line global-require const sinon = require('sinon'); // eslint-disable-next-line global-require const platformAPI = require('../../../../../client/common/utils/platform'); - // tslint:enable:no-require-imports const stub = sinon.stub(platformAPI, 'getOSType'); stub.returns(OSType.Windows); } @@ -97,7 +94,6 @@ suite('Python envs locator - WindowsPathEnvVarLocator', async () => { try { run(); } catch (err) { - // tslint:disable-next-line:no-console console.log(err); } }); diff --git a/src/test/telemetry/index.unit.test.ts b/src/test/telemetry/index.unit.test.ts index b104e47a46f0..9c4ea8935dcf 100644 --- a/src/test/telemetry/index.unit.test.ts +++ b/src/test/telemetry/index.unit.test.ts @@ -2,7 +2,6 @@ // Licensed under the MIT License. 'use strict'; -//tslint:disable:max-func-body-length match-default-export-name no-any import { expect } from 'chai'; import rewiremock from 'rewiremock'; import * as TypeMoq from 'typemoq'; diff --git a/src/test/utils/fs.ts b/src/test/utils/fs.ts index ee77e0630245..fd36a4831c3c 100644 --- a/src/test/utils/fs.ts +++ b/src/test/utils/fs.ts @@ -283,7 +283,6 @@ export async function ensureFSTree( throw Error(`unsupported file kind ${kind}`); } } catch (err) { - // tslint:disable-next-line:no-console console.log('FAILED:', err); throw err; }