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
// foo.js
module.exports = { foo: 'foo' }
// bar.js
export { default as foo } from './foo'
// baz.js
import { foo } from './bar'
And try to lint baz.js, I get this:
Cannot read property 'namespace' of undefined
TypeError: Cannot read property 'namespace' of undefined
at /usr/local/lib/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js:73:35
at Array.forEach (native)
at checkSpecifiers (/usr/local/lib/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js:40:21)
at Array.forEach (native)
at EventEmitter.Program (/usr/local/lib/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js:89:19)
at emitOne (events.js:101:20)
at EventEmitter.emit (events.js:188:7)
at NodeEventGenerator.enterNode (/usr/local/lib/node_modules/eslint/lib/util/node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (/usr/local/lib/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:
23)
at CommentEventGenerator.enterNode (/usr/local/lib/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
If I change module.exports to export default in foo.js all works fine.
The text was updated successfully, but these errors were encountered:
Ah, interesting. Yeah, it can't handle anything but ES modules all the way down if you want good messages, but it definitely shouldn't throw exceptions. Will take a look, thanks!
If I have this structure of modules
And try to lint
baz.js
, I get this:If I change
module.exports
toexport default
infoo.js
all works fine.The text was updated successfully, but these errors were encountered: