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: Add ignoreUnusedTypeExports option #3011

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

silverwind
Copy link
Contributor

Fixes: #2694

@silverwind
Copy link
Contributor Author

Will tweak tests a bit.

@silverwind
Copy link
Contributor Author

Ok, tests are fine now.

@ljharb
Copy link
Member

ljharb commented May 28, 2024

This seems great, except that it's best when boolean arguments default to false. Can you come up with an alternative name for it so it can default to false?

@silverwind
Copy link
Contributor Author

This seems great, except that it's best when boolean arguments default to false. Can you come up with an alternative name for it so it can default to false?

Hmm I could invert the name and function but thought that the current name matches nicely into the existing options missingExports and unusedExports.

@silverwind silverwind changed the title [New] no-unused-modules: Add unusedTypeExports option [New] no-unused-modules: Add ignoreUnusedTypeExports option May 28, 2024
@silverwind
Copy link
Contributor Author

Inverted it, so now it's ignoreUnusedTypeExports defaulting to false.

@ljharb
Copy link
Member

ljharb commented May 28, 2024

Your original option name definitely did match better, but i prioritize booleans defaulting to false over option names :-) thanks!

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.02%. Comparing base (fc361a9) to head (e96db1a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3011   +/-   ##
=======================================
  Coverage   96.02%   96.02%           
=======================================
  Files          78       78           
  Lines        3296     3299    +3     
  Branches     1158     1160    +2     
=======================================
+ Hits         3165     3168    +3     
  Misses        131      131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@silverwind
Copy link
Contributor Author

This CI failures seem intermittent and the coverage annotation "Added line #L518 was not covered by tests" is incorrect, I verified the line is being hit during tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[import/no-unused-modules] Add an option to ignore typescript types
2 participants