File tree Expand file tree Collapse file tree 8 files changed +46
-32
lines changed Expand file tree Collapse file tree 8 files changed +46
-32
lines changed Original file line number Diff line number Diff line change 6969 jsx-a11y/label-has-associated-control : 1
7070 jsx-a11y/control-has-associated-label : 0
7171 arrow-parens : [2, "always"]
72+ react/jsx-props-no-spreading : 1
Original file line number Diff line number Diff line change 88 * The second element can be, e.g., another row in the table.
99 * */
1010
11- import React , { Component , PropTypes } from 'react' ;
11+ import React , { Component } from 'react' ;
12+ import PropTypes from 'prop-types' ;
1213import colorScheme from './colorscheme' ;
1314
1415const cs = colorScheme ;
Original file line number Diff line number Diff line change @@ -92,10 +92,12 @@ export const TextInput = (props) => {
9292
9393 return (
9494 < div className = "form-group" style = { textInputStyle } >
95- { props . label &&
96- < label >
97- { props . label }
98- </ label >
95+ {
96+ props . label && (
97+ < label >
98+ { props . label }
99+ </ label >
100+ )
99101 }
100102 < input
101103 className = "form-control"
@@ -125,10 +127,12 @@ export const TextareaInput = (props) => {
125127
126128 return (
127129 < div className = "form-group" style = { textareaInputStyle } >
128- { props . label &&
129- < label >
130- { props . label }
131- </ label >
130+ {
131+ props . label && (
132+ < label >
133+ { props . label }
134+ </ label >
135+ )
132136 }
133137 < textarea
134138 className = "form-control"
@@ -181,23 +185,25 @@ export const SelectInput = (props) => {
181185
182186 return (
183187 < div className = "form-group" style = { selectInputStyle } >
184- { props . label &&
185- < label >
186- { props . label }
187- </ label >
188+ {
189+ props . label && (
190+ < label >
191+ { props . label }
192+ </ label >
193+ )
188194 }
189195 < select
190196 className = "form-control"
191197 { ...selectProps }
192198 >
193- { props . options . map ( ( option , idx ) => (
194- < option
195- value = { option . id }
196- key = { option . id }
197- >
198- { option . label }
199- </ option >
200- ) )
199+ {
200+ props . options . map ( ( option , idx ) => (
201+ < option value = { option . id } key = { option . id } >
202+ {
203+ option . label
204+ }
205+ </ option >
206+ ) )
201207 }
202208 </ select >
203209 < Error { ...props } />
@@ -260,10 +266,12 @@ export const FileInput = (props) => {
260266
261267 return (
262268 < div className = "form-group" style = { fileInputStyle } >
263- { props . label &&
264- < label >
265- { props . label }
266- </ label >
269+ {
270+ props . label && (
271+ < label >
272+ { props . label }
273+ </ label >
274+ )
267275 }
268276 < input type = "file" { ...inputProps } />
269277 < Error { ...props } />
Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
2+ import PropTypes from 'prop-types' ;
23import { connect } from 'react-redux' ;
34import { showNotification } from 'baselayer/components/Notifications' ;
45/* eslint-disable */
@@ -75,8 +76,8 @@ class Plot extends Component {
7576 }
7677}
7778Plot . propTypes = {
78- url : React . PropTypes . string . isRequired ,
79- dispatch : React . PropTypes . func . isRequired
79+ url : PropTypes . string . isRequired ,
80+ dispatch : PropTypes . func . isRequired
8081} ;
8182
8283Plot = connect ( ) ( Plot ) ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
2+ import PropTypes from 'prop-types' ;
23
34const Progress = ( props ) => {
45 let response = '' ;
@@ -27,7 +28,7 @@ const Progress = (props) => {
2728} ;
2829
2930Progress . propTypes = {
30- type : React . PropTypes . string . isRequired
31+ type : PropTypes . string . isRequired
3132} ;
3233
3334export default Progress ;
Original file line number Diff line number Diff line change 1- import React , { PropTypes } from 'react' ;
1+ import React from 'react' ;
2+ import PropTypes from 'prop-types' ;
23import { connect } from 'react-redux' ;
34import { reduxForm } from 'redux-form' ;
45
Original file line number Diff line number Diff line change 11import React from 'react' ;
2+ import PropTypes from 'prop-types' ;
23import { connect } from 'react-redux' ;
34
45let UserProfile = ( props ) => (
@@ -7,8 +8,8 @@ let UserProfile = (props) => (
78 </ div >
89) ;
910UserProfile . propTypes = {
10- style : React . PropTypes . object . isRequired ,
11- profile : React . PropTypes . object . isRequired
11+ style : PropTypes . object . isRequired ,
12+ profile : PropTypes . object . isRequired
1213} ;
1314
1415const mapStateToProps = ( state ) => (
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ const myFormReducer = (theirFormReducer) => (
127127 const field_names = Object . keys ( state . featurize ) . filter (
128128 ( field_name ) => contains ( action . payload . ctgy_list , field_name )
129129 ) ;
130- const featurizeFormState = Object . assign ( { } , state . featurize ) ;
130+ const featurizeFormState = { ... state . featurize } ;
131131 const allAreChecked = ( field_names . filter (
132132 ( el ) => ! featurizeFormState [ el ] . value
133133 ) . length === 0 ) ;
You can’t perform that action at this time.
0 commit comments