Skip to content

Commit 1b6acd3

Browse files
committed
Update to latest lint rules
1 parent 085ef2b commit 1b6acd3

File tree

387 files changed

+5997
-8822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+5997
-8822
lines changed

packages/ant-component-mapper/src/checkbox/checkbox.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import FormGroup from '../form-group';
99
export const SingleCheckbox = (props) => {
1010
const { input, isReadOnly, isDisabled, isRequired, label, helperText, description, validateOnMount, meta, FormItemProps, ...rest } = useFieldApi({
1111
...props,
12-
type: 'checkbox'
12+
type: 'checkbox',
1313
});
1414

1515
return (
@@ -45,13 +45,13 @@ SingleCheckbox.propTypes = {
4545
helperText: PropTypes.node,
4646
description: PropTypes.node,
4747
validateOnMount: PropTypes.bool,
48-
FormItemProps: PropTypes.object
48+
FormItemProps: PropTypes.object,
4949
};
5050

5151
const Checkbox = ({ options, ...props }) => (options ? <MultipleChoiceList options={options} {...props} /> : <SingleCheckbox {...props} />);
5252

5353
Checkbox.propTypes = {
54-
options: PropTypes.array
54+
options: PropTypes.array,
5555
};
5656

5757
export default Checkbox;

packages/ant-component-mapper/src/component-mapper/component-mapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const components = {
3030
Wizard,
3131
DualListSelect,
3232
FieldArray,
33-
Slider
33+
Slider,
3434
};
3535

3636
const componentMapper = {
@@ -48,7 +48,7 @@ const componentMapper = {
4848
[componentTypes.WIZARD]: Wizard,
4949
[componentTypes.SLIDER]: Slider,
5050
[componentTypes.DUAL_LIST_SELECT]: DualListSelect,
51-
[componentTypes.FIELD_ARRAY]: FieldArray
51+
[componentTypes.FIELD_ARRAY]: FieldArray,
5252
};
5353

5454
export default componentMapper;

packages/ant-component-mapper/src/date-picker/date-picker.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,8 @@ import { useFieldApi } from '@data-driven-forms/react-form-renderer';
66
import FormGroup from '../form-group';
77

88
const DatePicker = (props) => {
9-
const {
10-
input,
11-
isReadOnly,
12-
isDisabled,
13-
placeholder,
14-
isRequired,
15-
label,
16-
helperText,
17-
description,
18-
validateOnMount,
19-
meta,
20-
FormItemProps,
21-
...rest
22-
} = useFieldApi(props);
9+
const { input, isReadOnly, isDisabled, placeholder, isRequired, label, helperText, description, validateOnMount, meta, FormItemProps, ...rest } =
10+
useFieldApi(props);
2311
const invalid = validationError(meta, validateOnMount);
2412

2513
return (
@@ -57,11 +45,11 @@ DatePicker.propTypes = {
5745
validateOnMount: PropTypes.bool,
5846
locale: PropTypes.string,
5947
description: PropTypes.node,
60-
FormItemProps: PropTypes.object
48+
FormItemProps: PropTypes.object,
6149
};
6250

6351
DatePicker.defaultProps = {
64-
placeholder: 'Select date'
52+
placeholder: 'Select date',
6553
};
6654

6755
export default DatePicker;

packages/ant-component-mapper/src/dual-list-select/dual-list-select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const DualListSelect = (props) => {
1818
} = useFieldApi(props);
1919
const dataSource = options.map((option) => ({
2020
key: option.value,
21-
...option
21+
...option,
2222
}));
2323
return (
2424
<FormGroup

packages/ant-component-mapper/src/field-array/field-array.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const ArrayItem = memo(
1919
ArrayItemProps,
2020
FieldsContainerProps,
2121
RemoveContainerProps,
22-
RemoveButtonProps
22+
RemoveButtonProps,
2323
}) => {
2424
const { renderForm } = useFormApi();
2525

@@ -55,40 +55,40 @@ ArrayItem.propTypes = {
5555
ArrayItemProps: PropTypes.object.isRequired,
5656
FieldsContainerProps: PropTypes.object.isRequired,
5757
RemoveContainerProps: PropTypes.object.isRequired,
58-
RemoveButtonProps: PropTypes.object.isRequired
58+
RemoveButtonProps: PropTypes.object.isRequired,
5959
};
6060

6161
const defaultButtonLabels = {
6262
add: 'ADD',
63-
remove: 'REMOVE'
63+
remove: 'REMOVE',
6464
};
6565

6666
const initialState = {
6767
index: 0,
68-
history: []
68+
history: [],
6969
};
7070

7171
export const reducer = (state, { type, action }) => {
7272
switch (type) {
7373
case 'redo':
7474
return {
7575
...state,
76-
index: state.index + 1
76+
index: state.index + 1,
7777
};
7878
case 'action':
7979
return {
8080
index: state.index + 1,
81-
history: [...state.history.slice(0, state.index), action]
81+
history: [...state.history.slice(0, state.index), action],
8282
};
8383
case 'undo':
8484
return {
8585
...state,
86-
index: state.index - 1
86+
index: state.index - 1,
8787
};
8888
case 'resetHistory':
8989
return {
9090
...state,
91-
history: state.history.slice(0, state.index)
91+
history: state.history.slice(0, state.index),
9292
};
9393
default:
9494
return state;
@@ -135,7 +135,7 @@ const DynamicArray = ({ ...props }) => {
135135

136136
const combinedButtonLabels = {
137137
...defaultButtonLabels,
138-
...buttonLabels
138+
...buttonLabels,
139139
};
140140

141141
const { dirty, submitFailed, error, submitError } = meta;
@@ -272,7 +272,7 @@ DynamicArray.propTypes = {
272272
AddButtonProps: PropTypes.object,
273273
FieldArrayDescriptionProps: PropTypes.object,
274274
NoItemsMessageProps: PropTypes.object,
275-
ErrorMessageProps: PropTypes.object
275+
ErrorMessageProps: PropTypes.object,
276276
};
277277

278278
DynamicArray.defaultProps = {
@@ -294,7 +294,7 @@ DynamicArray.defaultProps = {
294294
AddButtonProps: {},
295295
FieldArrayDescriptionProps: {},
296296
NoItemsMessageProps: {},
297-
ErrorMessageProps: {}
297+
ErrorMessageProps: {},
298298
};
299299

300300
export default DynamicArray;

packages/ant-component-mapper/src/form-group/form-group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ FormGroup.propTypes = {
3434
validateOnMount: PropTypes.bool,
3535
helperText: PropTypes.node,
3636
description: PropTypes.node,
37-
hideLabel: PropTypes.bool
37+
hideLabel: PropTypes.bool,
3838
};
3939

4040
export default FormGroup;

packages/ant-component-mapper/src/form-template/form-template.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ const Form = ({ children, onSubmit, ...props }) => (
1515
Form.propTypes = {
1616
layout: PropTypes.string,
1717
onSubmit: PropTypes.func,
18-
children: childrenPropTypes
18+
children: childrenPropTypes,
1919
};
2020

2121
Form.defaultProps = {
22-
layout: 'vertical'
22+
layout: 'vertical',
2323
};
2424

2525
const Description = ({ children, ...props }) => (
@@ -29,7 +29,7 @@ const Description = ({ children, ...props }) => (
2929
);
3030

3131
Description.propTypes = {
32-
children: childrenPropTypes
32+
children: childrenPropTypes,
3333
};
3434

3535
const TitleComponent = ({ children, ...props }) => (
@@ -39,7 +39,7 @@ const TitleComponent = ({ children, ...props }) => (
3939
);
4040

4141
TitleComponent.propTypes = {
42-
children: childrenPropTypes
42+
children: childrenPropTypes,
4343
};
4444

4545
const ButtonGroup = ({ children, ...props }) => (
@@ -49,7 +49,7 @@ const ButtonGroup = ({ children, ...props }) => (
4949
);
5050

5151
ButtonGroup.propTypes = {
52-
children: childrenPropTypes
52+
children: childrenPropTypes,
5353
};
5454

5555
const ButtonComponent = ({ label, variant, children, buttonType, ...props }) => (
@@ -63,7 +63,7 @@ ButtonComponent.propTypes = {
6363
label: PropTypes.node,
6464
variant: PropTypes.string,
6565
buttonType: PropTypes.string,
66-
type: PropTypes.string
66+
type: PropTypes.string,
6767
};
6868

6969
const AntFormTemplate = ({ layout, formWrapperProps, ...props }) => (
@@ -80,7 +80,7 @@ const AntFormTemplate = ({ layout, formWrapperProps, ...props }) => (
8080

8181
AntFormTemplate.propTypes = {
8282
layout: PropTypes.string,
83-
formWrapperProps: PropTypes.object
83+
formWrapperProps: PropTypes.object,
8484
};
8585

8686
export default AntFormTemplate;

packages/ant-component-mapper/src/is-required/is-required.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const IsRequired = ({ children }) => (
1313
);
1414

1515
IsRequired.propTypes = {
16-
children: childrenPropTypes
16+
children: childrenPropTypes,
1717
};
1818

1919
export default IsRequired;

packages/ant-component-mapper/src/multiple-choice-list/multiple-choice-list.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const FinalCheckbox = ({ isDisabled, label, ...props }) => (
1313

1414
FinalCheckbox.propTypes = {
1515
isDisabled: PropTypes.bool,
16-
label: PropTypes.node
16+
label: PropTypes.node,
1717
};
1818

1919
const Wrapper = ({ label, isRequired, children, meta, validateOnMount, helperText, description, FormItemProps }) => (
@@ -31,15 +31,15 @@ const Wrapper = ({ label, isRequired, children, meta, validateOnMount, helperTex
3131
);
3232

3333
Wrapper.propTypes = {
34-
...wrapperProps
34+
...wrapperProps,
3535
};
3636

3737
const MultipleChoiceList = (props) => <MultipleChoiceListCommon {...props} Wrapper={Wrapper} Checkbox={FinalCheckbox} />;
3838

3939
MultipleChoiceList.propTypes = {
4040
input: PropTypes.shape({
41-
name: PropTypes.string.isRequired
42-
})
41+
name: PropTypes.string.isRequired,
42+
}),
4343
};
4444

4545
export default MultipleChoiceList;

packages/ant-component-mapper/src/plain-text/plain-text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const PlainText = ({ label, name, TypographyProps, ...rest }) => (
1717
PlainText.propTypes = {
1818
label: PropTypes.string.isRequired,
1919
name: PropTypes.string.isRequired,
20-
TypographyProps: PropTypes.object
20+
TypographyProps: PropTypes.object,
2121
};
2222

2323
export default PlainText;

0 commit comments

Comments
 (0)