-
Notifications
You must be signed in to change notification settings - Fork 121
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
chore: add command to show unused exports #426
Conversation
Codecov Report
@@ Coverage Diff @@
## master #426 +/- ##
=========================================
+ Coverage 77.85% 78.1% +0.24%
=========================================
Files 81 91 +10
Lines 4209 4320 +111
Branches 894 872 -22
=========================================
+ Hits 3277 3374 +97
- Misses 920 933 +13
- Partials 12 13 +1
Continue to review full report at Codecov.
|
I can see the potential of this, but there are a lot of false negative to deal with:
I think we have to wait for that until this nadeesha/ts-prune#14 is solved first |
No rush on this, we can wait for the fix, though it seems to not cause harm and I like an explicit enlisting of useful if imperfect log commands in
My intent wasn't to automatically cull exports, just to see if there are exports that need some action, such as either removing the exporting, removing the entire
Good issue find in the |
jenkins retest this please |
jenkins retest this please |
Closing it in favor of Marco's PR #461 |
Updated the following dev dependencies: babel, @elastic/eui, semantic-release, typescript-eslint, eslint, husky. Added ts-prune close #426
🎉 This issue has been resolved in version 15.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Invoke ts-prune with
yarn ts:prune
to output unused exports in the console. The library name and its description is a misnomer as it doesn't remove anything but if there's a short, easy to remember thing instead ofts:prune
it can change, name suggestions are welcome!Checklist
[ ] Any consumer-facing exports were added tosrc/index.ts
(and stories only import from../src
except for test data & storybook)This was checked for cross-browser compatibility, including a check against IE11Proper documentation or storybook story was added for features that require explanation or tutorialsUnit tests were updated or added to match the most common scenarios