Skip to content

Commit

Permalink
add support for spread property
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmck committed Feb 27, 2015
1 parent 331d0c7 commit f31b01d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions eslint/babel-eslint-parser/acorn-to-esprima.js
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion eslint/babel-eslint-parser/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-eslint",
"version": "1.0.3",
"version": "1.0.4",
"description": "",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit f31b01d

Please sign in to comment.