A linter is a syntax checker. You need to use one. Options are available. Questions?
Use the ESLint tool and integrate it into your build process with grunt or gulp. Use it often.
Why do I care?
The short version – use lint and use it often.
Now, what are the candidates?
It does fall down on the ECMAScript 6 resources though. JSLint supports only a very small subset of the ECMAScript 6 standard. The other place it falls down is in the set of rules to include. It implements “one mans opinion” and that opinion is not shared by everyone.
If you are using Visual Studio then you are likely to be familiar with JSCS as this tool is integrated with Web Essentials (and you should definitely be using Web Essentials). I actually find the implementation in Web Essentials annoying with conflicting rules enabled, so I can’t really recommend it. In fact, I recommend turning it off.
If you are using ECMAScript 6 then this is the linter for you. ESLint is a good option in general, but I love that it supports the complete ECMAScript 6 standard. It has support for grunt and gulp so that it is easily integrated into your build process.
Downside is that it isn’t supported in Web Essentials (go vote for the feature!), but thats relatively minor given that Visual Studio is going over to grunt and gulp.
It’s rare that there is an absolute winner in the tools category, but there is one here. Your choice should be ESLint.