Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

CLI and NPM package for JSHint

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 build
Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 packages
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 CHANGELOG.md
Octocat-spinner-32 HELP
Octocat-spinner-32 Jakefile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
README.md

node-jshint

A command line interface and npm package for jshint.

Install

To use jshint from any location (for npm v1.x) you need to install using the global (-g) flag.

npm install -g jshint

Usage

The command line interface looks like this.

jshint path path2 [options]

You can also require JSHint itself as a module.

var jshint = require('jshint');

Note: If you are using npm v1.x be sure to install jshint locally (without the -g flag) or link it globally.

Custom Reporters

Specify a custom reporter module (see example/reporter.js).

--reporter path/to/reporter.js

Use a jslint compatible xml reporter.

--jslint-reporter

Custom Options

Specify custom lint options (see example/config.json).

--config path/to/config.json

Note: This bypasses any .jshintrc files.

Default Options

The CLI uses the default options that come with JSHint. However, if it locates a .jshintrc file in your home directory (~/) it will use those options first.

Per Directory Options

If there is a .jshintrc file in the current working directory, any of those options will take precedence over (or be merged with) any options found in the ~/.jshintrc file (if it exists).

Installing dependencies for development

npm install argparser jasmine-node
git submodule init
git submodule update

Running Tests

jake test
Something went wrong with that request. Please try again.