Skip to content


Subversion checkout URL

You can clone with
Download ZIP
JSHint is a tool that helps to detect errors and potential problems in your JavaScript code
JavaScript HTML
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
tests Moved tests for /*jslint to core suite
CHANGELOG Updated the edition and CHANGELOG for the new stable release
jshint.js Updated the edition and CHANGELOG for the new stable release


JSHint, The (Gentler) JavaScript Code Quality Tool

JSHint is a fork of Douglas Crockford's JSLint that does not tyrannize your code. It is designed to detect errors that actually break your code while skipping things that, according to Crockford, “are known to contribute mistakes in projects”. In other words, JSHint is a fork of JSLint for the real world.

For example, JSLint does not tolerate the following constructions:

if (cond) statement();

It expects all blocks to be enclosed in braces ({}):

if (cond) {

JSHint removes that requirement (but it is still available as an option).


The most important part is that JSHint is developed and supported by the JavaScript developers community and not by one very opinionated person.

If you use JSLint and think that it is too strict, use Issues to describe most annoying JSLint gripes you encounter.


JSHint was forked from the JSLint, edition 2010-12-16. The current stable edition is 2011-02-19.


JSHint can be used as a Node module out of the box:

var JSHINT = require("jshint.js").JSHINT;

If you use Rhino, we have a special wrapper script for that:

java -jar /path/to/js.jar env/rhino.js myscript.js


To run tests you will need to install node.js and expresso. You can install the latter with npm:

npm install expresso

After that, running tests is as easy as:

expresso tests/*.js
Something went wrong with that request. Please try again.