Merge pull request babel/babel-eslint#165 from hzoo/remove-spread-transform
use SpreadProperty type, revert other transforms
This commit is contained in:
parent
8d46c00125
commit
e8c6b4e988
@ -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"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user