File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const has = require('has');
8
8
const util = require ( 'util' ) ;
9
9
10
10
const Components = require ( '../util/Components' ) ;
11
+ const arrayIncludes = require ( 'array-includes' ) ;
11
12
const astUtil = require ( '../util/ast' ) ;
12
13
const docsUrl = require ( '../util/docsUrl' ) ;
13
14
@@ -158,7 +159,7 @@ module.exports = {
158
159
if ( method . instanceMethod ) {
159
160
methodGroupIndexes . push ( groupIndex ) ;
160
161
}
161
- } else if ( [
162
+ } else if ( arrayIncludes ( [
162
163
'displayName' ,
163
164
'propTypes' ,
164
165
'contextTypes' ,
@@ -185,7 +186,7 @@ module.exports = {
185
186
'componentDidCatch' ,
186
187
'componentWillUnmount' ,
187
188
'render'
188
- ] . includes ( currentGroup ) ) {
189
+ ] , currentGroup ) ) {
189
190
if ( currentGroup === method . name ) {
190
191
methodGroupIndexes . push ( groupIndex ) ;
191
192
}
Original file line number Diff line number Diff line change 24
24
"homepage" : " https://github.com/yannickcr/eslint-plugin-react" ,
25
25
"bugs" : " https://github.com/yannickcr/eslint-plugin-react/issues" ,
26
26
"dependencies" : {
27
+ "array-includes" : " ^3.0.3" ,
27
28
"doctrine" : " ^2.1.0" ,
28
29
"has" : " ^1.0.3" ,
29
30
"jsx-ast-utils" : " ^2.0.1" ,
You can’t perform that action at this time.
0 commit comments