Web Dev Tools 101: Linters

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?

Most programming languages have some sort of lint either built in to the language (like Python), an IDE (think Visual Studio and the Code Analysis feature) or as an external program. Given the loose nature of Javascript in the past, you need to be able to pre-process your files so that you can ensure they are not only syntactically correct but also not falling into the common pitfalls of programming in Javascript.

The short version – use lint and use it often.

Now, what are the candidates?


JSLint is the grand-daddy of the javascript linters, written by Douglas Crockford, who also happened to write one of my favorite Javascript books. If we were purely talking about ECMAScript 5, then this is the gold-standard in this category. It contains a huge collection of rules that define a “professional subset of Javascript” – this sort of advice is invaluable for the beginner programmer and a great resource even for an experienced developer. It has support for both grunt and gulp so you can easily integrate it into your workflow.

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.

The Verdict

It’s rare that there is an absolute winner in the tools category, but there is one here. Your choice should be ESLint.