Last change
on this file since 533 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 | |
---|
3 | Any 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 | |
---|
8 | A few additional options are supported: |
---|
9 | |
---|
10 | ## globals |
---|
11 | Type: `Object` |
---|
12 | Default value: `null` |
---|
13 | |
---|
14 | A 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 |
---|
17 | Type: `String` |
---|
18 | Default value: `null` |
---|
19 | |
---|
20 | If 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 |
---|
37 | Type: `String` |
---|
38 | Default value: `''` |
---|
39 | |
---|
40 | A list of non-dot-js extensions to check. |
---|
41 | |
---|
42 | ## ignores |
---|
43 | Type: `Array` |
---|
44 | Default value: `null` |
---|
45 | |
---|
46 | A list of files and dirs to ignore. This will override your `.jshintignore` file if set and does not merge. |
---|
47 | |
---|
48 | ## force |
---|
49 | Type: `Boolean` |
---|
50 | Default value: `false` |
---|
51 | |
---|
52 | Set `force` to `true` to report JSHint errors but not fail the task. |
---|
53 | |
---|
54 | ## reporter |
---|
55 | Type: `String` |
---|
56 | Default value: `null` |
---|
57 | |
---|
58 | Allows 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 | |
---|
60 | See also: [Writing your own JSHint reporter.](http://jshint.com/docs/reporters/) |
---|
61 | |
---|
62 | ## reporterOutput |
---|
63 | Type: `String` |
---|
64 | Default value: `null` |
---|
65 | |
---|
66 | Specify 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.