add support for spread property

This commit is contained in:
Sebastian McKenzie 2015-02-27 22:40:56 +11:00
parent 5c226d0451
commit 041c7e246f
2 changed files with 7 additions and 1 deletions

View File

@ -44,6 +44,12 @@ var astTransformVisitor = {
if (t.isRestElement(node.params[node.params.length - 1])) {
node.rest = node.params.pop();
}
} else if (t.isSpreadProperty(node)) {
node.type = "Property";
node.kind = "init";
node.computed = false;
node.key = node.value = node.argument;
delete node.argument;
} else if (t.isClassProperty(node)) {
// eslint doesn't like these
this.remove();

View File

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