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

no-unused-exports rule shows an false error when using destructured array exports: exported declaration 'undefined' not used within other modules #2930

Closed
emreboga opened this issue Nov 26, 2023 · 0 comments

Comments

@emreboga
Copy link

This issue is result of an incomplete fix for #2037.
Reposting my comment here for visibility:

I don't think the issue was fully fixed by #1997 as it only addresses object type destucturing, not including array types. You can see it in the code:
https://github.com/import-js/eslint-plugin-import/pull/1997/files#diff-7d2908b010ec724c0f3a0d7615cb91f4673d765d52c6ba6607501e23470f2966R85

I'm seeing this in the code with the version 2.28.1, which has the fix with #1997. Here is a code chunk I have:

export const [authUserLoading, authUserError] = createLoadingAndErrorSelectors(
  AUTH_USER
);

and here is the error I get:

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

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

No branches or pull requests

1 participant