Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eslint] Enforcing wrap-multilines #2419

Merged
merged 1 commit into from
Dec 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions src/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,17 @@ const TransitionItem = React.createClass({
},

render() {
let {
const {
style,
children,
...other,
} = this.props;

return <div {...other} style={this.prepareStyles(this.state.style, style)}>
return (
<div {...other} style={this.prepareStyles(this.state.style, style)}>
{children}
</div>;
</div>
);
},
});

Expand Down
6 changes: 4 additions & 2 deletions src/floating-action-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,15 @@ const FloatingActionButton = React.createClass({

let iconElement;
if (iconClassName) {
iconElement =
iconElement = (
<FontIcon
className={iconClassName}
style={this.mergeStyles(
styles.icon,
mini && styles.iconWhenMini,
iconStyle)}/>;
iconStyle)}
/>
);
}

let children = Children.extend(this.props.children, {
Expand Down
5 changes: 3 additions & 2 deletions src/menus/icon-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const IconMenu = React.createClass({
ref: this.state.iconButtonRef,
});

let menu =
let menu = (
<Menu
{...other}
animateOpen={true}
Expand All @@ -171,7 +171,8 @@ const IconMenu = React.createClass({
zDepth={0}
style={mergedMenuStyles}>
{this.props.children}
</Menu>;
</Menu>
);

return (
<div
Expand Down
24 changes: 13 additions & 11 deletions src/radio-button-group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,19 @@ const RadioButtonGroup = React.createClass({
...other,
} = option.props;

return <RadioButton
{...other}
ref={option.props.value}
name={this.props.name}
key={option.props.value}
value={option.props.value}
label={option.props.label}
labelPosition={this.props.labelPosition}
onCheck={this._onChange}
checked={option.props.value === this.state.selected}/>;

return (
<RadioButton
{...other}
ref={option.props.value}
name={this.props.name}
key={option.props.value}
value={option.props.value}
label={option.props.label}
labelPosition={this.props.labelPosition}
onCheck={this._onChange}
checked={option.props.value === this.state.selected}
/>
);
}, this);

return (
Expand Down
6 changes: 4 additions & 2 deletions src/table/table-body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,15 @@ const TableBody = React.createClass({
if (!this.props.displayRowCheckbox) return null;

let key = rowProps.rowNumber + '-cb';
let checkbox =
const checkbox = (
<Checkbox
ref="rowSelectCB"
name={key}
value="selected"
disabled={!this.props.selectable}
checked={rowProps.selected} />;
checked={rowProps.selected}
/>
);

return (
<TableRowColumn
Expand Down
6 changes: 4 additions & 2 deletions src/table/table-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,16 @@ const TableHeader = React.createClass({
_getSelectAllCheckboxColumn(props) {
if (!this.props.displaySelectAll) return this._getCheckboxPlaceholder(props);

const checkbox =
const checkbox = (
<Checkbox
key="selectallcb"
name="selectallcb"
value="selected"
disabled={!this.props.enableSelectAll}
checked={this.props.selectAllSelected}
onCheck={this._onSelectAll} />;
onCheck={this._onSelectAll}
/>
);

const key = 'hpcb' + props.rowNumber;
return (
Expand Down
13 changes: 10 additions & 3 deletions src/time-picker/clock-hours.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,16 @@ const ClockHours = React.createClass({
}

return hours.map((hour) => {
let isSelected = this._getSelected() === hour;
return <ClockNumber key={hour} style={style} isSelected={isSelected} type="hour"
value={hour} />;
const isSelected = this._getSelected() === hour;
return (
<ClockNumber
key={hour}
style={style}
isSelected={isSelected}
type="hour"
value={hour}
/>
);
});
},

Expand Down