Navigation Menu

Skip to content

Commit

Permalink
support node 0.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
brentlintner committed Oct 12, 2011
1 parent 664b5b4 commit 3e198e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -59,7 +59,7 @@ If there is a .jshintrc file in the current working directory, any of those opti

If there is a .jshintignore file in the current working directory, then any directories or files will be skipped over.

Note: Pattern matching uses fnmatch, with the FNM_PATHNAME & FNM_CASEFOLD [flags](https://github.com/isaacs/node-glob/blob/master/README.md). When there is no match, it performs a left side match (when no forward slashes present and path is a directory).
Note: Pattern matching uses minimatch, with the nocase [option](https://github.com/isaacs/minimatch). When there is no match, it performs a left side match (when no forward slashes present and path is a directory).

## Installing dependencies for development

Expand Down
4 changes: 2 additions & 2 deletions lib/hint.js
@@ -1,5 +1,5 @@
var fs = require('fs'),
glob = require('glob'),
minimatch = require('minimatch'),
path = require('path'),
jshint = require('./../packages/jshint/jshint.js'),
_reporter = require('./reporters/default').reporter,
Expand Down Expand Up @@ -54,7 +54,7 @@ function isDirectory(aPath) {

function _shouldIgnore(somePath, ignore) {
function isIgnored(p) {
var fnmatch = glob.fnmatch(p, somePath, ~(glob.FNM_PATHNAME | glob.FNM_CASEFOLD)),
var fnmatch = minimatch(somePath, p, {nocase: true}),
lsmatch = isDirectory(p) && p.match(/^[^\/]*\/?$/) &&
somePath.match(new RegExp("^" + p + ".*"));

Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -25,12 +25,12 @@
],
"dependencies": {
"argsparser": ">=0.0.3",
"glob": ">=2.0.7",
"jasmine-node": "1.0.7"
"jasmine-node": "1.0.7",
"minimatch": ">=0.0.4"
},
"bundledDependencies": [
"argsparser",
"glob"
"minimatch"
],
"preferGlobal" : true
}

0 comments on commit 3e198e2

Please sign in to comment.