Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/3 Code Health/4060.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove TSLint comments since we use ESLint.
2 changes: 0 additions & 2 deletions src/client/common/utils/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,12 @@ export function areSimilarVersions<T extends BasicVersionInfo, V extends BasicVe
return false;
}

// tslint:disable:no-any
if (result < 0) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return ((right as unknown) as any)[prop] === -1;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return ((left as unknown) as any)[prop] === -1;
// tslint:enable:no-any
}

// semver
Expand Down
2 changes: 0 additions & 2 deletions src/client/common/variables/systemVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { IDocumentManager, IWorkspaceService } from '../application/types';
import * as Types from '../utils/sysTypes';
import { IStringDictionary, ISystemVariables } from './types';

/* tslint:disable:rule1 no-any no-unnecessary-callback-wrapper jsdoc-format no-for-in prefer-const no-increment-decrement */

abstract class AbstractSystemVariables implements ISystemVariables {
public resolve(value: string): string;
public resolve(value: string[]): string[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// tslint:disable-next-line:no-single-line-block-comment
/* eslint-disable max-classes-per-file */

import { Event } from 'vscode';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// tslint:disable-next-line:no-single-line-block-comment
/* eslint-disable max-classes-per-file */

import { Event } from 'vscode';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

'use strict';

//tslint:disable:no-require-imports no-require-imports no-var-requires no-any no-unnecessary-class max-func-body-length match-default-export-name

import { expect } from 'chai';
import * as path from 'path';
import rewiremock from 'rewiremock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import '../../../client/common/extensions';
import { IConfigurationService, IDisposable, IPythonSettings } from '../../../client/common/types';
import { sleep } from '../../../client/common/utils/async';

//tslint:disable:no-require-imports no-require-imports no-var-requires no-any no-unnecessary-class max-func-body-length

suite('Language Server - LanguageServer', () => {
let clientFactory: ILanguageClientFactory;
let server: DotNetLanguageServerProxy;
Expand Down
2 changes: 0 additions & 2 deletions src/test/common/extensions.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand All @@ -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`;
Expand Down
9 changes: 0 additions & 9 deletions src/test/common/platform/filesystem.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -91,7 +90,6 @@ suite('Raw FileSystem', () => {
const stat = TypeMoq.Mock.ofType<fsextra.Stats>(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));
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -880,7 +872,6 @@ suite('FileSystemUtils', () => {
const stat = TypeMoq.Mock.ofType<FileStat>(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));
Expand Down
2 changes: 1 addition & 1 deletion src/test/linters/lint.functional.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ function getMessages(product: Product): ILintMessage[] {
}
default: {
throwUnknownProduct(product);
return []; // to quiet tslint
return [];
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/linters/lint.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ class TestFixture extends BaseTestFixture {
}
default: {
throwUnknownProduct(product);
return []; // to quiet tslint
return [];
}
}
this.setMessages(messages, product);
Expand Down
2 changes: 0 additions & 2 deletions src/test/mocks/vsc/charCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/

/**
Expand Down
2 changes: 0 additions & 2 deletions src/test/mocks/vsc/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

'use strict';

/* tslint:disable */

import * as pathImport from 'path';
import { CharCode } from './charCode';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -97,7 +94,6 @@ suite('Python envs locator - WindowsPathEnvVarLocator', async () => {
try {
run();
} catch (err) {
// tslint:disable-next-line:no-console
console.log(err);
}
});
Expand Down
1 change: 0 additions & 1 deletion src/test/telemetry/index.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 0 additions & 1 deletion src/test/utils/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down