diff --git a/extensions/notebook/src/book/bookModel.ts b/extensions/notebook/src/book/bookModel.ts index cc252bc97d..4da0733793 100644 --- a/extensions/notebook/src/book/bookModel.ts +++ b/extensions/notebook/src/book/bookModel.ts @@ -126,7 +126,7 @@ export class BookModel { } if (await fs.pathExists(this._tableOfContentsPath)) { - vscode.commands.executeCommand('setContext', 'bookOpened', true); + void vscode.commands.executeCommand('setContext', 'bookOpened', true); this.watchTOC(); } else { this._errorMessage = loc.missingTocError; @@ -322,7 +322,7 @@ export class BookModel { treeItems.push(markdown); } else { this._errorMessage = loc.missingFileError(sections[i].title, book.title); - vscode.window.showErrorMessage(this._errorMessage); + void vscode.window.showErrorMessage(this._errorMessage); } } } diff --git a/extensions/notebook/src/book/bookPinManager.ts b/extensions/notebook/src/book/bookPinManager.ts index 3a262ad96f..8bff4b64b9 100644 --- a/extensions/notebook/src/book/bookPinManager.ts +++ b/extensions/notebook/src/book/bookPinManager.ts @@ -26,9 +26,9 @@ export class BookPinManager implements IBookPinManager { setPinnedSectionContext(): void { if (getPinnedNotebooks().length > 0) { - vscode.commands.executeCommand(constants.BuiltInCommands.SetContext, constants.showPinnedBooksContextKey, true); + void vscode.commands.executeCommand(constants.BuiltInCommands.SetContext, constants.showPinnedBooksContextKey, true); } else { - vscode.commands.executeCommand(constants.BuiltInCommands.SetContext, constants.showPinnedBooksContextKey, false); + void vscode.commands.executeCommand(constants.BuiltInCommands.SetContext, constants.showPinnedBooksContextKey, false); } } diff --git a/extensions/notebook/src/book/bookTocManager.ts b/extensions/notebook/src/book/bookTocManager.ts index 547088dab0..06d575ba09 100644 --- a/extensions/notebook/src/book/bookTocManager.ts +++ b/extensions/notebook/src/book/bookTocManager.ts @@ -112,7 +112,7 @@ export class BookTocManager implements IBookTocManager { } } catch (error) { - vscode.window.showWarningMessage(loc.msgCreateBookWarningMsg(content)); + void vscode.window.showWarningMessage(loc.msgCreateBookWarningMsg(content)); } } return toc; @@ -132,7 +132,7 @@ export class BookTocManager implements IBookTocManager { } this.movedFiles.set(src, path.join(newFileName.concat(' - ', counter.toString())).concat(path.parse(dest).ext)); await fs.move(src, path.join(newFileName.concat(' - ', counter.toString())).concat(path.parse(dest).ext), { overwrite: true }); - vscode.window.showInformationMessage(loc.duplicateFileError(path.parse(dest).base, src, newFileName.concat(' - ', counter.toString()))); + void vscode.window.showInformationMessage(loc.duplicateFileError(path.parse(dest).base, src, newFileName.concat(' - ', counter.toString()))); return newFileName.concat(' - ', counter.toString()); } @@ -424,7 +424,7 @@ export class BookTocManager implements IBookTocManager { } } catch (e) { await this.recovery(); - vscode.window.showErrorMessage(loc.editBookError(element.book.contentPath, e instanceof Error ? e.message : e)); + void vscode.window.showErrorMessage(loc.editBookError(element.book.contentPath, e instanceof Error ? e.message : e)); } finally { try { await this._targetBook.reinitializeContents(); diff --git a/extensions/notebook/src/book/bookTreeView.ts b/extensions/notebook/src/book/bookTreeView.ts index 3128ed8753..d851c59324 100644 --- a/extensions/notebook/src/book/bookTreeView.ts +++ b/extensions/notebook/src/book/bookTreeView.ts @@ -106,7 +106,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider { if (e.document.uri.scheme === 'untitled') { - providedBookTreeViewProvider.revealDocumentInTreeView(e.document.uri, false, false); + void providedBookTreeViewProvider.revealDocumentInTreeView(e.document.uri, false, false); } else { - bookTreeViewProvider.revealDocumentInTreeView(e.document.uri, false, false); + void bookTreeViewProvider.revealDocumentInTreeView(e.document.uri, false, false); } }); diff --git a/extensions/notebook/src/jupyter/jupyterController.ts b/extensions/notebook/src/jupyter/jupyterController.ts index ca17b2216b..8ec069fd39 100644 --- a/extensions/notebook/src/jupyter/jupyterController.ts +++ b/extensions/notebook/src/jupyter/jupyterController.ts @@ -123,7 +123,7 @@ export class JupyterController { // Verify this is a .ipynb file since this isn't actually filtered on Mac/Linux if (path.extname(fileUri.fsPath) !== '.ipynb') { // in the future might want additional supported types - vscode.window.showErrorMessage(localize('unsupportedFileType', "Only .ipynb Notebooks are supported")); + void vscode.window.showErrorMessage(localize('unsupportedFileType', "Only .ipynb Notebooks are supported")); } else { await azdata.nb.showNotebookDocument(fileUri, { connectionProfile: profile, @@ -174,7 +174,7 @@ export class JupyterController { await this._jupyterInstallation.startInstallProcess(true); } } catch (err) { - vscode.window.showErrorMessage(utils.getErrorMessage(err)); + void vscode.window.showErrorMessage(utils.getErrorMessage(err)); } } @@ -202,7 +202,7 @@ export class JupyterController { packagesDialog.showDialog(); } catch (error) { let message = utils.getErrorMessage(error); - vscode.window.showErrorMessage(message); + void vscode.window.showErrorMessage(message); } } @@ -236,10 +236,10 @@ export class JupyterController { public doConfigurePython(jupyterInstaller: JupyterServerInstallation): void { let pythonWizard = new ConfigurePythonWizard(jupyterInstaller); pythonWizard.start().catch((err: any) => { - vscode.window.showErrorMessage(utils.getErrorMessage(err)); + void vscode.window.showErrorMessage(utils.getErrorMessage(err)); }); pythonWizard.setupComplete.catch((err: any) => { - vscode.window.showErrorMessage(utils.getErrorMessage(err)); + void vscode.window.showErrorMessage(utils.getErrorMessage(err)); }); } diff --git a/extensions/notebook/src/jupyter/jupyterNotebookManager.ts b/extensions/notebook/src/jupyter/jupyterNotebookManager.ts index 3e79ef1703..1043b853eb 100644 --- a/extensions/notebook/src/jupyter/jupyterNotebookManager.ts +++ b/extensions/notebook/src/jupyter/jupyterNotebookManager.ts @@ -44,7 +44,7 @@ export class JupyterNotebookManager implements nb.NotebookManager, vscode.Dispos dispose() { if (this._sessionManager) { - this._sessionManager.shutdownAll().then(() => this._sessionManager.dispose()); + void this._sessionManager.shutdownAll().then(() => this._sessionManager.dispose()); } if (this._serverManager) { this._serverManager.stopServer().then(success => undefined, error => vscode.window.showErrorMessage(error)); diff --git a/extensions/notebook/src/jupyter/jupyterServerInstallation.ts b/extensions/notebook/src/jupyter/jupyterServerInstallation.ts index d7a8dfd9c2..04a7c945f8 100644 --- a/extensions/notebook/src/jupyter/jupyterServerInstallation.ts +++ b/extensions/notebook/src/jupyter/jupyterServerInstallation.ts @@ -139,7 +139,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation { this.outputChannel = outputChannel; this._runningOnSAW = vscode.env.appName.toLowerCase().indexOf('saw') > 0; - vscode.commands.executeCommand(constants.BuiltInCommands.SetContext, 'notebook:runningOnSAW', this._runningOnSAW); + void vscode.commands.executeCommand(constants.BuiltInCommands.SetContext, 'notebook:runningOnSAW', this._runningOnSAW); if (this._runningOnSAW) { this._pythonInstallationPath = `${vscode.env.appRoot}\\ads-python`; @@ -170,7 +170,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation { } private async installDependencies(backgroundOperation: azdata.BackgroundOperation, forceInstall: boolean, packages: PythonPkgDetails[]): Promise { - vscode.window.showInformationMessage(msgInstallPkgStart); + void vscode.window.showInformationMessage(msgInstallPkgStart); this.outputChannel.show(true); this.outputChannel.appendLine(msgInstallPkgProgress); @@ -224,7 +224,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation { this.outputChannel.appendLine(msgInstallPkgFinish); backgroundOperation.updateStatus(azdata.TaskStatus.Succeeded, msgInstallPkgFinish); - vscode.window.showInformationMessage(msgInstallPkgFinish); + void vscode.window.showInformationMessage(msgInstallPkgFinish); } private installPythonPackage(backgroundOperation: azdata.BackgroundOperation, usingExistingPython: boolean, pythonInstallationPath: string, outputChannel: vscode.OutputChannel): Promise { @@ -438,7 +438,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation { } if (this._installInProgress) { - vscode.window.showInformationMessage(msgWaitingForInstall); + void vscode.window.showInformationMessage(msgWaitingForInstall); return this._installCompletion.promise; } @@ -500,7 +500,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation { return Promise.resolve(); } if (this._installInProgress) { - vscode.window.showInformationMessage(msgWaitingForInstall); + void vscode.window.showInformationMessage(msgWaitingForInstall); return this._installCompletion.promise; } @@ -532,7 +532,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation { if (response === yes) { this._oldPythonInstallationPath = path.join(this._pythonInstallationPath, '0.0.1'); this._oldPythonExecutable = this._pythonExecutable; - vscode.commands.executeCommand(constants.jupyterConfigurePython); + void vscode.commands.executeCommand(constants.jupyterConfigurePython); } else if (response === dontAskAgain) { await notebookConfig.update(constants.dontPromptPythonUpdate, true, vscode.ConfigurationTarget.Global); } diff --git a/extensions/notebook/src/jupyter/jupyterServerManager.ts b/extensions/notebook/src/jupyter/jupyterServerManager.ts index 71f1ce6ecb..2fed27947b 100644 --- a/extensions/notebook/src/jupyter/jupyterServerManager.ts +++ b/extensions/notebook/src/jupyter/jupyterServerManager.ts @@ -70,7 +70,7 @@ export class LocalJupyterServerManager implements nb.ServerManager, vscode.Dispo public dispose(): void { this.stopServer().catch(err => { let msg = utils.getErrorMessage(err); - vscode.window.showErrorMessage(localize('shutdownError', "Shutdown of Notebook server failed: {0}", msg)); + void vscode.window.showErrorMessage(localize('shutdownError', "Shutdown of Notebook server failed: {0}", msg)); }); } @@ -105,7 +105,7 @@ export class LocalJupyterServerManager implements nb.ServerManager, vscode.Dispo private async doStartServer(kernelSpec: nb.IKernelSpec): Promise { // We can't find or create servers until the installation is complete let installation = this.options.jupyterInstallation; await installation.promptForPythonInstall(kernelSpec.display_name); - vscode.commands.executeCommand(BuiltInCommands.SetContext, CommandContext.NotebookPythonInstalled, true); + void vscode.commands.executeCommand(BuiltInCommands.SetContext, CommandContext.NotebookPythonInstalled, true); // Calculate the path to use as the notebook-dir for Jupyter based on the path of the uri of the // notebook to open. This will be the workspace folder if the notebook uri is inside a workspace diff --git a/extensions/notebook/src/prompts/adapter.ts b/extensions/notebook/src/prompts/adapter.ts index 4e14a5b38d..58e9180ed4 100644 --- a/extensions/notebook/src/prompts/adapter.ts +++ b/extensions/notebook/src/prompts/adapter.ts @@ -54,7 +54,7 @@ export default class CodeAdapter implements IPrompter { return undefined; } - vscode.window.showErrorMessage(err.message); + void vscode.window.showErrorMessage(err.message); }); } } diff --git a/extensions/notebook/src/protocol/notebookUriHandler.ts b/extensions/notebook/src/protocol/notebookUriHandler.ts index 035981e2e8..f75d0e896f 100644 --- a/extensions/notebook/src/protocol/notebookUriHandler.ts +++ b/extensions/notebook/src/protocol/notebookUriHandler.ts @@ -30,7 +30,7 @@ export class NotebookUriHandler implements vscode.UriHandler { case '/open': return this.open(uri); default: - vscode.window.showErrorMessage(localize('notebook.unsupportedAction', "Action {0} is not supported for this handler", uri.path)); + void vscode.window.showErrorMessage(localize('notebook.unsupportedAction', "Action {0} is not supported for this handler", uri.path)); } } /** @@ -84,7 +84,7 @@ export class NotebookUriHandler implements vscode.UriHandler { case 'https': break; default: - vscode.window.showErrorMessage(localize('unsupportedScheme', "Cannot open link {0} as only HTTP, HTTPS, and File links are supported", url)); + void vscode.window.showErrorMessage(localize('unsupportedScheme', "Cannot open link {0} as only HTTP, HTTPS, and File links are supported", url)); return; } let contents: string; @@ -116,7 +116,7 @@ export class NotebookUriHandler implements vscode.UriHandler { }); } } catch (err) { - vscode.window.showErrorMessage(getErrorMessage(err)); + void vscode.window.showErrorMessage(getErrorMessage(err)); } } diff --git a/extensions/notebook/src/test/common.ts b/extensions/notebook/src/test/common.ts index f70a86a1a0..b89518735e 100644 --- a/extensions/notebook/src/test/common.ts +++ b/extensions/notebook/src/test/common.ts @@ -441,7 +441,7 @@ class TestComponentBuilder implements return this._component; } withProperties(properties: U): azdata.ComponentBuilder { - this._component.updateProperties(properties); + void this._component.updateProperties(properties); return this; } withValidation(validation: (component: T) => boolean): azdata.ComponentBuilder { @@ -449,7 +449,7 @@ class TestComponentBuilder implements } withProps(properties: TPropertyBag): azdata.ComponentBuilder { - this._component.updateProperties(properties); + void this._component.updateProperties(properties); return this; } }