From eae183596104d820ca2f87a1934d7a03097dd32c Mon Sep 17 00:00:00 2001 From: Horace He Date: Thu, 29 Jun 2017 09:01:49 -0700 Subject: [PATCH] Modified newest changes --- gulpfile.js | 7 +++++++ src/actions/commands/actions.ts | 2 +- src/cmd_line/commands/only.ts | 12 ++++++------ src/cmd_line/subparsers/only.ts | 6 +++--- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index aac99b853..7992d708e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -54,6 +54,13 @@ gulp.task( ]) ); +gulp.task( + 'forceprettier', + shell.task([ + ' find . | grep ".*\\.[t|j]s$" | xargs ./node_modules/prettier/bin/prettier.js --write --print-width 100 --single-quote --trailing-comma es5 ', + ]) +); + gulp.task('default', ['prettier', 'tslint', 'compile']); gulp.task('compile', shell.task(['npm run vscode:prepublish'])); diff --git a/src/actions/commands/actions.ts b/src/actions/commands/actions.ts index 7f29130e6..7453ed7e9 100644 --- a/src/actions/commands/actions.ts +++ b/src/actions/commands/actions.ts @@ -2328,7 +2328,7 @@ class CommandQuit extends BaseCommand { @RegisterAction class CommandOnly extends BaseCommand { modes = [ModeName.Normal]; - keys = [["", "o"], ["", "C-o"]]; + keys = [['', 'o'], ['', 'C-o']]; public async exec(position: Position, vimState: VimState): Promise { new OnlyCommand({}).execute(); diff --git a/src/cmd_line/commands/only.ts b/src/cmd_line/commands/only.ts index 0eaf418f6..5b4a21ea0 100644 --- a/src/cmd_line/commands/only.ts +++ b/src/cmd_line/commands/only.ts @@ -1,7 +1,7 @@ -"use strict"; +'use strict'; -import * as vscode from "vscode"; -import * as node from "../node"; +import * as vscode from 'vscode'; +import * as node from '../node'; export class OnlyCommand extends node.CommandBase { protected _arguments: {}; @@ -18,7 +18,7 @@ export class OnlyCommand extends node.CommandBase { } async execute(): Promise { - await vscode.commands.executeCommand("workbench.action.closeEditorsInOtherGroups"); - return; + await vscode.commands.executeCommand('workbench.action.closeEditorsInOtherGroups'); + return; } -} \ No newline at end of file +} diff --git a/src/cmd_line/subparsers/only.ts b/src/cmd_line/subparsers/only.ts index ddbe9e866..754373420 100644 --- a/src/cmd_line/subparsers/only.ts +++ b/src/cmd_line/subparsers/only.ts @@ -1,7 +1,7 @@ -"use strict"; +'use strict'; -import * as node from "../commands/only"; +import * as node from '../commands/only'; export function parseOnlyCommandArgs(args: string): node.OnlyCommand { return new node.OnlyCommand({}); -} \ No newline at end of file +}