Permalink
Browse files

Merge pull request #22 from Asuza/master

Fixed broken 'globals' option for JSHint
  • Loading branch information...
arthurakay committed Jun 5, 2013
2 parents e84c974 + d08c47e commit 925e7031911bfd456c7c57d901ad57a7deeb7b39
Showing with 15 additions and 2 deletions.
  1. +15 −2 src/linters/jshint.js
View
@@ -22,6 +22,14 @@ var linter = {
},
+ /**
+ * @cfg
+ * An object containing the pre-defined globals of the lint validation options
+ */
+ globals : {
+
+ },
+
/**
* @private
*/
@@ -34,7 +42,12 @@ var linter = {
for (i in options) {
if (options.hasOwnProperty(i)) {
- this.options[i] = options[i];
+ if (i === 'globals') {
+ this.globals = options[i];
+ }
+ else {
+ this.options[i] = options[i];
+ }
}
}
},
@@ -65,7 +78,7 @@ var linter = {
js = parentModule.fs.readFileSync(file, 'utf8');
var i = 0,
- result = me.lib(js, me.options),
+ result = me.lib(js, me.options, me.globals),
totalErrors = me.lib.errors.length,
error;

0 comments on commit 925e703

Please sign in to comment.