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 69
69
jsx-a11y/label-has-associated-control : 1
70
70
jsx-a11y/control-has-associated-label : 0
71
71
arrow-parens : [2, "always"]
72
+ react/jsx-props-no-spreading : 1
Original file line number Diff line number Diff line change 8
8
* The second element can be, e.g., another row in the table.
9
9
* */
10
10
11
- import React , { Component , PropTypes } from 'react' ;
11
+ import React , { Component } from 'react' ;
12
+ import PropTypes from 'prop-types' ;
12
13
import colorScheme from './colorscheme' ;
13
14
14
15
const cs = colorScheme ;
Original file line number Diff line number Diff line change @@ -92,10 +92,12 @@ export const TextInput = (props) => {
92
92
93
93
return (
94
94
< 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
+ )
99
101
}
100
102
< input
101
103
className = "form-control"
@@ -125,10 +127,12 @@ export const TextareaInput = (props) => {
125
127
126
128
return (
127
129
< 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
+ )
132
136
}
133
137
< textarea
134
138
className = "form-control"
@@ -181,23 +185,25 @@ export const SelectInput = (props) => {
181
185
182
186
return (
183
187
< 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
+ )
188
194
}
189
195
< select
190
196
className = "form-control"
191
197
{ ...selectProps }
192
198
>
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
+ ) )
201
207
}
202
208
</ select >
203
209
< Error { ...props } />
@@ -260,10 +266,12 @@ export const FileInput = (props) => {
260
266
261
267
return (
262
268
< 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
+ )
267
275
}
268
276
< input type = "file" { ...inputProps } />
269
277
< Error { ...props } />
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
+ import PropTypes from 'prop-types' ;
2
3
import { connect } from 'react-redux' ;
3
4
import { showNotification } from 'baselayer/components/Notifications' ;
4
5
/* eslint-disable */
@@ -75,8 +76,8 @@ class Plot extends Component {
75
76
}
76
77
}
77
78
Plot . propTypes = {
78
- url : React . PropTypes . string . isRequired ,
79
- dispatch : React . PropTypes . func . isRequired
79
+ url : PropTypes . string . isRequired ,
80
+ dispatch : PropTypes . func . isRequired
80
81
} ;
81
82
82
83
Plot = connect ( ) ( Plot ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
+ import PropTypes from 'prop-types' ;
2
3
3
4
const Progress = ( props ) => {
4
5
let response = '' ;
@@ -27,7 +28,7 @@ const Progress = (props) => {
27
28
} ;
28
29
29
30
Progress . propTypes = {
30
- type : React . PropTypes . string . isRequired
31
+ type : PropTypes . string . isRequired
31
32
} ;
32
33
33
34
export 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' ;
2
3
import { connect } from 'react-redux' ;
3
4
import { reduxForm } from 'redux-form' ;
4
5
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
+ import PropTypes from 'prop-types' ;
2
3
import { connect } from 'react-redux' ;
3
4
4
5
let UserProfile = ( props ) => (
@@ -7,8 +8,8 @@ let UserProfile = (props) => (
7
8
</ div >
8
9
) ;
9
10
UserProfile . propTypes = {
10
- style : React . PropTypes . object . isRequired ,
11
- profile : React . PropTypes . object . isRequired
11
+ style : PropTypes . object . isRequired ,
12
+ profile : PropTypes . object . isRequired
12
13
} ;
13
14
14
15
const mapStateToProps = ( state ) => (
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ const myFormReducer = (theirFormReducer) => (
127
127
const field_names = Object . keys ( state . featurize ) . filter (
128
128
( field_name ) => contains ( action . payload . ctgy_list , field_name )
129
129
) ;
130
- const featurizeFormState = Object . assign ( { } , state . featurize ) ;
130
+ const featurizeFormState = { ... state . featurize } ;
131
131
const allAreChecked = ( field_names . filter (
132
132
( el ) => ! featurizeFormState [ el ] . value
133
133
) . length === 0 ) ;
You can’t perform that action at this time.
0 commit comments