Skip to content

[import/no-unused-modules] Add an option to ignore typescript types #2694

@demedos

Description

@demedos

Hi, when using typescript it might be useful to add an option to ignore exported but unused types (including interfaces and enumerators) since it is common to export a component along with its props and let the consumer create derivative types for example.

This is something that has been implemented in ts-unused-exports via the allowUnusedEnums and allowUnusedTypes options.

Looking through the code I found out that typescript types are being handled already, see src/rules/no-unused-modules.js#L89.

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