falling-fruit-web icon indicating copy to clipboard operation
falling-fruit-web copied to clipboard

Remove unused code

Open ezwelty opened this issue 1 year ago • 6 comments

I notice that there are quite a few unused code elements lingering around. For example Slider and ProgressBarStep. A good approach would be to use a tool to find these programmatically:

  • Upgrade project to Node.js v18.18.0 or higher
  • Add knip (https://knip.dev/overview/getting-started)
  • Set it up to lint the project

ezwelty avatar Apr 29 '25 08:04 ezwelty

Hi, I'd love to work on this refactoring. Could you please assign it to me?

Thirukumaran-T avatar May 04 '25 04:05 Thirukumaran-T

@Thirukumaran-T Thanks for your interest in the project. Sure, go for it!

ezwelty avatar May 05 '25 07:05 ezwelty

@Thirukumaran-T how are you doing with this issue? Were you able to clone the project and run it locally?

wbazant avatar May 15 '25 11:05 wbazant

Hello,

I took a look at this issue and I am seeing breaking changes when upgrading to Node.js v18.18.0.

Instead of following the suggestion of adding it as a linter, I ran knip locally without installing and it returned a list of seemingly unused components.

Would you prefer that this issue be closed by keeping the node version the same and having items removed or upgrading project along with associated breaking changes to have the linter available going forward?

I would suggest we remove unused components(files) and delete unused dependencies from the package.json for the time being.

Associated fork that does those recommendations. Fork

Attached is pdf of the output from knip.

KnipOutput.pdf

Thanks,

Nic

MonstersInc-sudo avatar Jul 05 '25 03:07 MonstersInc-sudo

Hi @MonstersInc-sudo , I looked at your fork, thanks for catching these - I looked through the list and it seems about right. Some of it was unfortunately me, looks like I renamed ConnectSearchParams and either didn't delete the old file or brought it back when merging. Feel free to submit a PR, and we can make a separate task to update node and add the linter.

wbazant avatar Jul 05 '25 09:07 wbazant

Actually, don't remove ecosystem.config.js, Ethan added that and it looks like there's an intention behind the file being there.

wbazant avatar Jul 05 '25 09:07 wbazant