Skip to content
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

import/no-unused-modules with unusedExports: true flag destructured array exports as undefined #1683

Closed
astorije opened this issue Mar 12, 2020 · 2 comments

Comments

@astorije
Copy link
Contributor

astorije commented Mar 12, 2020

Given the following code:

export const [foobar] = foobarFactory();

import/no-unused-modules with the unusedExports: true option will report:

error  exported declaration 'undefined' not used within other modules  import/no-unused-modules

This is true whether or not foobar is being imported anywhere else.

@ljharb
Copy link
Member

ljharb commented Apr 23, 2020

Thanks, this is clearly a bug; we probably didn't anticipate exporting and destructuring in the same line.

@ljharb
Copy link
Member

ljharb commented Apr 23, 2020

hmm, this test case passes on latest master. Perhaps it's already been fixed for the next release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants