grunt-jslint
Advanced tools
Comparing version 1.1.10 to 1.1.11
@@ -0,1 +1,7 @@ | ||
1.1.11 / 2014-05-08 | ||
=================== | ||
* lib/jslint.js: fix Issue #47 (variable aliasing) | ||
* test/jslint.js: unit test to expose issue | ||
1.1.10 / 2014-05-05 | ||
@@ -2,0 +8,0 @@ =================== |
@@ -46,5 +46,5 @@ | ||
function loadJSLintFromPath(path, cb) { | ||
function loadJSLintFromPath(file, cb) { | ||
var ctx = vm.createContext(); | ||
var f = fs.readFileSync(path.resolve(process.cwd(), path)); | ||
var f = fs.readFileSync(path.resolve(process.cwd(), file)); | ||
@@ -54,5 +54,6 @@ vm.runInContext(f, ctx); | ||
JSLINT = jslint.JSLINT = ctx.JSLINT; | ||
jslint.edition = JSLINT.edition; | ||
if (cb) { | ||
cb(null, path); | ||
cb(null, jslint.edition); | ||
} | ||
@@ -59,0 +60,0 @@ } |
{ | ||
"name": "grunt-jslint", | ||
"description": "Validates JavaScript files with JSLint", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"homepage": "https://github.com/stephenmathieson/grunt-jslint", | ||
@@ -37,3 +37,3 @@ "author": { | ||
"dependencies": { | ||
"jslint": ">=0.3.3" | ||
"jslint": ">=0.3.4" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
@@ -103,2 +103,13 @@ 'use strict'; | ||
}, | ||
'with explicit path': { | ||
topic: function () { | ||
jslint.loadJSLintFromPath('./node_modules/jslint/lib/jslint-latest.js', this.callback); | ||
}, | ||
'should not error': function (err, report) { | ||
assert.ifError(err); | ||
}, | ||
'should be latest edition': function (err, report) { | ||
assert.equal(initialEdition, report); | ||
} | ||
}, | ||
'via runner': { | ||
@@ -105,0 +116,0 @@ topic: function () { |
57312
1519
Updatedjslint@>=0.3.4