Just file a new bugtracker ticket or whatever that says "Clean up foo.js, it does Bad Thing A and Bad Thing B"?
There are processes for sustaining code architecture reviews and paying back tech debt, but if you're in a team that's merging obviously terrible code you might not be large enough to want that kind of structure.