Eslint rule for block curlies (#3955)

* Add curly rule

* Fix pre-existing issues with new rule
This commit is contained in:
Jaco Greeff
2016-12-23 16:43:13 +01:00
committed by Gav Wood
parent 466f84f485
commit 714298aa9a
20 changed files with 306 additions and 121 deletions

View File

@@ -73,7 +73,9 @@ export default class InputText extends Component {
}
renderLoading () {
if (!this.state.loading) return;
if (!this.state.loading) {
return;
}
return (
<div className={ styles['input-loading'] }>
@@ -83,7 +85,9 @@ export default class InputText extends Component {
}
renderIsValid () {
if (this.state.loading || !this.state.valid) return;
if (this.state.loading || !this.state.valid) {
return;
}
return (
<div className={ styles['input-icon'] }>
@@ -120,8 +124,13 @@ export default class InputText extends Component {
}
onKeyDown = (event) => {
if (!this.props.onEnter) return;
if (event.keyCode !== 13) return;
if (!this.props.onEnter) {
return;
}
if (event.keyCode !== 13) {
return;
}
this.props.onEnter();
}