Skip to content

Commit fb16cee

Browse files
committed
Document .jshintignore
1 parent 88c019d commit fb16cee

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

pages/cli.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,24 @@ statements](/docs/options#expr) for only those files ending in `-test.js`:
113113

114114
### Ignoring Files
115115

116-
TODO
116+
`jshint` can be configured to ignore files based on their location in the
117+
filesystem. You may create a dedicated "ignore" file to list any number of file
118+
names, file paths, or file path patterns that should not be linted. Path
119+
patterns will be interpreted using [the `minimatch` npm
120+
module](https://www.npmjs.com/package/minimatch), which itself is based on [the
121+
Unix filename matching syntax, fnmatch](http://linux.die.net/man/3/fnmatch).
122+
123+
build/
124+
src/**/tmp.js
125+
126+
`jshint` will look for this configuration in a number of locations, stopping at
127+
the first positive match:
128+
129+
1. The location specified with the `--exclude-path` [flag](#flags)
130+
2. A file named `.jshintignore` located in the current directory or any parent
131+
of the current directory
132+
133+
If this search yields no results, `jshint` will not ignore any files.
117134

118135
<a name="flags"></a>
119136

0 commit comments

Comments
 (0)