Created
March 21, 2015 16:32
-
-
Save mantoni/f60ce597062e9fa31ff5 to your computer and use it in GitHub Desktop.
JSLint unused variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint node: true */ | |
'use strict'; | |
var x = require('x'); | |
function foo() { | |
var y = 'bar'; | |
} | |
// JSLint reports "Unused 'y'.", but not Unused 'x'. |
Yes, well spotted. And now the preview at http://new.jslint.com/jslint.html does report x, y and foo as being unused correctly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JSLint should also report unused foo in that case.