ESLint is the answer! (still valid in 2017)
Of course it does not fix bad archietcture, but at least shows, or automaticallly eliminate many developer bad habits, or mistakes.
There is another outstanding issue and it's how to configure ESLint to be linting your files when you are making changes to them.
Answer is quite simple.
Use one of building libraries in NodeJs - for example Webpack, or Grunt with bunch of plugins:
There are few more excellent task runners which you can use - we talked a little about Grunt, but there is also Gulp, Broccoli or npm/yarn itself.
And that's it. This toolset can eliminate many common mistakes while writing code.
Additional check for code can be checking code style. Go to jscs.info to learn more. With this tool you can ensure every developer in team is writing in same style habits.
Update: JSCS has merged with ESLint! So that with ESLint uou can also check code style.
Useful links how to use linter:
Important part of development process is testing. Unit Tests and also Integration Tests. So do not forget about those and spend some effort to cover application.
Unit or integration tests are big topic so I may create another article later. There is also one specific methodology and it's Test Driven Development - just try it.