diff --git a/.eslintrc.json b/.eslintrc.json index 182412c8d4..ac54f25467 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,9 +5,8 @@ }, "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", @@ -15,9 +14,7 @@ "ecmaVersion": "latest", "sourceType": "module", "tsconfigRootDir": ".", - "project": [ - "./tsconfig.json" - ] + "project": true }, "plugins": [ "@typescript-eslint", diff --git a/src/features/ExtensionCommands.ts b/src/features/ExtensionCommands.ts index 40f706e50f..715aa6f9c4 100644 --- a/src/features/ExtensionCommands.ts +++ b/src/features/ExtensionCommands.ts @@ -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, diff --git a/src/features/GetCommands.ts b/src/features/GetCommands.ts index 2e0031c2af..c744b73a89 100644 --- a/src/features/GetCommands.ts +++ b/src/features/GetCommands.ts @@ -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(); diff --git a/src/features/RemoteFiles.ts b/src/features/RemoteFiles.ts index a27728d02a..4c1abdb804 100644 --- a/src/features/RemoteFiles.ts +++ b/src/features/RemoteFiles.ts @@ -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(); diff --git a/src/features/UpdatePowerShell.ts b/src/features/UpdatePowerShell.ts index 7e9627a87e..01c31eb385 100644 --- a/src/features/UpdatePowerShell.ts +++ b/src/features/UpdatePowerShell.ts @@ -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. diff --git a/src/process.ts b/src/process.ts index 6116319c49..0d69d40ba1 100644 --- a/src/process.ts +++ b/src/process.ts @@ -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}`); diff --git a/src/session.ts b/src/session.ts index 513412d7b4..330309a67f 100644 --- a/src/session.ts +++ b/src/session.ts @@ -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."); diff --git a/test/features/DebugSession.test.ts b/test/features/DebugSession.test.ts index 1a6b96ec87..3b9b854680 100644 --- a/test/features/DebugSession.test.ts +++ b/test/features/DebugSession.test.ts @@ -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)); @@ -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); }); }); }); diff --git a/test/runTestsInner.ts b/test/runTestsInner.ts index 8ae49a0ec6..8ece590a71 100644 --- a/test/runTestsInner.ts +++ b/test/runTestsInner.ts @@ -68,7 +68,8 @@ function runTestsInner(testsRoot: string): Promise { throw new Error(`${failures} tests failed.`); } else { console.log("\n\n=====\nTest Runner STOP\n====="); - return c(); + c(); + return; } }); } catch (err) {