question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: `no-restricted-exports` fails on `export { default, ... } from ...`

See original GitHub issue

Environment

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

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:open
  • Created 2 years ago
  • Reactions:4
  • Comments:26 (21 by maintainers)

github_iconTop GitHub Comments

5reactions
upeguiborjacommented, Jul 15, 2022

Hi @amareshsm are you still working on this?

5reactions
amareshsmcommented, May 21, 2022

@patcon I would like to work on this feature. let me know if anyone working on this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found