jshint

Fuck me. Ok, so first there was JSLint, then supposedly JsHint was better, then ESLint. Who knows what to use now. Personally, I’m using StandardJS that uses ESLint under the hood. So, ignore the rest of the page, install StandardJS, and get on with your life.

Jshint is a code quality checker that is considered to be better than the original, jslint.

It can be run about a million different ways; in your code editor, in the browser, on the web, in a build tool, etc. I like it in a code editor since that is where you will fix the problems anyway.

Configuration

You can place linting settings:

There are many settings available to you, but a good starting point is listed below.

*.js file

/*globals $, require */

package.json

"jshintConfig": {
	"curly": true,
	"forin": true,
	"funcscope": true,
	"undef": true,
	"unused": true,
	"devel": true,
	"browser": true,
	"jquery": true
}