Skip to content

Commit

Permalink
Fix config only being found below the working dir
Browse files Browse the repository at this point in the history
The glob used to find files to lint was also being used to walk up to
find configuration files.  Given a file layout like:

foo/
	.htmlhintrc
	bar/
		test.html

htmlhint would not pick up the configuration if foo/bar/ was the working
directory, however it would if foo/ was the working directory.
  • Loading branch information
zed0 committed Jun 20, 2016
1 parent 152a114 commit c1d4e8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/htmlhint
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ function getGlobInfo(target){
var globInfo = parseGlob(target);
var base = globInfo.base;
base += /\/$/.test(base) ? '' : '/';
base = path.resolve(base);
var pattern = globInfo.glob;
var globPath = globInfo.path;
var defaultGlob = '*.{htm,html}';
Expand Down
Loading

0 comments on commit c1d4e8a

Please sign in to comment.