-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with default export after update to 2.1.0 #653
Comments
I was going to open the exact same issue.
|
|
@adascal I'm using the exact same versions as you and I'm having the same error with an |
@adascal you're using proposed syntax https://github.com/leebyron/ecmascript-export-default-from - which isn't part of the language, and is only stage 1. Are you using babel-eslint for this? @yvele |
@ljharb Yep. I'm not using PS: |
Ah, gotcha, thanks for clarifying. |
@ljharb, yes, I'm using babel-eslint |
Hmm, I wonder if it's a babel-eslint change... not sure what would get into that situation. Regardless, we've got a bug here. Thanks for reporting! |
So … We can use this way: export { default } from './Map.jsx'; instead export default from './Map.jsx'; cc @adascal |
Until issue has been fixed: import-js/eslint-plugin-import#653
I'm still getting this issue on 2.21.2
|
@CalebDelbridge can you file a new issue? it'd be great if you also provided your eslint/plugin versions, as well as the code that's causing this to crash. |
sometime, this error maybe occured by export enum in ts file, finally I give up use enum to fix the error. but enum is a nice feature,anyone know how to change the lint rule to use enum |
@Jinwan5290 // .eslintrc.js
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn'] |
Hi, after updating from version
2.0.1
to2.1.0
I start getting error for code like:export default from './Map.jsx';
Stack trace:
Node must be provided when reporting error if location is not provided
AssertionError: Node must be provided when reporting error if location is not provided
at EventEmitter.module.exports.api.report (/node_modules/eslint/lib/eslint.js:970:20)
at RuleContext.report (/node_modules/eslint/lib/rule-context.js:144:21)
at EventEmitter.Program:exit (/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js:69:19)
at emitOne (events.js:101:20)
at EventEmitter.emit (events.js:188:7)
at NodeEventGenerator.leaveNode (/node_modules/eslint/lib/util/node-event-generator.js:49:22)
at CodePathAnalyzer.leaveNode (/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:628:23)
at CommentEventGenerator.leaveNode (/node_modules/eslint/lib/util/comment-event-generator.js:110:23)
at Controller.leave (/node_modules/eslint/lib/eslint.js:930:36)
at Controller.__execute (/node_modules/estraverse/estraverse.js:397:31)
The text was updated successfully, but these errors were encountered: