mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-09-29 23:07:31 +05:30
#305: fix linting errors after upgrading to eslint 4
This commit is contained in:
parent
e21f6c397d
commit
02ce9bb3b5
19
.eslintrc
19
.eslintrc
@ -9,25 +9,6 @@
|
||||
"react"
|
||||
],
|
||||
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"modules": true,
|
||||
"classes": true,
|
||||
"defaultParams": true,
|
||||
"destructuring": true,
|
||||
"spread": true,
|
||||
"arrowFunctions": true,
|
||||
"blockBindings": true,
|
||||
"objectLiteralComputedProperties": true,
|
||||
"objectLiteralDuplicateProperties": true,
|
||||
"objectLiteralShorthandMethods": true,
|
||||
"objectLiteralShorthandProperties": true,
|
||||
"restParams": true,
|
||||
"superInFunctions": true,
|
||||
"templateStrings": true,
|
||||
"experimentalObjectRestSpread": true
|
||||
},
|
||||
|
||||
"env": {
|
||||
"mocha": true, // needed for tests. Apply it globaly till eslint/selint#3611
|
||||
"browser": true,
|
||||
|
@ -32,8 +32,7 @@ export default class BaseAuthBody extends Component {
|
||||
renderErrors() {
|
||||
return this.form.hasErrors()
|
||||
? <AuthError error={this.form.getFirstError()} onClose={this.onClearErrors} />
|
||||
: null
|
||||
;
|
||||
: null;
|
||||
}
|
||||
|
||||
onFormSubmit() {
|
||||
|
@ -168,8 +168,7 @@ export class ContactForm extends Component {
|
||||
|
||||
logger.warn('Error sending feedback', resp);
|
||||
})
|
||||
.finally(() => this.setState({isLoading: false}))
|
||||
;
|
||||
.finally(() => this.setState({isLoading: false}));
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,8 @@ export default class Button extends FormComponent {
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<button className={classNames(buttons[color], {
|
||||
<button
|
||||
className={classNames(buttons[color], {
|
||||
[buttons.loading]: loading,
|
||||
[buttons.block]: block,
|
||||
[buttons.smallButton]: small
|
||||
|
@ -24,14 +24,12 @@ export default class Captcha extends FormInputComponent {
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
setTimeout(() =>
|
||||
setTimeout(() => {
|
||||
captcha.render(this.el, {
|
||||
skin: this.props.skin,
|
||||
onSetCode: this.setCode
|
||||
})
|
||||
.then((captchaId) => this.captchaId = captchaId),
|
||||
this.props.delay
|
||||
);
|
||||
}).then((captchaId) => this.captchaId = captchaId);
|
||||
}, this.props.delay);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -59,7 +59,8 @@ export default class Dropdown extends FormInputComponent {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className={classNames(styles[color], {
|
||||
<div
|
||||
className={classNames(styles[color], {
|
||||
[styles.block]: block,
|
||||
[styles.opened]: isActive
|
||||
})}
|
||||
|
@ -34,7 +34,7 @@ Promise.all([
|
||||
userFactory(store),
|
||||
font.load(['Roboto', 'Roboto Condensed'])
|
||||
])
|
||||
.then(() => {
|
||||
.then(() => {
|
||||
ReactDOM.render(
|
||||
<ReduxProvider store={store}>
|
||||
<IntlProvider>
|
||||
@ -51,7 +51,7 @@ Promise.all([
|
||||
);
|
||||
|
||||
initAnalytics();
|
||||
});
|
||||
});
|
||||
|
||||
import { loadScript, debounce } from 'functions';
|
||||
const trackPageView = debounce(_trackPageView);
|
||||
|
@ -117,8 +117,7 @@ function doFetch(url, options = {}) {
|
||||
.then(toJSON, rejectWithJSON)
|
||||
.then(handleResponseSuccess)
|
||||
.then((resp) => middlewareLayer.run('then', resp, {url, options}))
|
||||
.catch((resp) => middlewareLayer.run('catch', resp, {url, options}, () => doFetch(url, options)))
|
||||
;
|
||||
.catch((resp) => middlewareLayer.run('catch', resp, {url, options}, () => doFetch(url, options)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -159,6 +158,5 @@ function buildQuery(data: Object = {}): string {
|
||||
.map(encodeURIComponent)
|
||||
.join('=')
|
||||
)
|
||||
.join('&')
|
||||
;
|
||||
.join('&');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user