DEV Community

Cover image for Bring out yer dead!
Marko V
Marko V

Posted on

1 1

Bring out yer dead!

This is the post about the necessary cleaning. The spring cleaning of your code. Removing dead code paths, removing unused files... our conversion/migration towards angular (typescript) from AngularJS is starting to make way. I removed sooo many files from the application (that really ought to have been done when they were made into components instead) but, as always, there's some aftermath/cleanup to do regardless.

I removed dead code paths in entire block of scripts, not touching the components that are in use because those will be covered when linting for "no-unused-var" for instance. I removed scripts that were bundled, but no longer in use since they were made into components...

"But I'm not dead!"

Similarly I found scripts that might have been in use at first glance, so I had to search and make sure that the code was not being in use anywhere (a custom event extension for IE11 for instance) as well as scripts that were not removed but also were not included in the MVC Script bundling so they could be safely removed.

I let eslint auto-fix files for whitespace/indent issues, missing semi-colons and dot-annotation conversions.

And lastly i added .eslintignore for webpack and vendor folders. Our errors went from 132k linting errors down to 621.

Drastic difference.

P.S.
Webpack doesnt do linting very well in it's output.
D.S.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay