File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 13
13
"react/forbid-prop-types": 0,
14
14
"react/sort-comp": 0,
15
15
"jsx-a11y/no-static-element-interactions": 0,
16
- "import/no-extraneous-dependencies": 0
16
+ "import/no-extraneous-dependencies": ["error", {
17
+ "devDependencies": ["**/__tests__/*-test.js"],
18
+ "optionalDependencies": false
19
+ }]
17
20
}
18
21
}
Original file line number Diff line number Diff line change 53
53
"cross-env" : " ^3.0.0" ,
54
54
"enzyme" : " ^2.3.0" ,
55
55
"eslint" : " ^3.5.0" ,
56
- "eslint-config-airbnb" : " ^11 .0.0" ,
56
+ "eslint-config-airbnb" : " ^12 .0.0" ,
57
57
"eslint-plugin-import" : " ^1.8.0" ,
58
58
"eslint-plugin-jsx-a11y" : " ^2.2.2" ,
59
59
"eslint-plugin-react" : " ^6.2.1" ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export default class Tabs extends Component {
39
39
40
40
constructor ( props ) {
41
41
super ( props ) ;
42
- this . state = this . copyPropsToState ( this . props , this . state ) ;
42
+ this . state = Tabs . copyPropsToState ( this . props , this . state ) ;
43
43
}
44
44
45
45
getChildContext ( ) {
@@ -52,7 +52,7 @@ export default class Tabs extends Component {
52
52
// Use a transactional update to prevent race conditions
53
53
// when reading the state in copyPropsToState
54
54
// See https://github.com/reactjs/react-tabs/issues/51
55
- this . setState ( state => this . copyPropsToState ( newProps , state ) ) ;
55
+ this . setState ( state => Tabs . copyPropsToState ( newProps , state ) ) ;
56
56
}
57
57
58
58
setSelected ( index , focus ) {
@@ -257,7 +257,7 @@ export default class Tabs extends Component {
257
257
} ;
258
258
259
259
// This is an anti-pattern, so sue me
260
- copyPropsToState ( props , state ) {
260
+ static copyPropsToState ( props , state ) {
261
261
let selectedIndex = props . selectedIndex ;
262
262
263
263
// If no selectedIndex prop was supplied, then try
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ describe('react-tabs', () => {
190
190
it ( 'should not clone non tabs element' , ( ) => {
191
191
class Demo extends React . Component {
192
192
render ( ) {
193
- const plus = < div ref = "yolo" > +</ div > ;
193
+ const plus = < div ref = "yolo" > +</ div > ; // eslint-disable-line react/no-string-refs
194
194
195
195
return ( < Tabs >
196
196
< TabList >
You can’t perform that action at this time.
0 commit comments