Ran prettier on remaining files?

This commit is contained in:
Horace He 2017-06-28 01:43:18 -07:00
parent 194875f493
commit 34cf2ffa3f
7 changed files with 28 additions and 20 deletions

View File

@ -29,7 +29,7 @@ install:
script:
- git ls-tree -r master --name-only | grep ".*.[t|j]s$" | xargs ./node_modules/prettier/bin/prettier.js --write --print-width 100 --single-quote --trailing-comma es5
- git diff-index --quiet HEAD -- || { echo "Compile with gulp first before pushing!"; exit 1; }
- git diff-index --quiet HEAD -- || { echo "Compile with gulp first (to format things properly with prettier) before pushing!"; exit 1; }
- gulp
- npm test --silent;

View File

@ -961,7 +961,8 @@ function searchCurrentWord(
// If the search is going left then use `getWordLeft()` on position to start
// at the beginning of the word. This ensures that any matches happen
// outside of the currently selected word.
const searchStartCursorPosition = direction === SearchDirection.Backward
const searchStartCursorPosition =
direction === SearchDirection.Backward
? vimState.cursorPosition.getWordLeft(true)
: vimState.cursorPosition;
@ -985,7 +986,8 @@ function searchCurrentSelection(vimState: VimState, direction: SearchDirection)
// If the search is going left then use `getLeft()` on the selection start.
// If going right then use `getRight()` on the selection end. This ensures
// that any matches happen outside of the currently selected word.
const searchStartCursorPosition = direction === SearchDirection.Backward
const searchStartCursorPosition =
direction === SearchDirection.Backward
? vimState.lastVisualSelectionStart.getLeft()
: vimState.lastVisualSelectionEnd.getRight();

View File

@ -110,7 +110,8 @@ export abstract class BaseMovement extends BaseAction {
for (let i = 0; i < count; i++) {
const firstIteration = i === 0;
const lastIteration = i === count - 1;
const temporaryResult = recordedState.operator && lastIteration
const temporaryResult =
recordedState.operator && lastIteration
? await this.execActionForOperator(position, vimState)
: await this.execAction(position, vimState);

View File

@ -398,7 +398,8 @@ export class EasyMotion {
this.decorations[keystroke.length] = [];
}
const fontColor = keystroke.length > 1
const fontColor =
keystroke.length > 1
? Configuration.easymotionMarkerForegroundColorTwoChar
: Configuration.easymotionMarkerForegroundColorOneChar;
const backgroundColor = Configuration.easymotionMarkerBackgroundColor;

View File

@ -90,9 +90,8 @@ export class PairMatcher {
if (!toFind.nextMatchIsForward) {
for (let lineNumber = position.line; lineNumber >= 0; lineNumber--) {
let lineText = TextEditor.getLineAt(new Position(lineNumber, 0)).text;
let startOffset = lineNumber === position.line
? lineText.length - position.character - 1
: 0;
let startOffset =
lineNumber === position.line ? lineText.length - position.character - 1 : 0;
while (true) {
let queryText = toReversedString(lineText).substr(startOffset);

View File

@ -209,7 +209,12 @@ declare module 'promised-neovim-client' {
reader: NodeJS.ReadableStream
): Promise<Nvim>;
export interface NvimVersion { major: number; minor: number; patch: number; rest: string }
export interface NvimVersion {
major: number;
minor: number;
patch: number;
rest: string;
}
export type RPCValue =
| Buffer
| Window