From 95a1d93eddfc6228a0bd9f06728b98bd6945ff1c Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 8 Dec 2015 00:39:18 +0100 Subject: [PATCH] [eslint] Enforcing wrap-multilines --- .eslintrc | 2 +- src/dialog.jsx | 8 +++++--- src/floating-action-button.jsx | 6 ++++-- src/menus/icon-menu.jsx | 5 +++-- src/radio-button-group.jsx | 24 +++++++++++++----------- src/table/table-body.jsx | 6 ++++-- src/table/table-header.jsx | 6 ++++-- src/time-picker/clock-hours.jsx | 13 ++++++++++--- 8 files changed, 44 insertions(+), 26 deletions(-) diff --git a/.eslintrc b/.eslintrc index dbded2c0b81f35..783985f791a3b9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -83,7 +83,7 @@ rules: react/require-extension: 2 react/self-closing-comp: 2 react/sort-comp: 0 # Wishlist, one day - react/wrap-multilines: 0 # Wishlist, one day + react/wrap-multilines: 2 # Disabled react/jsx-no-bind: 0 diff --git a/src/dialog.jsx b/src/dialog.jsx index 02a1bb9e176a01..e3355b3a1076b2 100644 --- a/src/dialog.jsx +++ b/src/dialog.jsx @@ -81,15 +81,17 @@ const TransitionItem = React.createClass({ }, render() { - let { + const { style, children, ...other, } = this.props; - return
+ return ( +
{children} -
; +
+ ); }, }); diff --git a/src/floating-action-button.jsx b/src/floating-action-button.jsx index fa57c435ffce08..0d0f1bf1cf2ed0 100644 --- a/src/floating-action-button.jsx +++ b/src/floating-action-button.jsx @@ -166,13 +166,15 @@ const FloatingActionButton = React.createClass({ let iconElement; if (iconClassName) { - iconElement = + iconElement = ( ; + iconStyle)} + /> + ); } let children = Children.extend(this.props.children, { diff --git a/src/menus/icon-menu.jsx b/src/menus/icon-menu.jsx index 8b388ff3ebeb50..184bd2a32ac0e9 100644 --- a/src/menus/icon-menu.jsx +++ b/src/menus/icon-menu.jsx @@ -161,7 +161,7 @@ const IconMenu = React.createClass({ ref: this.state.iconButtonRef, }); - let menu = + let menu = ( {this.props.children} - ; + + ); return (
; - + return ( + + ); }, this); return ( diff --git a/src/table/table-body.jsx b/src/table/table-body.jsx index 6259ebc3ba775e..dfe5b1661662a0 100644 --- a/src/table/table-body.jsx +++ b/src/table/table-body.jsx @@ -154,13 +154,15 @@ const TableBody = React.createClass({ if (!this.props.displayRowCheckbox) return null; let key = rowProps.rowNumber + '-cb'; - let checkbox = + const checkbox = ( ; + checked={rowProps.selected} + /> + ); return ( ; + onCheck={this._onSelectAll} + /> + ); const key = 'hpcb' + props.rowNumber; return ( diff --git a/src/time-picker/clock-hours.jsx b/src/time-picker/clock-hours.jsx index 664eff06a9dab5..71cc578ad2156f 100644 --- a/src/time-picker/clock-hours.jsx +++ b/src/time-picker/clock-hours.jsx @@ -184,9 +184,16 @@ const ClockHours = React.createClass({ } return hours.map((hour) => { - let isSelected = this._getSelected() === hour; - return ; + const isSelected = this._getSelected() === hour; + return ( + + ); }); },