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/components/Console.tsx | 4 ++-- src/console/components/console/Completion.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/console/components') diff --git a/src/console/components/Console.tsx b/src/console/components/Console.tsx index 1743d15..eafe2a7 100644 --- a/src/console/components/Console.tsx +++ b/src/console/components/Console.tsx @@ -34,7 +34,7 @@ class Console extends React.Component { e.stopPropagation(); e.preventDefault(); - let value = (e.target as HTMLInputElement).value; + const value = (e.target as HTMLInputElement).value; if (this.props.mode === 'command') { return this.props.dispatch(consoleActions.enterCommand(value)); } else if (this.props.mode === 'find') { @@ -101,7 +101,7 @@ class Console extends React.Component { } onChange(e: React.ChangeEvent) { - let text = e.target.value; + const text = e.target.value; this.props.dispatch(consoleActions.setConsoleText(text)); if (this.props.mode === 'command') { this.props.dispatch(consoleActions.getCompletions(text)); diff --git a/src/console/components/console/Completion.tsx b/src/console/components/console/Completion.tsx index 169a39c..e2fa1de 100644 --- a/src/console/components/console/Completion.tsx +++ b/src/console/components/console/Completion.tsx @@ -35,11 +35,11 @@ class Completion extends React.Component { return null; } - let viewSelect = (() => { + const viewSelect = (() => { let index = 0; for (let i = 0; i < nextProps.completions.length; ++i) { ++index; - let g = nextProps.completions[i]; + const g = nextProps.completions[i]; if (nextProps.select + i + 1 < index + g.items.length) { return nextProps.select + i + 1; } @@ -64,12 +64,12 @@ class Completion extends React.Component { let eles = []; let index = 0; - for (let group of this.props.completions) { + for (const group of this.props.completions) { eles.push(); - for (let item of group.items) { + for (const item of group.items) { eles.push( { } } - let viewOffset = this.state.viewOffset; + const viewOffset = this.state.viewOffset; eles = eles.slice(viewOffset, viewOffset + this.props.size); return ( -- cgit v1.2.3