Merge pull request babel/babel-eslint#270 from danez/cleanup-monkey
remove monkey-patching of patternVisitor as unused
This commit is contained in:
parent
a827ab2d4e
commit
4a8c6d8a8b
@ -92,22 +92,6 @@ function monkeypatch() {
|
||||
referencer = referencer.default;
|
||||
}
|
||||
|
||||
// monkeypatch escope/pattern-visitor
|
||||
var patternVisitorLoc;
|
||||
var patternVisitorMod;
|
||||
var patternVisitor;
|
||||
try {
|
||||
patternVisitorLoc = Module._resolveFilename("./pattern-visitor", escopeMod);
|
||||
patternVisitorMod = createModule(patternVisitorLoc);
|
||||
patternVisitor = require(patternVisitorLoc);
|
||||
if (patternVisitor.__esModule) {
|
||||
patternVisitor = patternVisitor.default;
|
||||
}
|
||||
} catch (err) {
|
||||
// When eslint uses old escope, we cannot find pattern visitor.
|
||||
// Fallback to the old way.
|
||||
}
|
||||
|
||||
// reference Definition
|
||||
var definitionLoc;
|
||||
try {
|
||||
@ -304,12 +288,6 @@ function monkeypatch() {
|
||||
}
|
||||
};
|
||||
|
||||
if (patternVisitor) {
|
||||
patternVisitor.prototype.SpreadProperty = function (node) {
|
||||
this.visit(node.argument);
|
||||
};
|
||||
}
|
||||
|
||||
// visit flow type in VariableDeclaration
|
||||
var variableDeclaration = referencer.prototype.VariableDeclaration;
|
||||
referencer.prototype.VariableDeclaration = function(node) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user