diff --git a/frontend/src/component/app.jsx b/frontend/src/component/app.jsx index 2b59425911..5d61a15e2e 100644 --- a/frontend/src/component/app.jsx +++ b/frontend/src/component/app.jsx @@ -22,12 +22,10 @@ function replace (input, params) { } export default class App extends Component { - static propTypes () { - return { - location: PropTypes.object.isRequired, - params: PropTypes.object.isRequired, - routes: PropTypes.array.isRequired, - }; + static propTypes = { + location: PropTypes.object.isRequired, + params: PropTypes.object.isRequired, + routes: PropTypes.array.isRequired, } static contextTypes = { diff --git a/frontend/src/component/client-instance/client-instance-component.js b/frontend/src/component/client-instance/client-instance-component.js index c6ce115894..883e402609 100644 --- a/frontend/src/component/client-instance/client-instance-component.js +++ b/frontend/src/component/client-instance/client-instance-component.js @@ -2,11 +2,9 @@ import React, { Component, PropTypes } from 'react'; import { DataTable, TableHeader } from 'react-mdl'; class ClientStrategies extends Component { - static propTypes () { - return { - fetchClientInstances: PropTypes.func.isRequired, - clientInstances: PropTypes.array.isRequired, - }; + static propTypes = { + fetchClientInstances: PropTypes.func.isRequired, + clientInstances: PropTypes.array.isRequired, } componentDidMount () { diff --git a/frontend/src/component/error/error-component.jsx b/frontend/src/component/error/error-component.jsx index 59e2bd8dde..8920840315 100644 --- a/frontend/src/component/error/error-component.jsx +++ b/frontend/src/component/error/error-component.jsx @@ -3,11 +3,9 @@ import React, { PropTypes } from 'react'; import { Snackbar, Icon } from 'react-mdl'; class ErrorComponent extends React.Component { - static propTypes () { - return { - errors: PropTypes.array.isRequired, - muteError: PropTypes.func.isRequired, - }; + static propTypes = { + errors: PropTypes.array.isRequired, + muteError: PropTypes.func.isRequired, } render () { diff --git a/frontend/src/component/feature/form/strategies-add.jsx b/frontend/src/component/feature/form/strategies-add.jsx index 4847cc2672..d03420df24 100644 --- a/frontend/src/component/feature/form/strategies-add.jsx +++ b/frontend/src/component/feature/form/strategies-add.jsx @@ -2,12 +2,10 @@ import React, { PropTypes } from 'react'; import { Menu, MenuItem, IconButton } from 'react-mdl'; class AddStrategy extends React.Component { - static propTypes () { - return { - strategies: PropTypes.array.isRequired, - addStrategy: PropTypes.func.isRequired, - fetchStrategies: PropTypes.func.isRequired, - }; + static propTypes = { + strategies: PropTypes.array.isRequired, + addStrategy: PropTypes.func.isRequired, + fetchStrategies: PropTypes.func.isRequired, } addStrategy = (strategyName) => { diff --git a/frontend/src/component/feature/form/strategies-list.jsx b/frontend/src/component/feature/form/strategies-list.jsx index dcf0e6ff47..847b90a7b4 100644 --- a/frontend/src/component/feature/form/strategies-list.jsx +++ b/frontend/src/component/feature/form/strategies-list.jsx @@ -5,14 +5,12 @@ import HTML5Backend from 'react-dnd-html5-backend'; @DragDropContext(HTML5Backend) // eslint-disable-line new-cap class StrategiesList extends React.Component { - static propTypes () { - return { - strategies: PropTypes.array.isRequired, - configuredStrategies: PropTypes.array.isRequired, - updateStrategy: PropTypes.func.isRequired, - removeStrategy: PropTypes.func.isRequired, - moveStrategy: PropTypes.func.isRequired, - }; + static propTypes = { + strategies: PropTypes.array.isRequired, + configuredStrategies: PropTypes.array.isRequired, + updateStrategy: PropTypes.func.isRequired, + removeStrategy: PropTypes.func.isRequired, + moveStrategy: PropTypes.func.isRequired, } render () { diff --git a/frontend/src/component/feature/form/strategies-section.jsx b/frontend/src/component/feature/form/strategies-section.jsx index fe9927ca81..ea65b5f98f 100644 --- a/frontend/src/component/feature/form/strategies-section.jsx +++ b/frontend/src/component/feature/form/strategies-section.jsx @@ -5,14 +5,12 @@ import AddStrategy from './strategies-add'; import { HeaderTitle } from '../../common'; class StrategiesSection extends React.Component { - static propTypes () { - return { - strategies: PropTypes.array.isRequired, - addStrategy: PropTypes.func.isRequired, - removeStrategy: PropTypes.func.isRequired, - updateStrategy: PropTypes.func.isRequired, - fetchStrategies: PropTypes.func.isRequired, - }; + static propTypes = { + strategies: PropTypes.array.isRequired, + addStrategy: PropTypes.func.isRequired, + removeStrategy: PropTypes.func.isRequired, + updateStrategy: PropTypes.func.isRequired, + fetchStrategies: PropTypes.func.isRequired, } componentWillMount () { diff --git a/frontend/src/component/feature/form/strategy-configure.jsx b/frontend/src/component/feature/form/strategy-configure.jsx index 802c3b303b..f58c21af2f 100644 --- a/frontend/src/component/feature/form/strategy-configure.jsx +++ b/frontend/src/component/feature/form/strategy-configure.jsx @@ -45,18 +45,16 @@ const dragTarget = { isDragging: monitor.isDragging(), })) class StrategyConfigure extends React.Component { - static propTypes () { - return { - strategy: PropTypes.object.isRequired, - strategyDefinition: PropTypes.object.isRequired, - updateStrategy: PropTypes.func.isRequired, - removeStrategy: PropTypes.func.isRequired, - moveStrategy: PropTypes.func.isRequired, - isDragging: PropTypes.bool.isRequired, - connectDragPreview: PropTypes.func.isRequired, - connectDragSource: PropTypes.func.isRequired, - connectDropTarget: PropTypes.func.isRequired, - }; + static propTypes = { + strategy: PropTypes.object.isRequired, + strategyDefinition: PropTypes.object.isRequired, + updateStrategy: PropTypes.func.isRequired, + removeStrategy: PropTypes.func.isRequired, + moveStrategy: PropTypes.func.isRequired, + isDragging: PropTypes.bool.isRequired, + connectDragPreview: PropTypes.func.isRequired, + connectDragSource: PropTypes.func.isRequired, + connectDropTarget: PropTypes.func.isRequired, } handleConfigChange = (key, e) => { diff --git a/frontend/src/component/feature/list-component.jsx b/frontend/src/component/feature/list-component.jsx index ce7fece559..bc3d17dbf3 100644 --- a/frontend/src/component/feature/list-component.jsx +++ b/frontend/src/component/feature/list-component.jsx @@ -7,16 +7,13 @@ import { MenuItemWithIcon, DropdownButton, styles as commonStyles } from '../com import styles from './feature.scss'; export default class FeatureListComponent extends React.PureComponent { - static propTypes () { - return { - toggleFeature: PropTypes.func.isRequired, - features: PropTypes.array.isRequired, - featureMetrics: PropTypes.object.isRequired, - fetchFeatureToggles: PropTypes.func.isRequired, - fetchFeatureMetrics: PropTypes.func.isRequired, - updateSetting: PropTypes.func.isRequired, - settings: React.PropTypes.object, - }; + static propTypes = { + features: PropTypes.array.isRequired, + featureMetrics: PropTypes.object.isRequired, + fetchFeatureToggles: PropTypes.func.isRequired, + fetchFeatureMetrics: PropTypes.func.isRequired, + updateSetting: PropTypes.func.isRequired, + settings: React.PropTypes.object, } static contextTypes = { diff --git a/frontend/src/component/feature/metric-component.jsx b/frontend/src/component/feature/metric-component.jsx index dc5ab5aa02..ee5d5fe864 100644 --- a/frontend/src/component/feature/metric-component.jsx +++ b/frontend/src/component/feature/metric-component.jsx @@ -23,13 +23,11 @@ const StrategiesList = ({ strategies }) => ( ); export default class MetricComponent extends React.Component { - static propTypes () { - return { - metrics: PropTypes.object.isRequired, - featureToggle: PropTypes.object.isRequired, - fetchSeenApps: PropTypes.func.isRequired, - fetchFeatureMetrics: PropTypes.func.isRequired, - }; + static propTypes = { + metrics: PropTypes.object.isRequired, + featureToggle: PropTypes.object.isRequired, + fetchSeenApps: PropTypes.func.isRequired, + fetchFeatureMetrics: PropTypes.func.isRequired, } componentWillMount () { diff --git a/frontend/src/component/feature/view-component.jsx b/frontend/src/component/feature/view-component.jsx index 207ae04274..f350d8d48a 100644 --- a/frontend/src/component/feature/view-component.jsx +++ b/frontend/src/component/feature/view-component.jsx @@ -18,16 +18,14 @@ export default class ViewFeatureToggleComponent extends React.Component { super(props); } - static propTypes () { - return { - activeTab: PropTypes.string.isRequired, - featureToggleName: PropTypes.string.isRequired, - features: PropTypes.array.isRequired, - toggleFeature: PropTypes.func.isRequired, - removeFeatureToggle: PropTypes.func.isRequired, - fetchFeatureToggles: PropTypes.array.isRequired, - featureToggle: PropTypes.object.isRequired, - }; + static propTypes = { + activeTab: PropTypes.string.isRequired, + featureToggleName: PropTypes.string.isRequired, + features: PropTypes.array.isRequired, + toggleFeature: PropTypes.func.isRequired, + removeFeatureToggle: PropTypes.func.isRequired, + fetchFeatureToggles: PropTypes.array.isRequired, + featureToggle: PropTypes.object.isRequired, } componentWillMount () { diff --git a/frontend/src/component/history/history-item-diff.jsx b/frontend/src/component/history/history-item-diff.jsx index 4e3ffa1e24..2be1c27986 100644 --- a/frontend/src/component/history/history-item-diff.jsx +++ b/frontend/src/component/history/history-item-diff.jsx @@ -59,10 +59,8 @@ function buildDiff (diff, idx) { } class HistoryItem extends PureComponent { - static propTypes () { - return { - entry: PropTypes.object, - }; + static propTypes = { + entry: PropTypes.object, } render () { diff --git a/frontend/src/component/history/history-item-json.jsx b/frontend/src/component/history/history-item-json.jsx index e4d831b283..8f836df42d 100644 --- a/frontend/src/component/history/history-item-json.jsx +++ b/frontend/src/component/history/history-item-json.jsx @@ -3,10 +3,8 @@ import React, { PropTypes, PureComponent } from 'react'; import style from './history.scss'; class HistoryItem extends PureComponent { - static propTypes () { - return { - entry: PropTypes.object, - }; + static propTypes = { + entry: PropTypes.object, } render () { diff --git a/frontend/src/component/history/history-list-toggle-component.jsx b/frontend/src/component/history/history-list-toggle-component.jsx index 80a22b2bb3..3b2f2553b9 100644 --- a/frontend/src/component/history/history-list-toggle-component.jsx +++ b/frontend/src/component/history/history-list-toggle-component.jsx @@ -2,10 +2,8 @@ import React, { Component, PropTypes } from 'react'; import HistoryList from './history-list-container'; class HistoryListToggle extends Component { - static propTypes () { - return { - toggleName: PropTypes.string.isRequired, - }; + static propTypes = { + toggleName: PropTypes.string.isRequired, } componentDidMount () { diff --git a/frontend/src/component/strategies/add-strategy.jsx b/frontend/src/component/strategies/add-strategy.jsx index 47d5139bca..84c25d9e4c 100644 --- a/frontend/src/component/strategies/add-strategy.jsx +++ b/frontend/src/component/strategies/add-strategy.jsx @@ -91,19 +91,17 @@ const Parameters = ({ input = [], count = 0, updateInList }) => ( }); class AddStrategy extends Component { - static propTypes () { - return { - input: PropTypes.object, - setValue: PropTypes.func, - updateInList: PropTypes.func, - incValue: PropTypes.func, - clear: PropTypes.func, - onCancel: PropTypes.func, - onSubmit: PropTypes.func, - editmode: PropTypes.bool, - initCallRequired: PropTypes.bool, - init: PropTypes.func, - }; + static propTypes = { + input: PropTypes.object, + setValue: PropTypes.func, + updateInList: PropTypes.func, + incValue: PropTypes.func, + clear: PropTypes.func, + onCancel: PropTypes.func, + onSubmit: PropTypes.func, + editmode: PropTypes.bool, + initCallRequired: PropTypes.bool, + init: PropTypes.func, } componentWillMount () { diff --git a/frontend/src/component/strategies/show-strategy-component.js b/frontend/src/component/strategies/show-strategy-component.js index 9930252eb8..9073daea01 100644 --- a/frontend/src/component/strategies/show-strategy-component.js +++ b/frontend/src/component/strategies/show-strategy-component.js @@ -3,12 +3,10 @@ import { Grid, Cell, List, ListItem, ListItemContent } from 'react-mdl'; import { AppsLinkList, TogglesLinkList } from '../common'; class ShowStrategyComponent extends PureComponent { - static propTypes () { - return { - toggles: PropTypes.array, - applications: PropTypes.array, - strategy: PropTypes.object.isRequired, - }; + static propTypes = { + toggles: PropTypes.array, + applications: PropTypes.array, + strategy: PropTypes.object.isRequired, } renderParameters (params) { diff --git a/frontend/src/component/strategies/strategy-details-component.jsx b/frontend/src/component/strategies/strategy-details-component.jsx index 007776aa7c..f4768c6645 100644 --- a/frontend/src/component/strategies/strategy-details-component.jsx +++ b/frontend/src/component/strategies/strategy-details-component.jsx @@ -11,17 +11,15 @@ const TABS = { }; export default class StrategyDetails extends Component { - static propTypes () { - return { - strategyName: PropTypes.string.isRequired, - toggles: PropTypes.array, - applications: PropTypes.array, - activeTab: PropTypes.string.isRequired, - strategy: PropTypes.object.isRequired, - fetchStrategies: PropTypes.func.isRequired, - fetchApplications: PropTypes.func.isRequired, - fetchFeatureToggles: PropTypes.func.isRequired, - }; + static propTypes = { + strategyName: PropTypes.string.isRequired, + toggles: PropTypes.array, + applications: PropTypes.array, + activeTab: PropTypes.string.isRequired, + strategy: PropTypes.object.isRequired, + fetchStrategies: PropTypes.func.isRequired, + fetchApplications: PropTypes.func.isRequired, + fetchFeatureToggles: PropTypes.func.isRequired, } componentDidMount () { diff --git a/frontend/src/component/user/show-user-component.jsx b/frontend/src/component/user/show-user-component.jsx index c4e2808a2d..d69a6e6b09 100644 --- a/frontend/src/component/user/show-user-component.jsx +++ b/frontend/src/component/user/show-user-component.jsx @@ -2,12 +2,10 @@ import React, { PropTypes } from 'react'; import { Icon, Tooltip } from 'react-mdl'; export default class ShowUserComponent extends React.Component { - static propTypes () { - return { - user: PropTypes.object.isRequired, - openEdit: PropTypes.func.isRequired, - }; - } + static propTypes = { + user: PropTypes.object.isRequired, + openEdit: PropTypes.func.isRequired, + }; openEdit = (evt) => { evt.preventDefault(); diff --git a/frontend/src/component/user/user-component.jsx b/frontend/src/component/user/user-component.jsx index b0944569ff..4b5b073315 100644 --- a/frontend/src/component/user/user-component.jsx +++ b/frontend/src/component/user/user-component.jsx @@ -24,12 +24,10 @@ const customStyles = { }; class EditUserComponent extends React.Component { - static propTypes () { - return { - user: PropTypes.object.isRequired, - updateUserName: PropTypes.func.isRequired, - save: PropTypes.func.isRequired, - }; + static propTypes = { + user: PropTypes.object.isRequired, + updateUserName: PropTypes.func.isRequired, + save: PropTypes.func.isRequired, } handleSubmit = (evt) => { diff --git a/frontend/src/page/features/show.js b/frontend/src/page/features/show.js index 7cff11b9f1..3678b89567 100644 --- a/frontend/src/page/features/show.js +++ b/frontend/src/page/features/show.js @@ -2,10 +2,8 @@ import React, { PureComponent, PropTypes } from 'react'; import ViewFeatureToggle from '../../component/feature/view-container'; export default class Features extends PureComponent { - static propTypes () { - return { - params: PropTypes.object.isRequired, - }; + static propTypes = { + params: PropTypes.object.isRequired, } render () {