babel/eslint/babel-eslint-parser/lib/parse-with-patch.js
Teddy Katz e988a88af0 Fix: Prevent parseForESLint() behavior from changing after parse() is called (fixes babel/babel-eslint#558)(babel/babel-eslint#559)
* Prevent parseForESLint() behavior from changing after parse() is called

(fixes https://github.com/babel/babel-eslint/issues/558, fixes https://github.com/eslint/eslint/issues/9767)

* Avoid using the enhanced referencer after monkeypatching

* Chore: add test for babel/babel-eslint#558

* Pass correct scope analyzer options

* fix escope patch and improve tests

* remove process.exit(1)
2017-12-25 01:52:36 -05:00

10 lines
200 B
JavaScript

"use strict";
var parse = require("./parse");
var patchEscope = require("./patch-eslint-scope");
module.exports = function(code, options) {
patchEscope(options);
return parse(code, options);
};