File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -58,19 +58,14 @@ module.exports = {
58
58
}
59
59
60
60
function isPropTypesPackage ( node ) {
61
- // Note: we really do want == with the package names here,
62
- // since we need value equality, not identity - and
63
- // these values are always string or null.
64
- /* eslint-disable eqeqeq */
65
61
return (
66
62
node . type === 'Identifier' &&
67
- node . name == propTypesPackageName
63
+ node . name === propTypesPackageName
68
64
) || (
69
65
node . type === 'MemberExpression' &&
70
66
node . property . name === 'PropTypes' &&
71
- node . object . name == reactPackageName
67
+ node . object . name === reactPackageName
72
68
) ;
73
- /* eslint-enable eqeqeq */
74
69
}
75
70
76
71
/* eslint-disable no-use-before-define */
@@ -158,7 +153,7 @@ module.exports = {
158
153
node . specifiers
159
154
. filter ( specifier => specifier . imported && specifier . imported . name === 'PropTypes' )
160
155
. map ( specifier => specifier . local . name )
161
- ) : null ;
156
+ ) [ 0 ] : null ;
162
157
}
163
158
} ,
164
159
You can’t perform that action at this time.
0 commit comments