Skip to content

Commit

Permalink
Eslint doesn't expect "module" scopes -- yet
Browse files Browse the repository at this point in the history
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 babel#15 and babel#29
  • Loading branch information
BenoitZugmeyer committed Mar 7, 2015
1 parent 08ace42 commit 0680b76
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
}
Expand Down

0 comments on commit 0680b76

Please sign in to comment.