Fix segment related eslint violations

This commit is contained in:
Tautvidas Sipavičius
2018-11-01 01:56:21 +02:00
parent 5b077b3911
commit 050417ec83
2 changed files with 11 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react';
import { Link } from 'react-router'; import { Link } from 'react-router';
import MailPoet from 'mailpoet'; import MailPoet from 'mailpoet';
import classNames from 'classnames'; import classNames from 'classnames';
import PropTypes from 'prop-types';
import Listing from 'listing/listing.jsx'; import Listing from 'listing/listing.jsx';
@@ -276,4 +277,9 @@ class SegmentList extends React.Component {
} }
} }
SegmentList.propTypes = {
location: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
params: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
};
module.exports = SegmentList; module.exports = SegmentList;

View File

@@ -2,6 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, useRouterHistory } from 'react-router'; import { Router, Route, IndexRoute, useRouterHistory } from 'react-router';
import { createHashHistory } from 'history'; import { createHashHistory } from 'history';
import PropTypes from 'prop-types';
import SegmentList from 'segments/list.jsx'; import SegmentList from 'segments/list.jsx';
import SegmentForm from 'segments/form.jsx'; import SegmentForm from 'segments/form.jsx';
@@ -14,6 +15,10 @@ class App extends React.Component {
} }
} }
App.propTypes = {
children: PropTypes.element.isRequired,
};
const container = document.getElementById('segments_container'); const container = document.getElementById('segments_container');
if (container) { if (container) {