source: Dev/trunk/node_modules/grunt-contrib-jshint/docs/jshint-options.md @ 484

Last change on this file since 484 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 1.9 KB
Line 
1# Options
2
3Any specified option will be passed through directly to [JSHint][], thus you can specify any option that JSHint supports. See the [JSHint documentation][] for a list of supported options.
4
5[JSHint]: http://www.jshint.com/
6[JSHint documentation]: http://www.jshint.com/docs/
7
8A few additional options are supported:
9
10## globals
11Type: `Object`
12Default value: `null`
13
14A map of global variables, with keys as names and a boolean value to determine if they are assignable. This is not a standard JSHint option, but is passed into the `JSHINT` function as its third argument. See the [JSHint documentation][] for more information.
15
16## jshintrc
17Type: `String`
18Default value: `null`
19
20If this filename is specified, options and globals defined therein will be used. The `jshintrc` file must be valid JSON and looks something like this:
21
22```json
23{
24  "curly": true,
25  "eqnull": true,
26  "eqeqeq": true,
27  "undef": true,
28  "globals": {
29    "jQuery": true
30  }
31}
32```
33
34*Be aware that `jshintrc` settings are not merged with your Grunt options.*
35
36## extensions
37Type: `String`
38Default value: `''`
39
40A list of non-dot-js extensions to check.
41
42## ignores
43Type: `Array`
44Default value: `null`
45
46A list of files and dirs to ignore. This will override your `.jshintignore` file if set and does not merge.
47
48## force
49Type: `Boolean`
50Default value: `false`
51
52Set `force` to `true` to report JSHint errors but not fail the task.
53
54## reporter
55Type: `String`
56Default value: `null`
57
58Allows you to modify this plugins output. By default it will use a built-in Grunt reporter. Set the path to your own custom reporter or to one of the built-in JSHint reporters: `jslint` or `checkstyle`.
59
60See also: [Writing your own JSHint reporter.](http://jshint.com/docs/reporters/)
61
62## reporterOutput
63Type: `String`
64Default value: `null`
65
66Specify a filepath to output the results of a reporter. If `reporterOutput` is specified then all output will be written to the given filepath instead of printed to stdout.
Note: See TracBrowser for help on using the repository browser.