I spend a decent amount of time reviewing code at work. After a while I get tired of reminding developers that the opening brace for an if statement goes in the same line. JSLint and JSHint do a good job of preventing developers from doing things that would break your code but it doesn’t really allow you to enforce coding conventions the way I wanted.
I was looking for a way to create custom rules for JSHint so I could enforce our team conventions but after some research I found that it is not possible and it is not something we should expect from the project. It seems like Nicholas Zakas wanted the same thing as me and he didn’t find it, so he built it. That is how ESLint was born. It is a relatively new project but I gave it a try and it seems to work very well.
You can use npm to install it globally:
1 npm i -g eslint