Upgrade prettier before it will be removed forever

This commit is contained in:
SleepWalker
2020-05-20 19:35:52 +03:00
parent 39576c0480
commit 2d903f96fc
108 changed files with 422 additions and 547 deletions

View File

@@ -36,10 +36,10 @@ export default class Captcha extends FormInputComponent<
skin: this.props.skin,
onSetCode: this.setCode,
})
.then(captchaId => {
.then((captchaId) => {
this.captchaId = captchaId;
})
.catch(error => {
.catch((error) => {
logger.error('Failed rendering captcha', {
error,
});

View File

@@ -101,7 +101,7 @@ export default class Dropdown extends FormInputComponent<Props, State> {
}
onSelectItem(item: OptionItem): MouseEventHandler {
return event => {
return (event) => {
event.preventDefault();
this.setState({
@@ -143,7 +143,7 @@ export default class Dropdown extends FormInputComponent<Props, State> {
this.toggle();
};
onBodyClick: MouseEventHandler = event => {
onBodyClick: MouseEventHandler = (event) => {
if (this.state.isActive) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const el = ReactDOM.findDOMNode(this)!;

View File

@@ -130,7 +130,7 @@ export default class FormModel {
const oldErrors = this.errors;
this.errors = errors;
Object.keys(this.fields).forEach(fieldId => {
Object.keys(this.fields).forEach((fieldId) => {
if (this.renderErrors) {
if (oldErrors[fieldId] || errors[fieldId]) {
this.fields[fieldId].setError(errors[fieldId] || null);
@@ -192,7 +192,7 @@ export default class FormModel {
* @param {Function} fn
*/
removeLoadingListener(fn: LoadingListener): void {
this.handlers = this.handlers.filter(handler => handler !== fn);
this.handlers = this.handlers.filter((handler) => handler !== fn);
}
/**
@@ -212,6 +212,6 @@ export default class FormModel {
}
private notifyHandlers(): void {
this.handlers.forEach(fn => fn(this._isLoading));
this.handlers.forEach((fn) => fn(this._isLoading));
}
}

View File

@@ -14,7 +14,7 @@ describe('Input', () => {
<Input
defaultValue="foo"
name="test"
ref={el => {
ref={(el) => {
component = el;
}}
/>

View File

@@ -11,7 +11,7 @@ export default function LinkButton(
return (
<Button
component={linkProps => <Link {...linkProps} to={to} />}
component={(linkProps) => <Link {...linkProps} to={to} />}
{...restProps}
/>
);