File tree 2 files changed +6
-6
lines changed 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,11 @@ You should also specify settings that will be shared across all the plugin rules
42
42
" version" : " 15.0" , // React version, default to the latest React stable release
43
43
" flowVersion" : " 0.53" // Flow version
44
44
},
45
- " propWrapperFunctions" : [ // The names of any functions used to wrap the
46
- " forbidExtraProps" , // propTypesObject, e.g. `forbidExtraProps`
47
- {" property" : " freeze" , " object" : " Object" } // If this isn't set, any propTypes wrapped in
48
- {" property" : " myFavoriteWrapper" } // a function will be skipped.
45
+ " propWrapperFunctions" : [
46
+ // The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
47
+ " forbidExtraProps" ,
48
+ {" property" : " freeze" , " object" : " Object" }
49
+ {" property" : " myFavoriteWrapper" }
49
50
]
50
51
}
51
52
}
Original file line number Diff line number Diff line change @@ -10,13 +10,12 @@ function getPropWrapperFunctions(context) {
10
10
function isPropWrapperFunction ( context , name ) {
11
11
const propWrapperFunctions = getPropWrapperFunctions ( context ) ;
12
12
const splitName = name . split ( '.' ) ;
13
- const found = Array . from ( propWrapperFunctions ) . find ( func => {
13
+ return Array . from ( propWrapperFunctions ) . some ( func => {
14
14
if ( splitName . length === 2 && func . object === splitName [ 0 ] && func . property === splitName [ 1 ] ) {
15
15
return true ;
16
16
}
17
17
return name === func || func . property === name ;
18
18
} ) ;
19
- return Boolean ( found ) ;
20
19
}
21
20
22
21
module . exports = {
You can’t perform that action at this time.
0 commit comments