Eslint rule for block curlies (#3955)
* Add curly rule * Fix pre-existing issues with new rule
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user