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

@ -207,7 +207,7 @@ export abstract class BaseCommand extends BaseAction {
.sort(
(a, b) =>
a.start.line > b.start.line ||
(a.start.line === b.start.line && a.start.character > b.start.character)
(a.start.line === b.start.line && a.start.character > b.start.character)
? 1
: -1
);
@ -961,9 +961,10 @@ 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
? vimState.cursorPosition.getWordLeft(true)
: vimState.cursorPosition;
const searchStartCursorPosition =
direction === SearchDirection.Backward
? vimState.cursorPosition.getWordLeft(true)
: vimState.cursorPosition;
return createSearchStateAndMoveToMatch({
needle: currentWord,
@ -985,9 +986,10 @@ 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
? vimState.lastVisualSelectionStart.getLeft()
: vimState.lastVisualSelectionEnd.getRight();
const searchStartCursorPosition =
direction === SearchDirection.Backward
? vimState.lastVisualSelectionStart.getLeft()
: vimState.lastVisualSelectionEnd.getRight();
return createSearchStateAndMoveToMatch({
needle: currentSelection,
@ -2667,7 +2669,7 @@ class ActionJoin extends BaseCommand {
.sort(
(a, b) =>
a.start.line > b.start.line ||
(a.start.line === b.start.line && a.start.character > b.start.character)
(a.start.line === b.start.line && a.start.character > b.start.character)
? 1
: -1
);

View File

@ -110,9 +110,10 @@ 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
? await this.execActionForOperator(position, vimState)
: await this.execAction(position, vimState);
const temporaryResult =
recordedState.operator && lastIteration
? await this.execActionForOperator(position, vimState)
: await this.execAction(position, vimState);
if (temporaryResult instanceof Position) {
result = temporaryResult;

View File

@ -398,9 +398,10 @@ export class EasyMotion {
this.decorations[keystroke.length] = [];
}
const fontColor = keystroke.length > 1
? Configuration.easymotionMarkerForegroundColorTwoChar
: Configuration.easymotionMarkerForegroundColorOneChar;
const fontColor =
keystroke.length > 1
? Configuration.easymotionMarkerForegroundColorTwoChar
: Configuration.easymotionMarkerForegroundColorOneChar;
const backgroundColor = Configuration.easymotionMarkerBackgroundColor;
// Position should be offsetted by the length of the keystroke to prevent hiding behind the gutter

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

@ -171,7 +171,7 @@ export class SearchState {
this._matchRanges.sort(
(x, y) =>
x.start.line < y.start.line ||
(x.start.line === y.start.line && x.start.character < y.start.character)
(x.start.line === y.start.line && x.start.character < y.start.character)
? -1
: 1
);

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