Skip to content

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

@emreboga

Description

@emreboga

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy