Skip to content

Commit

Permalink
fix(eslint): fix Node 6 eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jaebradley committed Dec 16, 2017
1 parent c20de7c commit b77cef5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
4 changes: 0 additions & 4 deletions src/Modal/Modal.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ ModalWrapper.propTypes = {
body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
};

ModalWrapper.defaultProps = {
open: false,
};

storiesOf('Modal', module)
.add('basic usage', () => (
<Modal
Expand Down
9 changes: 4 additions & 5 deletions src/Modal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,12 @@ class Modal extends React.Component {
}

renderBody() {
let body;
let { body } = this.props;

if (typeof this.props.body === 'string') {
body = <p>{this.props.body}</p>;
} else {
body = this.props.body;
if (typeof body === 'string') {
body = <p>{body}</p>;
}

return body;
}

Expand Down
5 changes: 1 addition & 4 deletions src/StatusAlert/StatusAlert.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ describe('<StatusAlert />', () => {
});
describe('focus functions properly', () => {
it('focus function changes focus', () => {
wrapper = mount(<div>
<Button label="test" />
<StatusAlert {...defaultProps} />
</div>);
wrapper = mount(<div><Button label="test" /><StatusAlert {...defaultProps} /></div>);

const buttons = wrapper.find('button');

Expand Down
14 changes: 10 additions & 4 deletions src/Table/Table.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ const props = {
{ key: 'i', label: 'Imaginary Number' },
],
data: [
{ sq: 1, num: 1, x2: 2, i: 'i' },
{ sq: 4, num: 2, x2: 4, i: '2i' },
{ sq: 9, num: 3, x2: 6, i: '3i' },
{
sq: 1, num: 1, x2: 2, i: 'i',
},
{
sq: 4, num: 2, x2: 4, i: '2i',
},
{
sq: 9, num: 3, x2: 6, i: '3i',
},
],
};

Expand Down Expand Up @@ -62,7 +68,7 @@ describe('<Table />', () => {
it('with data in the same order as the columns', () => {
wrapper.find('tr').at(1).find('td').forEach((td, i) => {
let parsed = Number(td.text());
if (isNaN(parsed)) { parsed = td.text(); }
if (Number.isNaN(parsed)) { parsed = td.text(); }
expect(parsed).toEqual(props.data[0][props.columns[i].key]);
});
});
Expand Down
5 changes: 5 additions & 0 deletions src/Tabs/index.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// TODO: @jaebradley fix these eslint errors

/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable jsx-a11y/anchor-is-valid */

import React from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
Expand Down

0 comments on commit b77cef5

Please sign in to comment.