-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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] Add an option to ignore typescript types #2694
Comments
Is this something that |
Nope, there's nothing such as unused exports |
Might be a bit more effort than just ignoring types entirely, but it would be cool if this could mark types referenced from used exports as used (ie. in the component/props example, the props type could be marked as used if the component itself is used). Might still want an option to enable this, though it seems like it would allow us to preserve some of the safety of this rule. |
I think adding a |
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
andallowUnusedTypes
options.Looking through the code I found out that typescript types are being handled already, see src/rules/no-unused-modules.js#L89.
The text was updated successfully, but these errors were encountered: