Merge pull request babel/babel-eslint#165 from hzoo/remove-spread-transform

use SpreadProperty type, revert other transforms
This commit is contained in:
Henry Zhu 2015-08-16 22:48:56 -04:00
parent 8d46c00125
commit e8c6b4e988

View File

@ -183,11 +183,8 @@ var astTransformVisitor = {
}, },
exit: function (node) { /* parent */ exit: function (node) { /* parent */
if (this.isSpreadProperty()) { if (this.isSpreadProperty()) {
node.type = "Property"; node.type = "SpreadProperty";
node.kind = "init";
node.computed = true;
node.key = node.value = node.argument; node.key = node.value = node.argument;
delete node.argument;
} }
// flow: prevent "no-undef" // flow: prevent "no-undef"