When I audit a project, I clean up first
When I audit a project, I clean up first.
1. Run cspell to fix spelling issues
2. Remove unused vars and imports
3. Remove "dead" code (commented or uncalled)
4. Fix poor naming
5. Colocate related things
After these changes, the code is easier to read and navigate.
I think of this practice like cleaning the kitchen before cooking.
If the counter is covered in random garbage, it's hard to make a meal. Once things are clean and orderly, it's easier to focus on the task at hand.