You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems that if I declare a union type for my props, this plugin dies:
$ eslint --fix src/ test/
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at iterateProperties (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint-plugin-react/lib/rules/prop-types.js:363:22)
at declarePropTypesForObjectTypeAnnotation (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint-plugin-react/lib/rules/prop-types.js:744:7)
at propTypes.types.some.annotation (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint-plugin-react/lib/rules/prop-types.js:783:16)
at Array.some (<anonymous>)
at declarePropTypesForIntersectionTypeAnnotation (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint-plugin-react/lib/rules/prop-types.js:766:30)
at markPropTypesAsDeclared (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint-plugin-react/lib/rules/prop-types.js:864:35)
at Program:exit.classExpressions.forEach.node (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint-plugin-react/lib/rules/prop-types.js:1123:13)
at Array.forEach (<anonymous>)
at Program:exit (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint-plugin-react/lib/rules/prop-types.js:1121:26)
at listeners.(anonymous function).forEach.listener (/Users/edwarddrapkin/projects/flex-mobile-head/node_modules/eslint/lib/util/safe-emitter.js:47:58)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Seems that if I declare a union type for my props, this plugin dies:
This type declaration triggers the error:
This one does not, but is less useful:
I'm on version 7.7.0.
The text was updated successfully, but these errors were encountered: