Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #273 from mysticatea/fix-monkeypatching-for-2.3.0
Browse files Browse the repository at this point in the history
Fix: Remove throwing an error when estraverse-fb has not found.
hzoo committed Mar 14, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 32848e5 + c36c05f commit 0b473e1
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -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 || {};

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 0b473e1

Please sign in to comment.