This commit is contained in:
Toru Nagashima 2017-12-26 10:49:36 +09:00
parent a706e85b19
commit 3cb154df82
2 changed files with 13 additions and 0 deletions

View File

@ -309,6 +309,7 @@ class Referencer extends OriginalReferencer {
module.exports = function(ast, parserOptions) { module.exports = function(ast, parserOptions) {
const options = { const options = {
ignoreEval: true,
optimistic: false, optimistic: false,
directive: false, directive: false,
nodejsScope: nodejsScope:

View File

@ -1874,4 +1874,16 @@ describe("verify", () => {
[] []
); );
}); });
it("ignore eval in scope analysis", () => {
verifyAndAssertMessages(
unpad(`
const a = 1;
console.log(a);
eval('');
`),
{ "no-unused-vars": 1, "no-undef": 1 },
[]
);
});
}); });