Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency eslint-plugin-react to v7.12.3 #4406

Merged
merged 2 commits into from Jan 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -84,7 +84,7 @@
"eslint-plugin-jest": "22.1.2",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.11.1",
"eslint-plugin-react": "7.12.3",
"fetch-mock": "7.3.0",
"jasmine-jquery": "2.1.1",
"jest": "23.6.0",
Expand Down
28 changes: 28 additions & 0 deletions ui/intermittent-failures/BugDetailsView.jsx
Expand Up @@ -3,6 +3,7 @@ import { Row, Col } from 'reactstrap';
import { Link } from 'react-router-dom';
import Icon from 'react-fontawesome';
import ReactTable from 'react-table';
import PropTypes from 'prop-types';

import { bugDetailsEndpoint, getJobsUrl } from '../helpers/url';

Expand Down Expand Up @@ -157,6 +158,33 @@ const BugDetailsView = props => {
);
};

BugDetailsView.propTypes = {
location: PropTypes.shape({}).isRequired,
tree: PropTypes.string.isRequired,
updateAppState: PropTypes.func,
updateState: PropTypes.func.isRequired,
startday: PropTypes.string.isRequired,
endday: PropTypes.string.isRequired,
tableData: PropTypes.arrayOf(PropTypes.shape({})),
graphData: PropTypes.arrayOf(PropTypes.shape({})),
initialParamsSet: PropTypes.bool.isRequired,
bug: PropTypes.number.isRequired,
summary: PropTypes.string.isRequired,
errorMessages: PropTypes.arrayOf(PropTypes.string),
lastLocation: PropTypes.shape({}).isRequired,
tableFailureStatus: PropTypes.string,
graphFailureStatus: PropTypes.string,
};

BugDetailsView.defaultProps = {
graphData: [],
tableData: [],
errorMessages: [],
tableFailureStatus: null,
graphFailureStatus: null,
updateAppState: null,
};

const defaultState = {
route: '/bugdetails',
endpoint: bugDetailsEndpoint,
Expand Down
14 changes: 14 additions & 0 deletions ui/intermittent-failures/MainView.jsx
Expand Up @@ -143,6 +143,20 @@ const MainView = props => {

MainView.propTypes = {
location: PropTypes.shape({}).isRequired,
tree: PropTypes.string.isRequired,
updateAppState: PropTypes.func,
updateState: PropTypes.func.isRequired,
startday: PropTypes.string.isRequired,
endday: PropTypes.string.isRequired,
tableData: PropTypes.arrayOf(PropTypes.shape({})),
graphData: PropTypes.arrayOf(PropTypes.shape({})),
initialParamsSet: PropTypes.bool.isRequired,
};

MainView.defaultProps = {
graphData: [],
tableData: [],
updateAppState: null,
};

const defaultState = {
Expand Down
23 changes: 17 additions & 6 deletions ui/intermittent-failures/View.jsx
Expand Up @@ -17,7 +17,7 @@ import {
formatBugs,
} from './helpers';

const withView = defaultState => WrappedComponent =>
const withView = defaultState => WrappedComponent => {
class View extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -214,13 +214,24 @@ const withView = defaultState => WrappedComponent =>
const newProps = { ...this.props, ...this.state, ...updateState };
return <WrappedComponent {...newProps} />;
}
}

View.propTypes = {
history: PropTypes.shape({}).isRequired,
location: PropTypes.shape({
search: PropTypes.string,
state: PropTypes.shape({}),
}).isRequired,
mainGraphData: PropTypes.arrayOf(PropTypes.shape({})),
mainTableData: PropTypes.arrayOf(PropTypes.shape({})),
};

withView.propTypes = {
history: PropTypes.shape({}).isRequired,
location: PropTypes.shape({
search: PropTypes.string,
}).isRequired,
View.defaultProps = {
mainGraphData: null,
mainTableData: null,
};

return View;
};

export default withView;
13 changes: 1 addition & 12 deletions yarn.lock
Expand Up @@ -3579,18 +3579,7 @@ eslint-plugin-prettier@3.0.1:
dependencies:
prettier-linter-helpers "^1.0.0"

eslint-plugin-react@7.11.1:
version "7.11.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c"
integrity sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==
dependencies:
array-includes "^3.0.3"
doctrine "^2.1.0"
has "^1.0.3"
jsx-ast-utils "^2.0.1"
prop-types "^15.6.2"

eslint-plugin-react@^7.11.1:
eslint-plugin-react@7.12.3, eslint-plugin-react@^7.11.1:
version "7.12.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.3.tgz#b9ca4cd7cd3f5d927db418a1950366a12d4568fd"
integrity sha512-WTIA3cS8OzkPeCi4KWuPmjR33lgG9r9Y/7RmnLTRw08MZKgAfnK/n3BO4X0S67MPkVLazdfCNT/XWqcDu4BLTA==
Expand Down