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
Windows 10, node v.8.9.3, eslint-plugin-react v. 7.5.1, ESLint v.3.19.0
Error
Cannot read property 'properties' of undefined
TypeError: Cannot read property 'properties' of undefined
at EventEmitter.MemberExpression (C:\MyProject\node_modules\eslint-plugin-react\lib\rules\boolean-prop-naming.js:163:46)
at emitOne (events.js:121:20)
at EventEmitter.emit (events.js:211:7)
at NodeEventGenerator.applySelector (C:\MyProject\node_modules\eslint\lib\util\node-event-generator.js:265:26)
at NodeEventGenerator.applySelectors (C:\MyProject\node_modules\eslint\lib\util\node-event-generator.js:294:22)
at NodeEventGenerator.enterNode (C:\MyProject\node_modules\eslint\lib\util\node-event-generator.js:308:14)
at CodePathAnalyzer.enterNode (C:\MyProject\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:602:23)
at CommentEventGenerator.enterNode (C:\MyProject\node_modules\eslint\lib\util\comment-event-generator.js:98:23)
at Traverser.enter (C:\MyProject\node_modules\eslint\lib\eslint.js:929:36)
at Traverser.__execute (C:\MyProject\node_modules\estraverse\estraverse.js:397:31)
How to reproduce?
eslintrc.js
This happens with "any" rules given to react/boolean-prop-naming, for example: "react/boolean-prop-naming": ["error", { "rule": "^is[A-Z]([A-Za-z0-9]?)+", "propTypeNames": ["bool"] }].
file_to_be_linted.js
I was using copy-pasted Icon component. The ~minimal code to reproduce the error is
The problem is very similar to #1452 and #1354.
System setup
Windows 10, node v.8.9.3, eslint-plugin-react v. 7.5.1, ESLint v.3.19.0
Error
How to reproduce?
eslintrc.js
This happens with "any" rules given to
react/boolean-prop-naming
, for example:"react/boolean-prop-naming": ["error", { "rule": "^is[A-Z]([A-Za-z0-9]?)+", "propTypeNames": ["bool"] }]
.file_to_be_linted.js
I was using copy-pasted Icon component. The ~minimal code to reproduce the error is
Minimal changes to fix the error
Use a copy-pasted (not calculated) object literal inside the values in
contextTypes
. For example:The text was updated successfully, but these errors were encountered: