Bug: `no-restricted-exports` fails on `export { default, ... } from ...`
See original GitHub issueEnvironment
Node version: v14.18.1 npm version: v8.3.0 Local ESLint version: v8.9.0 (Currently used) Global ESLint version: Not found Operating System: darwin 20.6.0
What parser are you using?
Default (Espree)
What did you do?
Minimal reproduction repo here: https://github.com/patcon/eslint-bug-reproduction-default-export
What did you expect to happen?
Expected npm run lint
to pass, since
export { default, function2 } from 'bar.js';
is just an alternative format, recommended in Mozilla web MDN docs 😃
What actually happened?
Both forms of this default failed:
![Screen Shot 2022-02-17 at 3 51 58 PM](https://user-images.githubusercontent.com/305339/154568740-471fe540-d40c-4041-bcb2-175bd7b33da9.png)
Participation
- I am willing to submit a pull request for this issue.
Additional comments
Re-ticketed from https://github.com/airbnb/javascript/issues/2500
Thanks a bunch! Open to pointers in the right direction, or just affirmation that this is a bug 🎉 🐛
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:26 (21 by maintainers)
Top Results From Across the Web
no-restricted-exports - ESLint - Pluggable JavaScript Linter
Rule Details. This rule disallows specified names from being used as exported names. Options. By default, this rule doesn't disallow any names.
Read more >ESLint error: 'default' is restricted from being used as an ...
You cannot export default because it's a reserved keyword. You could replace the line with : export { default as Test } from...
Read more >Disallow specified names in exports (no-restricted-exports)
Rule Details. This rule disallows specified names from being used as exported names. Options. By default, this rule doesn't disallow any names.
Read more >JS.BASE.NO.RESTRICTED.EXPORTS
This rule disallows specified names from being used as exported names. Options. By default, this rule doesn't disallow any names. Only the names...
Read more >export 'default' (imported as) was not found in ... - YouTube
Solve this error in your React or React Native project. Professional JavaScript Course: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @amareshsm are you still working on this?
@patcon I would like to work on this feature. let me know if anyone working on this.