Sometimes when people want to know of how good your code is, they ask "what is your test coverage". Ok, that tells part of the truth but, especially for front-end code, not everything.
When you've been maintaining the same system for three years, after a while some of the code will be legacy code. And you cannot replace it all. You need to learn to live with it.
So how do we maintain code quality in a lean project?