explode all rest elements - fixes babel/babel-eslint#11

This commit is contained in:
Sebastian McKenzie
2015-02-28 16:33:21 +11:00
parent 1cc579cb5d
commit 0f1910891d
2 changed files with 5 additions and 2 deletions

View File

@@ -30,6 +30,10 @@ var astTransformVisitor = {
delete node.argument;
}
if (t.isRestElement(node)) {
return node.argument;
}
if (t.isImportBatchSpecifier(node)) {
// ImportBatchSpecifier<name> => ImportNamespaceSpecifier<id>
node.type = "ImportNamespaceSpecifier";
@@ -67,7 +71,6 @@ var astTransformVisitor = {
node.defaults.push(param.right);
return param.left;
} else {
if (t.isRestElement(param)) param = param.argument;
node.defaults.push(null);
return param;
}

View File

@@ -1,6 +1,6 @@
{
"name": "babel-eslint",
"version": "1.0.9",
"version": "1.0.10",
"description": "",
"main": "index.js",
"repository": {