Skip to content

Commit

Permalink
Update eslint / prettier.
Browse files Browse the repository at this point in the history
  • Loading branch information
twisty committed Jun 14, 2021
1 parent 536dd16 commit 0119c3c
Show file tree
Hide file tree
Showing 5 changed files with 439 additions and 335 deletions.
20 changes: 4 additions & 16 deletions src/components/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,8 @@ class Checkbox extends React.Component<Props, State> {
};

private renderElement = (): JSX.Element => {
const {
elementRef,
id,
label,
value,
valueLabel,
...inputProps
} = this.props;
const {elementRef, id, label, value, valueLabel, ...inputProps} =
this.props;
Object.keys(componentDefaultProps).forEach((key): void => {
delete inputProps[key];
});
Expand All @@ -69,14 +63,8 @@ class Checkbox extends React.Component<Props, State> {

public render(): JSX.Element {
const element = this.renderElement();
const {
errorMessages,
help,
id,
labelClassName,
layout,
showErrors,
} = this.props;
const {errorMessages, help, id, labelClassName, layout, showErrors} =
this.props;

if (layout === 'elementOnly') {
return element;
Expand Down
10 changes: 2 additions & 8 deletions src/components/form-check-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ type FormCheckGroupProps = typeof componentDefaultProps & {
const FormCheckGroup: React.FunctionComponent<FormCheckGroupProps> = (
props,
) => {
const {
layout,
help,
showErrors,
errorMessages,
labelClassName,
children,
} = props;
const {layout, help, showErrors, errorMessages, labelClassName, children} =
props;

if (layout === 'elementOnly') {
return children;
Expand Down
10 changes: 2 additions & 8 deletions src/components/input-file.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ class File extends React.Component<FileProps, State> {
};

public render(): JSX.Element {
const {
errorMessages,
help,
id,
layout,
showErrors,
...inputProps
} = this.props;
const {errorMessages, help, id, layout, showErrors, ...inputProps} =
this.props;
Object.keys(componentDefaultProps).forEach((key): void => {
delete inputProps[key];
});
Expand Down
8 changes: 2 additions & 6 deletions src/components/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ class Textarea extends React.Component<TextareaProps, State> {

public constructor(props) {
super(props);
const {
value,
onSetValue,
changeDebounceInterval,
blurDebounceInterval,
} = props;
const {value, onSetValue, changeDebounceInterval, blurDebounceInterval} =
props;
this.state = {
currentValue: value,
incomingPropValue: value,
Expand Down
Loading

0 comments on commit 0119c3c

Please sign in to comment.