From b21bb44c8dcd43e9e42ef7e3d752dd550e6505ad Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Thu, 12 Dec 2019 00:41:16 +0900 Subject: Enable noUnusedParameters option for vscode extension --- editors/code/src/commands/analyzer_status.ts | 2 +- editors/code/src/commands/expand_macro.ts | 2 +- editors/code/src/commands/runnables.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'editors/code/src/commands') diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts index 9e4ce0eb3..2777ced24 100644 --- a/editors/code/src/commands/analyzer_status.ts +++ b/editors/code/src/commands/analyzer_status.ts @@ -9,7 +9,7 @@ export class TextDocumentContentProvider public syntaxTree: string = 'Not available'; public provideTextDocumentContent( - uri: vscode.Uri, + _uri: vscode.Uri, ): vscode.ProviderResult { const editor = vscode.window.activeTextEditor; if (editor == null) { diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts index 842898020..17c78280a 100644 --- a/editors/code/src/commands/expand_macro.ts +++ b/editors/code/src/commands/expand_macro.ts @@ -11,7 +11,7 @@ export class ExpandMacroContentProvider public eventEmitter = new vscode.EventEmitter(); public provideTextDocumentContent( - uri: vscode.Uri, + _uri: vscode.Uri, ): vscode.ProviderResult { async function handle() { const editor = vscode.window.activeTextEditor; diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index 9b1c6643d..c81d7ce0f 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts @@ -178,7 +178,7 @@ export async function startCargoWatch( } const label = 'install-cargo-watch'; - const taskFinished = new Promise((resolve, reject) => { + const taskFinished = new Promise((resolve, _reject) => { const disposable = vscode.tasks.onDidEndTask(({ execution }) => { if (execution.task.name === label) { disposable.dispose(); -- cgit v1.2.3 From 0e9cabab3fb4c15fb1b88e62a35ccf1ea52ef853 Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Thu, 12 Dec 2019 00:49:54 +0900 Subject: Enable noImplicitReturns option for vscode extension --- editors/code/src/commands/runnables.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'editors/code/src/commands') diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index c81d7ce0f..cf980e257 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts @@ -73,7 +73,7 @@ function createTask(spec: Runnable): vscode.Task { } let prevRunnable: RunnableQuickPick | undefined; -export async function handle() { +export async function handle(): Promise { const editor = vscode.window.activeTextEditor; if (editor == null || editor.document.languageId !== 'rust') { return; @@ -105,12 +105,14 @@ export async function handle() { items.push(new RunnableQuickPick(r)); } const item = await vscode.window.showQuickPick(items); - if (item) { - item.detail = 'rerun'; - prevRunnable = item; - const task = createTask(item.runnable); - return await vscode.tasks.executeTask(task); + if (!item) { + return; } + + item.detail = 'rerun'; + prevRunnable = item; + const task = createTask(item.runnable); + return await vscode.tasks.executeTask(task); } export async function handleSingle(runnable: Runnable) { -- cgit v1.2.3