Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ESLint packages to v6 #4667

Merged
merged 2 commits into from
Jul 17, 2023
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
9 changes: 3 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,16 @@
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict"
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:@typescript-eslint/strict-type-checked"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"tsconfigRootDir": ".",
"project": [
"./tsconfig.json"
]
"project": true
},
"plugins": [
"@typescript-eslint",
Expand Down
933 changes: 416 additions & 517 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@
"@types/ungap__structured-clone": "0.3.0",
"@types/uuid": "9.0.2",
"@types/vscode": "1.67.0",
"@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "5.61.0",
"@typescript-eslint/eslint-plugin": "6.1.0",
"@typescript-eslint/parser": "6.1.0",
"@ungap/structured-clone": "1.2.0",
"@vscode/test-electron": "2.3.3",
"@vscode/vsce": "2.19.0",
"esbuild": "0.18.11",
"eslint": "8.44.0",
"esbuild": "0.18.13",
"eslint": "8.45.0",
"eslint-plugin-header": "3.1.1",
"glob": "10.3.3",
"mocha": "10.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export class PickPSHostProcessFeature extends LanguageClientConsumer {
(resolve, reject) => {
this.getLanguageClientResolve = resolve;

window
void window
.showQuickPick(
["Cancel"],
{ placeHolder: "Attach to PowerShell host process: Please wait, starting PowerShell..." },
Expand Down Expand Up @@ -692,7 +692,7 @@ export class PickRunspaceFeature extends LanguageClientConsumer {
(resolve, reject) => {
this.getLanguageClientResolve = resolve;

window
void window
.showQuickPick(
["Cancel"],
{ placeHolder: "Attach to PowerShell host process: Please wait, starting PowerShell..." },
Expand Down
2 changes: 1 addition & 1 deletion src/features/ExtensionCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class ExtensionCommandsFeature extends LanguageClientConsumer {
this.handlers = [
this.languageClient.onNotification(
ExtensionCommandAddedNotificationType,
(command) => this.addExtensionCommand(command)),
(command) => { this.addExtensionCommand(command); }),

this.languageClient.onRequest(
GetEditorContextRequestType,
Expand Down
4 changes: 2 additions & 2 deletions src/features/GetCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export class GetCommandsFeature extends LanguageClientConsumer {
super();
this.commands = [
vscode.commands.registerCommand("PowerShell.RefreshCommandsExplorer",
async () => await this.CommandExplorerRefresh()),
vscode.commands.registerCommand("PowerShell.InsertCommand", async (item) => await this.InsertCommand(item))
async () => { await this.CommandExplorerRefresh(); }),
vscode.commands.registerCommand("PowerShell.InsertCommand", async (item) => { await this.InsertCommand(item); })
];
this.commandsExplorerProvider = new CommandsExplorerProvider();

Expand Down
2 changes: 1 addition & 1 deletion src/features/RemoteFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class RemoteFilesFeature extends LanguageClientConsumer {

await vscode.window.showTextDocument(doc);
await vscode.commands.executeCommand("workbench.action.closeActiveEditor");
return await innerCloseFiles();
await innerCloseFiles();
}

void innerCloseFiles();
Expand Down
3 changes: 2 additions & 1 deletion src/features/UpdatePowerShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ export class UpdatePowerShell {
try {
const tag = await this.maybeGetNewRelease();
if (tag) {
return await this.promptToUpdate(tag);
await this.promptToUpdate(tag);
return;
}
} catch (err) {
// Best effort. This probably failed to fetch the data from GitHub.
Expand Down
2 changes: 1 addition & 1 deletion src/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class PowerShellProcess {
// all terminals and the event itself checks if it's our terminal). This
// subscription should happen before we create the terminal so if it
// fails immediately, the event fires.
this.consoleCloseSubscription = vscode.window.onDidCloseTerminal((terminal) => this.onTerminalClose(terminal));
this.consoleCloseSubscription = vscode.window.onDidCloseTerminal((terminal) => { this.onTerminalClose(terminal); });
this.consoleTerminal = vscode.window.createTerminal(terminalOptions);
this.pid = await this.getPid();
this.logger.write(`PowerShell process started with PID: ${this.pid}`);
Expand Down
3 changes: 2 additions & 1 deletion src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ export class SessionManager implements Middleware {
case SessionStatus.Starting:
// A simple lock because this function isn't re-entrant.
this.logger.writeWarning("Re-entered 'start' so waiting...");
return await this.waitWhileStarting();
await this.waitWhileStarting();
return;
case SessionStatus.Running:
// We're started, just return.
this.logger.writeVerbose("Already started.");
Expand Down
8 changes: 4 additions & 4 deletions test/features/DebugSession.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ describe("DebugSessionFeature E2E", () => {

const debugStarted = await debug.startDebugging(undefined, launchScriptConfig);
assert.ok(debugStarted);
const debugStopped = await debug.stopDebugging(undefined);
assert.ok(debugStopped);

await debug.stopDebugging(undefined);

assert.ok(startDebugging.calledTwice);
assert.ok(startDebugging.calledWith(undefined, launchScriptConfig));
Expand Down Expand Up @@ -531,11 +531,11 @@ describe("DebugSessionFeature E2E", () => {
const dotnetDebugSession = await dotnetDebugSessionActive;
console.log(debug.activeDebugSession);
console.log(debug.breakpoints);
const debugStopped = await debug.stopDebugging(undefined);

await debug.stopDebugging(undefined);

assert.ok(debugStarted);
assert.ok(dotnetDebugSession);
assert.ok(debugStopped);
});
});
});
3 changes: 2 additions & 1 deletion test/runTestsInner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ function runTestsInner(testsRoot: string): Promise<void> {
throw new Error(`${failures} tests failed.`);
} else {
console.log("\n\n=====\nTest Runner STOP\n=====");
return c();
c();
return;
}
});
} catch (err) {
Expand Down