From 0680b7677b7c1546780c3015d6544974e3227871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Zugmeyer?= Date: Sat, 7 Mar 2015 18:00:42 +0100 Subject: [PATCH] Eslint doesn't expect "module" scopes -- yet When specifying "module" to escope sourceType option, defined variables will be stored in "module" scope instead of the "global" scope. Because eslint doesn't support module scopes yet, it will ignore this scope when the rule "no-undef" gets the current scope to check for JSX variables definitions. Fixes #15 and #29 --- index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/index.js b/index.js index 0364545f..e7da4558 100644 --- a/index.js +++ b/index.js @@ -40,7 +40,6 @@ function monkeypatch() { var analyze = escope.analyze; escope.analyze = function (ast, opts) { opts.ecmaVersion = 6; - opts.sourceType = "module"; return analyze.call(this, ast, opts) }; }