DEV Community

Minh Quy
Minh Quy

Posted on

Detecting deadcode in your project

Our frontend stack is using react (webpack) and after one year, our codebase becomes quite huge. My company is a startup, you know as startup we might change our flow quite often, it leads to a lot of code are not used anymore and we want to clean them as much as possible. After spending few weeks to research, I found several approaches to attack that problem, therefore, I wrote this blog

What do you think about those approaches?
What do you use to detect deadcode in your project?

Top comments (2)

rhymes profile image

Another option: tests code coverage. It won't tell you about the dead imports but if you look at the code coverage report and a file has a low coverage it's either an untested section or dead code :-)

mquy profile image
Minh Quy

agree, that could be one of approaches for deadcode 👍🏻