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

Fix: Improve monkeypatching for ESLint v2.3.0 #273

Merged
merged 1 commit into from
Mar 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
};
Expand Down Expand Up @@ -350,8 +351,6 @@ function monkeypatch() {
};
}

exports.VisitorKeys = t.VISITOR_KEYS;

exports.parse = function (code, options) {
options = options || {};

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