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

[New] no-unused-modules: consider exported TypeScript interfaces, types and enums #1819

Merged

Conversation

nicolashenry
Copy link
Contributor

@nicolashenry nicolashenry commented Jun 11, 2020

Fixes #1680

Note that babel-eslint parser does not handle typescript enums and do not produce the same declaration types as @typescript-eslint/parser.

babel-eslint => InterfaceDeclaration, TypeAlias
@typescript-eslint/parser => TSInterfaceDeclaration, TSTypeAliasDeclaration, TSEnumDeclaration

…ypes and enums

Fixes import-js#1680

Co-authored-by: e020873 <nicolas.henry-partner@arcelormittal.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
@coveralls
Copy link

coveralls commented Jun 11, 2020

Coverage Status

Coverage increased (+0.003%) to 97.804% when pulling 54eb51b on nicolashenry:feature/consider-interfaces-types-enums into ec5195e on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 97.806% when pulling 98ea37e on nicolashenry:feature/consider-interfaces-types-enums into f53e872 on benmosher:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 97.806% when pulling 98ea37e on nicolashenry:feature/consider-interfaces-types-enums into f53e872 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 97.806% when pulling 98ea37e on nicolashenry:feature/consider-interfaces-types-enums into f53e872 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 97.806% when pulling 98ea37e on nicolashenry:feature/consider-interfaces-types-enums into f53e872 on benmosher:master.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I added in a minor refactor to avoid duplication.

@ljharb ljharb changed the title consider exported TypeScript interfaces, types and enums [Fix] no-unused-modules: consider exported TypeScript interfaces, types and enums Jun 11, 2020
@ljharb ljharb changed the title [Fix] no-unused-modules: consider exported TypeScript interfaces, types and enums [New] no-unused-modules: consider exported TypeScript interfaces, types and enums Jun 11, 2020
@ljharb ljharb force-pushed the feature/consider-interfaces-types-enums branch from f064772 to 54eb51b Compare June 11, 2020 23:04
@ljharb ljharb merged commit 54eb51b into import-js:master Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

no-unused-modules does not consider exported TypeScript interfaces, types and enums
3 participants