node-jslint
node-jslint copied to clipboard
File specific options leak into the next file when checking multiple files
Suppose you have two files in your working directory:
test1.js
:
/*jslint browser, this */
document.createElement("div");
console.log(this);
and test2.js
:
document.createElement("div");
console.log(this);
jslint --edition=es6 test1.js test2.js
outputs:
test1.js is OK.
test2.js is OK.
while reverting the order jslint --edition=es6 test2.js test1.js
:
test2.js
#1 Undeclared 'document'.
document.createElement("div"); // Line 0, Pos 0
#2 Unexpected 'this'.
console.log(this); // Line 1, Pos 12
test1.js is OK.