JavaScript code standards checker

136 Views Asked by At

Are there any code standards/style guide checkers for JavaScript?

Basically, the equivalent of PHP_CodeSniffer, but for JavaScript.

2

There are 2 best solutions below

0
On BEST ANSWER

There is an open source one called jscs, no experience with it though:

https://github.com/mdevils/node-jscs

It offers NPM (node.js) and Grunt packages for download.

1
On

Google JSLint, JSHint. Those are somewhat subjective though, especially JSLint.

Personally, I would recommend JSHint because it's community maintained. Also it has node.js-based CLI tools for code validation.