node-jslint icon indicating copy to clipboard operation
node-jslint copied to clipboard

File specific options leak into the next file when checking multiple files

Open tensor5 opened this issue 8 years ago • 1 comments

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.

tensor5 avatar Oct 19 '15 09:10 tensor5