Closed
Description
[email protected]
[email protected]
[email protected]
Cannot read property 'node' of undefined
TypeError: Cannot read property 'node' of undefined
at /Users/phora/console/node_modules/eslint-plugin-react/lib/rules/no-danger-with-children.js:59:43
at Array.find (native)
at findJsxProp (/Users/phora/console/node_modules/eslint-plugin-react/lib/rules/no-danger-with-children.js:56:25)
at EventEmitter.JSXElement (/Users/phora/console/node_modules/eslint-plugin-react/lib/rules/no-danger-with-children.js:80:14)
at emitOne (events.js:77:13)
at EventEmitter.emit (events.js:169:7)
at NodeEventGenerator.enterNode (/Users/phora/console/node_modules/eslint/lib/util/node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (/Users/phora/console/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
at CommentEventGenerator.enterNode (/Users/phora/console/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
at Controller.enter (/Users/phora/console/node_modules/eslint/lib/eslint.js:898:36)
In my code, likely pooping on
<IntlProvider {...__I18N__}>
where I18N is a webpack global defined by the define plugin
plugins: [
new DefinePlugin({
__I18N__: JSON.stringify({
locale,
messages
}),
...
})
]
.eslintrc whitelists it as a global, I guess the plugin should use that and assume its there...workaround is just assigning that global to a local and using that instead.