Merge pull request babel/babel-eslint#273 from mysticatea/fix-monkeypatching-for-2.3.0
Fix: Remove throwing an error when estraverse-fb has not found.
This commit is contained in:
parent
2c6b323a62
commit
080f0c7b22
@ -61,7 +61,7 @@ function monkeypatch() {
|
||||
estraverses.push(estraverseFb);
|
||||
assign(estraverseFb.VisitorKeys, t.VISITOR_KEYS);
|
||||
} catch (err) {
|
||||
throw new Error("babel-eslint isn't currently compatible with ESLint 2.3.x. The recommendation is to pin to ESLint 2.2.x right now.");
|
||||
// Ignore: ESLint v2.3.0 does not have estraverse-fb
|
||||
}
|
||||
|
||||
// ESLint v1.9.0 uses estraverse directly to work around https://github.com/npm/npm/issues/9663
|
||||
@ -77,6 +77,7 @@ function monkeypatch() {
|
||||
escope.analyze = function (ast, opts) {
|
||||
opts.ecmaVersion = 6;
|
||||
opts.sourceType = "module";
|
||||
|
||||
var results = analyze.call(this, ast, opts);
|
||||
return results;
|
||||
};
|
||||
@ -350,8 +351,6 @@ function monkeypatch() {
|
||||
};
|
||||
}
|
||||
|
||||
exports.VisitorKeys = t.VISITOR_KEYS;
|
||||
|
||||
exports.parse = function (code, options) {
|
||||
options = options || {};
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/babel/babel-eslint",
|
||||
"devDependencies": {
|
||||
"eslint": "~2.2.0",
|
||||
"eslint": "^2.4.0",
|
||||
"espree": "^3.0.0",
|
||||
"mocha": "^2.3.3"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user