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

Commit

Permalink
Merge pull request #206 from mysticatea/fix-for-eslint-1.9
Browse files Browse the repository at this point in the history
Fix for ESLint@1.9 and npm@3
  • Loading branch information
hzoo committed Nov 10, 2015
2 parents 9295bba + 8c45795 commit 6a4a80e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ function monkeypatch() {
var estraverseFb = eslintMod.require("estraverse-fb");
assign(estraverseFb.VisitorKeys, t.VISITOR_KEYS);

// ESLint v1.9.0 uses estraverse directly to work around https://github.com/npm/npm/issues/9663
var estraverseOfEslint = eslintMod.require("estraverse");
if (estraverseOfEslint !== estraverseFb) {
assign(estraverseOfEslint.VisitorKeys, t.VISITOR_KEYS);
}

// monkeypatch escope
var escope = require(escopeLoc);
var analyze = escope.analyze;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"homepage": "https://github.com/babel/babel-eslint",
"devDependencies": {
"eslint": "^1.8.0",
"eslint": "^1.9.0",
"espree": "^2.2.5",
"mocha": "^2.3.3"
}
Expand Down
2 changes: 1 addition & 1 deletion test/non-regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ describe("verify", function () {
"var x = 1;"
].join("\n"),
{ "no-use-before-define": 1 },
[ "1:13 x was used before it was defined no-use-before-define" ]
[ "1:13 \"x\" was used before it was defined no-use-before-define" ]
)
});
});

0 comments on commit 6a4a80e

Please sign in to comment.