File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 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');
88const util = require ( 'util' ) ;
99
1010const Components = require ( '../util/Components' ) ;
11+ const arrayIncludes = require ( 'array-includes' ) ;
1112const astUtil = require ( '../util/ast' ) ;
1213const docsUrl = require ( '../util/docsUrl' ) ;
1314
@@ -158,7 +159,7 @@ module.exports = {
158159 if ( method . instanceMethod ) {
159160 methodGroupIndexes . push ( groupIndex ) ;
160161 }
161- } else if ( [
162+ } else if ( arrayIncludes ( [
162163 'displayName' ,
163164 'propTypes' ,
164165 'contextTypes' ,
@@ -185,7 +186,7 @@ module.exports = {
185186 'componentDidCatch' ,
186187 'componentWillUnmount' ,
187188 'render'
188- ] . includes ( currentGroup ) ) {
189+ ] , currentGroup ) ) {
189190 if ( currentGroup === method . name ) {
190191 methodGroupIndexes . push ( groupIndex ) ;
191192 }
Original file line number Diff line number Diff line change 2424 "homepage" : " https://github.com/yannickcr/eslint-plugin-react" ,
2525 "bugs" : " https://github.com/yannickcr/eslint-plugin-react/issues" ,
2626 "dependencies" : {
27+ "array-includes" : " ^3.0.3" ,
2728 "doctrine" : " ^2.1.0" ,
2829 "has" : " ^1.0.3" ,
2930 "jsx-ast-utils" : " ^2.0.1" ,
You can’t perform that action at this time.
0 commit comments