From 273299693b85996878907ad256ed55f072ec3f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 9 Dec 2019 20:57:55 +0200 Subject: Code: enable prettier trailing commas --- editors/code/src/commands/runnables.ts | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'editors/code/src/commands/runnables.ts') diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index ac59bf60d..9b1c6643d 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts @@ -46,17 +46,17 @@ function createTask(spec: Runnable): vscode.Task { label: spec.label, command: spec.bin, args: spec.args, - env: spec.env + env: spec.env, }; const execOption: vscode.ShellExecutionOptions = { cwd: spec.cwd || '.', - env: definition.env + env: definition.env, }; const exec = new vscode.ShellExecution( definition.command, definition.args, - execOption + execOption, ); const f = vscode.workspace.workspaceFolders![0]; @@ -66,7 +66,7 @@ function createTask(spec: Runnable): vscode.Task { definition.label, TASK_SOURCE, exec, - ['$rustc'] + ['$rustc'], ); t.presentationOptions.clear = true; return t; @@ -79,17 +79,17 @@ export async function handle() { return; } const textDocument: lc.TextDocumentIdentifier = { - uri: editor.document.uri.toString() + uri: editor.document.uri.toString(), }; const params: RunnablesParams = { textDocument, position: Server.client.code2ProtocolConverter.asPosition( - editor.selection.active - ) + editor.selection.active, + ), }; const runnables = await Server.client.sendRequest( 'rust-analyzer/runnables', - params + params, ); const items: RunnableQuickPick[] = []; if (prevRunnable) { @@ -124,7 +124,7 @@ export async function handleSingle(runnable: Runnable) { task.presentationOptions = { reveal: vscode.TaskRevealKind.Always, panel: vscode.TaskPanelKind.Dedicated, - clear: true + clear: true, }; return vscode.tasks.executeTask(task); @@ -136,7 +136,7 @@ export async function handleSingle(runnable: Runnable) { * that, when accepted, allow us to `cargo install cargo-watch` and then run it. */ export async function interactivelyStartCargoWatch( - context: vscode.ExtensionContext + context: vscode.ExtensionContext, ): Promise { if (Server.config.cargoWatchOptions.enableOnStartup === 'disabled') { return; @@ -146,7 +146,7 @@ export async function interactivelyStartCargoWatch( const watch = await vscode.window.showInformationMessage( 'Start watching changes with cargo? (Executes `cargo watch`, provides inline diagnostics)', 'yes', - 'no' + 'no', ); if (watch !== 'yes') { return; @@ -157,12 +157,12 @@ export async function interactivelyStartCargoWatch( } export async function startCargoWatch( - context: vscode.ExtensionContext + context: vscode.ExtensionContext, ): Promise { const execPromise = util.promisify(child_process.exec); const { stderr, code = 0 } = await execPromise( - 'cargo watch --version' + 'cargo watch --version', ).catch(e => e); if (stderr.includes('no such subcommand: `watch`')) { @@ -171,7 +171,7 @@ export async function startCargoWatch( const install = await vscode.window.showInformationMessage( msg, 'yes', - 'no' + 'no', ); if (install !== 'yes') { return; @@ -192,20 +192,20 @@ export async function startCargoWatch( label, bin: 'cargo', args: ['install', 'cargo-watch'], - env: {} - }) + env: {}, + }), ); await taskFinished; const output = await execPromise('cargo watch --version').catch(e => e); if (output.stderr !== '') { vscode.window.showErrorMessage( - `Couldn't install \`cargo-\`watch: ${output.stderr}` + `Couldn't install \`cargo-\`watch: ${output.stderr}`, ); return; } } else if (code !== 0) { vscode.window.showErrorMessage( - `\`cargo watch\` failed with ${code}: ${stderr}` + `\`cargo watch\` failed with ${code}: ${stderr}`, ); return; } -- cgit v1.2.3