Skip to content

Commit

Permalink
Use loadConfig of jshint/cli.js to allow comments in .jshintrc. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
teppeis authored and shama committed Aug 29, 2013
1 parent b0b504b commit 95aee7b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true
"curly": true, // true: Require {} for every new block or scope
"eqeqeq": true, // true: Require triple equals (===) for comparison
"immed": true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
"latedef": true, // true: Require variables/functions to be defined before being used
"newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()`
"noarg": true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
"sub": true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
"undef": true, // true: Require all non-global variables to be declared (prevents global leaks)
"boss": true, // true: Tolerate assignments where comparisons would be expected
"eqnull": true, // true: Tolerate use of `== null`
"node": true // Node.js
}
2 changes: 1 addition & 1 deletion tasks/lib/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ exports.init = function(grunt) {

// Read JSHint options from a specified jshintrc file.
if (options.jshintrc) {
options = grunt.file.readJSON(options.jshintrc);
options = jshintcli.loadConfig(options.jshintrc);
delete options.jshintrc;
}

Expand Down

0 comments on commit 95aee7b

Please sign in to comment.