Skip to content

Commit b93fea0

Browse files
committed
Convert TSLint to ESLint comments
Ignoring bitwise and console as they're not warnings.
1 parent 98e4470 commit b93fea0

12 files changed

+5
-13
lines changed

src/controls/checkboxQuickPick.ts

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ async function showInner(
6666
if (index >= 0) {
6767
toggleSelection(items[index]);
6868
} else {
69-
// tslint:disable-next-line:no-console
7069
console.log(`Couldn't find CheckboxQuickPickItem for label '${selection.label}'`);
7170
}
7271

src/features/CustomViews.ts

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class PowerShellContentProvider implements vscode.TextDocumentContentProvider {
7575
private viewIndex: { [id: string]: CustomView } = {};
7676
private didChangeEvent: vscode.EventEmitter<vscode.Uri> = new vscode.EventEmitter<vscode.Uri>();
7777

78-
// tslint:disable-next-line:member-ordering
7978
public onDidChange: vscode.Event<vscode.Uri> = this.didChangeEvent.event;
8079

8180
public provideTextDocumentContent(uri: vscode.Uri): string {

src/features/ExtensionCommands.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const GetEditorContextRequestType =
7979
new RequestType<IGetEditorContextRequestArguments, IEditorContext, void>(
8080
"editor/getEditorContext");
8181

82-
// tslint:disable-next-line:no-empty-interface
82+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
8383
export interface IGetEditorContextRequestArguments {
8484
}
8585

src/logging.ts

-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ export class Logger implements ILogger {
186186
this.logFilePath,
187187
Buffer.concat([log, Buffer.from(timestampedMessage)]));
188188
} catch (e) {
189-
// tslint:disable-next-line:no-console
190189
console.log(`Error writing to vscode-powershell log file: ${e}`);
191190
}
192191
}

src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { PowerShellLanguageId } from "./utils";
3232
import { LanguageClientConsumer } from "./languageClientConsumer";
3333

3434
// The most reliable way to get the name and version of the current extension.
35-
// tslint:disable-next-line: no-var-requires
35+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-var-requires
3636
const PackageJSON: any = require("../package.json");
3737

3838
// the application insights key (also known as instrumentation key) used for telemetry.

src/platform.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as process from "process";
77
import { IPowerShellAdditionalExePathSettings } from "./settings";
88

99
// This uses require so we can rewire it in unit tests!
10-
// tslint:disable-next-line:no-var-requires
10+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-var-requires
1111
const utils = require("./utils");
1212

1313
const WindowsPowerShell64BitLabel = "Windows PowerShell (x64)";
@@ -298,7 +298,6 @@ export class PowerShellExeFinder {
298298

299299
// We should find only one such application, so return on the first one
300300
for (const name of await utils.readDirectory(msixAppDir)) {
301-
// tslint:disable-next-line:no-bitwise
302301
if (pwshMsixDirRegex.test(name)) {
303302
return new PossiblePowerShellExe(path.join(msixAppDir, name, "pwsh.exe"), pwshMsixName);
304303
}

src/session.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ class SessionMenuItem implements vscode.QuickPickItem {
912912

913913
constructor(
914914
public readonly label: string,
915-
// tslint:disable-next-line:no-empty
915+
// eslint-disable-next-line @typescript-eslint/no-empty-function
916916
public readonly callback: () => void = () => { }) {
917917
}
918918
}

src/settings.ts

-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ export function load(): ISettings {
265265
notebooks:
266266
configuration.get<INotebooksSettings>("notebooks", defaultNotebooksSettings),
267267
startAsLoginShell:
268-
// tslint:disable-next-line
269268
// We follow the same convention as VS Code - https://github.com/microsoft/vscode/blob/ff00badd955d6cfcb8eab5f25f3edc86b762f49f/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts#L105-L107
270269
// "Unlike on Linux, ~/.profile is not sourced when logging into a macOS session. This
271270
// is the reason terminals on macOS typically run login shells by default which set up

src/utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ async function checkIfFileOrDirectoryExists(targetPath: string | vscode.Uri, typ
2525
targetPath instanceof vscode.Uri
2626
? targetPath
2727
: vscode.Uri.file(targetPath));
28-
// tslint:disable-next-line:no-bitwise
2928
return (stat.type & type) !== 0;
3029
} catch {
3130
// TODO: Maybe throw if it's not a FileNotFound exception.

test/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export function run(): Promise<void> {
4545
}
4646
});
4747
} catch (err) {
48-
// tslint:disable-next-line:no-console
4948
console.error(err);
5049
e(err);
5150
}

test/runTests.ts

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ async function main() {
2828
version: "insiders"
2929
});
3030
} catch (err) {
31-
// tslint:disable-next-line:no-console
3231
console.error(`Failed to run tests: ${err}`);
3332
process.exit(1);
3433
}

test/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { IPowerShellExtensionClient } from "../src/features/ExternalApi";
88
// This lets us test the rest of our path assumptions against the baseline of
99
// this test file existing at `<root>/out/test/utils.js`.
1010
export const rootPath = path.resolve(__dirname, "../../");
11-
// tslint:disable-next-line: no-var-requires
11+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-var-requires
1212
const packageJSON: any = require(path.resolve(rootPath, "package.json"));
1313
export const extensionId = `${packageJSON.publisher}.${packageJSON.name}`;
1414

0 commit comments

Comments
 (0)