Merge pull request babel/babel-eslint#212 from evocateur/fix-with-latest-eslint

Avoid errors with eslint 1.10.x when excluding destructured properties
This commit is contained in:
Henry Zhu 2015-11-23 20:33:39 -05:00
parent 0859607b4e
commit 3d901f5960

View File

@ -295,8 +295,6 @@ function monkeypatch() {
if (typeAnnotation) {
checkIdentifierOrVisit.call(this, typeAnnotation);
}
if (!patternVisitor) {
// Old method. Once escope in eslint is updated, this code is not necessary.
if (id.type === "ObjectPattern") {
// check if object destructuring has a spread
var hasSpread = id.properties.filter(function(p) {
@ -311,7 +309,6 @@ function monkeypatch() {
}
}
}
}
variableDeclaration.call(this, node);
};