Skip to content

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

@astorije

Description

@astorije

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions