Skip to content

Commit b8bd627

Browse files
committed
Fix eslint errors.
1 parent c26df0a commit b8bd627

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

examples/playground/src/App.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ class App extends Component {
4949
onChangeOption={this.handleChangeOption}
5050
onToggle={this.handleToggleOptions}
5151
/>
52-
<h2 className="pb-2 mt-4 mb-3 border-bottom">Layout: <code>{layout}</code></h2>
52+
<h2 className="pb-2 mt-4 mb-3 border-bottom">
53+
Layout: <code>{layout}</code>
54+
</h2>
5355
<Playground
5456
layoutChoice={layout}
5557
validateOnSubmitChoice={validateOnSubmit}

examples/playground/src/playground.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ const Playground = props => {
8080
myform = form;
8181
};
8282

83-
const legend = str => <legend className="pb-2 mt-4 mb-3 border-bottom">{str}</legend>;
83+
const legend = str => (
84+
<legend className="pb-2 mt-4 mb-3 border-bottom">{str}</legend>
85+
);
8486

8587
return (
8688
<Form

src/components/__tests__/input-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ describe('The <Input /> component', () => {
6565
it('has an `aria-invalid="true"` prop on the form control when validation has failed', () => {});
6666

6767
it('has an `aria-required="true"` prop on the form control when validation is required', () => {});
68-
6968
});
7069

7170
describe('Input components do this', () => {

src/components/error-messages.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import PropTypes from 'prop-types';
44
const ErrorMessages = ({messages}) => {
55
const messageNodes = messages.map((message, key) => (
66
// eslint-disable-next-line react/no-array-index-key
7-
<div key={key}>
8-
{message}
9-
</div>
7+
<div key={key}>{message}</div>
108
));
119
return <div className="invalid-feedback">{messageNodes}</div>;
1210
};

src/components/form-check-group.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ import React from 'react';
22
import ErrorMessages from './error-messages';
33
import Help from './help';
44
import Row from './row';
5+
import {componentPropTypes, componentDefaultProps} from './component-common';
56

67
const FormCheckGroup = props => {
7-
const { layout, help, showErrors, errorMessages, labelClassName, children } = props;
8+
const {
9+
layout,
10+
help,
11+
showErrors,
12+
errorMessages,
13+
labelClassName,
14+
children,
15+
} = props;
816

917
if (layout === 'elementOnly') {
1018
return children;
@@ -19,4 +27,7 @@ const FormCheckGroup = props => {
1927
);
2028
};
2129

30+
FormCheckGroup.propTypes = componentPropTypes;
31+
FormCheckGroup.defaultProps = componentDefaultProps;
32+
2233
export default FormCheckGroup;

0 commit comments

Comments
 (0)