Permalink
Browse files

Fix: `no-undef` false positive at new.target (fixes #5420)

  • Loading branch information...
mysticatea committed Mar 1, 2016
1 parent 4a7f991 commit 905c049ca76bcaf24f9b14fcc7ccba186d81197d
Showing with 4 additions and 1 deletion.
  1. +1 −1 package.json
  2. +3 −0 tests/lib/rules/no-undef.js
View
@@ -41,7 +41,7 @@
"debug": "^2.1.1",
"doctrine": "^1.2.0",
"es6-map": "^0.1.3",
"escope": "^3.4.0",
"escope": "^3.5.0",
"espree": "^3.1.1",
"estraverse": "^4.1.1",
"estraverse-fb": "^1.3.1",
@@ -62,6 +62,9 @@ ruleTester.run("no-undef", rule, {
{ code: "/*global b:false*/ var b = 1;" },
{ code: "Array = 1;" },
// new.target: https://github.com/eslint/eslint/issues/5420
{ code: "class A { constructor() { new.target; } }", parserOptions: { ecmaVersion: 6 } },
// Experimental,
{
code: "var {bacon, ...others} = stuff; foo(others)",

0 comments on commit 905c049

Please sign in to comment.