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
It seems that the react/style-prop-object rule crashes when the style tag of a <div> is empty with the following error:
CLI:
Cannot read property 'type' of null
TypeError: Cannot read property 'type' of null
at EventEmitter.JSXAttribute (C:\Temp\github\linter-eslint_GH702\node_modules\eslint-plugin-react\lib\rules\style-prop-object.js:70:21)
at emitOne (events.js:96:13)
at EventEmitter.emit (events.js:188:7)
at NodeEventGenerator.enterNode (C:\Temp\github\linter-eslint_GH702\node_modules\eslint\lib\util\node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (C:\Temp\github\linter-eslint_GH702\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:608:23)
at CommentEventGenerator.enterNode (C:\Temp\github\linter-eslint_GH702\node_modules\eslint\lib\util\comment-event-generator.js:97:23)
at Controller.enter (C:\Temp\github\linter-eslint_GH702\node_modules\eslint\lib\eslint.js:918:36)
at Controller.__execute (C:\Temp\github\linter-eslint_GH702\node_modules\estraverse\estraverse.js:397:31)
at Controller.traverse (C:\Temp\github\linter-eslint_GH702\node_modules\estraverse\estraverse.js:501:28)
at Controller.Traverser.controller.traverse (C:\Temp\github\linter-eslint_GH702\node_modules\eslint\lib\util\traverser.js:36:33)
The trace is similar through the Node.js API.
You can reproduce this error with the following configuration:
It seems that the
react/style-prop-object
rule crashes when thestyle
tag of a<div>
is empty with the following error:CLI:
The trace is similar through the Node.js API.
You can reproduce this error with the following configuration:
.eslintrc.js:
package.json:
foo.jsx:
For convenience here is a ZIP file containing the files use to reproduce this: linter-eslint_GH702.zip
Note: This was originally filed as AtomLinter/linter-eslint#702.
The text was updated successfully, but these errors were encountered: