From 43d54e6504737d2271a2cc59fdfb184cf7e5f670 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Thu, 13 Apr 2017 12:26:47 -0700 Subject: [PATCH] Upgrade Prettier --- js/components/Marquee.js | 26 ++++++++++---------------- js/components/Position.js | 9 ++++++--- js/components/WindowManager.js | 6 ++++-- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/js/components/Marquee.js b/js/components/Marquee.js index 92bf40d5..1fac6365 100644 --- a/js/components/Marquee.js +++ b/js/components/Marquee.js @@ -41,7 +41,7 @@ const stepOffset = (text, step) => { const negativePixels = pixels => `-${pixels}px`; // If text is wider than the marquee, it needs to loop -const loopText = text => isLong(text) ? text + text : text; +const loopText = text => (isLong(text) ? text + text : text); import CharacterString from "./CharacterString"; @@ -55,15 +55,12 @@ class Marquee extends React.Component { componentDidMount() { const step = () => { - setTimeout( - () => { - if (this.state.stepping) { - this.props.dispatch({ type: STEP_MARQUEE }); - } - step(); - }, - 220 - ); + setTimeout(() => { + if (this.state.stepping) { + this.props.dispatch({ type: STEP_MARQUEE }); + } + step(); + }, 220); }; step(); } @@ -94,12 +91,9 @@ class Marquee extends React.Component { this.setState({ stepping: false }); document.addEventListener("mouseup", () => { // TODO: Remove this listener - setTimeout( - () => { - this.setState({ stepping: true }); - }, - 1000 - ); + setTimeout(() => { + this.setState({ stepping: true }); + }, 1000); }); } diff --git a/js/components/Position.js b/js/components/Position.js index a969bd89..798f2f88 100644 --- a/js/components/Position.js +++ b/js/components/Position.js @@ -8,9 +8,12 @@ import { SET_SCRUB_POSITION } from "../actionTypes"; -const Position = ( - { position, seekToPercentComplete, displayedPosition, setPosition } -) => { +const Position = ({ + position, + seekToPercentComplete, + displayedPosition, + setPosition +}) => { // In shade mode, the position slider shows up differently depending on if // it's near the start, middle or end of its progress let className = ""; diff --git a/js/components/WindowManager.js b/js/components/WindowManager.js index fdd92c5e..cff5d869 100644 --- a/js/components/WindowManager.js +++ b/js/components/WindowManager.js @@ -130,7 +130,8 @@ class WindowManager extends React.Component { {this.validChildren().map((child, i) => { const position = this.state[i]; /* eslint-disable react/jsx-no-bind */ - return position && + return ( + position &&
this.handleMouseDown(i, e)} ref={this.getRef} @@ -138,7 +139,8 @@ class WindowManager extends React.Component { key={i} > {child} -
; + + ); /* eslint-enable react/jsx-no-bind */ })}