From 2e7006ce24c42ec2b6642346d153429338e7334e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 22 Dec 2019 10:01:24 +0900 Subject: npm run lint:fix --- src/console/reducers/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/console/reducers') diff --git a/src/console/reducers/index.ts b/src/console/reducers/index.ts index b6be483..048a24f 100644 --- a/src/console/reducers/index.ts +++ b/src/console/reducers/index.ts @@ -28,7 +28,7 @@ const nextSelection = (state: State): number => { return 0; } - let length = state.completions + const length = state.completions .map(g => g.items.length) .reduce((x, y) => x + y); if (state.select + 1 < length) { @@ -38,7 +38,7 @@ const nextSelection = (state: State): number => { }; const prevSelection = (state: State): number => { - let length = state.completions + const length = state.completions .map(g => g.items.length) .reduce((x, y) => x + y); if (state.select < 0) { @@ -51,7 +51,7 @@ const nextConsoleText = (completions: any[], select: number, defaults: any) => { if (select < 0) { return defaults; } - let items = completions.map(g => g.items).reduce((g1, g2) => g1.concat(g2)); + const items = completions.map(g => g.items).reduce((g1, g2) => g1.concat(g2)); return items[select].content; }; @@ -96,14 +96,14 @@ export default function reducer( completionSource: action.completionSource, select: -1 }; case actions.CONSOLE_COMPLETION_NEXT: { - let select = nextSelection(state); + const select = nextSelection(state); return { ...state, select: select, consoleText: nextConsoleText( state.completions, select, state.completionSource) }; } case actions.CONSOLE_COMPLETION_PREV: { - let select = prevSelection(state); + const select = prevSelection(state); return { ...state, select: select, consoleText: nextConsoleText( -- cgit v1.2.3