News for hackers. Stuff that matters.
Re:Show HN: ts-remove-unused – Remove unused code from your ... by joseferben on Thursday September 19, 2024 @04:10AM (#41589648)
really nice that you're tool focuses on removing. i've been using https://knip.dev/ for detection in monorepos, but it's cumbersome to remove manually.
Re:Show HN: ts-remove-unused – Remove unused code from your ... by Cannabat on Thursday September 19, 2024 @04:55AM (#41589913)
Knip does have some auto fix capabilities but it’s not perfect yet. The detection is great, though. I use it with `dpdm` to keep things tidy. With these (plus eslint, prettier and typescript) in CI, I feel all warm and fuzzy.

OP, can you describe differences from knip?

Re:Show HN: ts-remove-unused – Remove unused code from your ... by kazushisan on Thursday September 19, 2024 @08:18AM (#41591032)
My understanding is that Knip is for detecting unused things and that it's auto-fix feature is still experimental, but with that out of the way...

- In general, I personally do not like the idea of having to add another config file in my repo. I feel it's contradictory that I need to add more to my codebase to clean up the clutter in my codebase. I understand that relying on tsconfig to specify the target files has its pros and cons but I hope that my tool will encourage users to maintain their tsconfig. - Knip has its own ecosystem around removing unused stuff in your codebase (not limited to exports). I personally prefer tools that are more single-purposed and does one thing right so I don't have any ideas for expanding features; It will be focused on auto-fixing unused code caused by unncessary `export`s.

Re:Show HN: ts-remove-unused – Remove unused code from your ... by Cannabat on Thursday September 19, 2024 @10:14AM (#41592095)
Thanks for for the detailed answer. I'll try it out some time :)