jamischarles / 5to6

A collection of codemods that allow you to transform your js code from ES5 to ES6.
https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb
2 stars 3 forks source link

preserve comments #3

Open xjamundx opened 8 years ago

xjamundx commented 8 years ago

I think we can take the comment node and move it to the parent and this will preserve them. I'll try to mess with it a bit.

xjamundx commented 8 years ago

Someone figured this out before: http://astexplorer.net/#/kGspd21ZnD/1

See this as well: https://github.com/facebook/jscodeshift/issues/44