Open raphinesse opened 3 years ago
Yeah, this is a known issue, you can try the --commentWorkarounds=true
option, it will usually improve the output but sometimes it will cause an assertion failure inside recast
. Dealing with comments in recast
seems kinda problematic...
I can't remember if I had any specific handling for the comment-before-then case, but I'll look into it some more
ack, I forgot about this. And then, I think I just mindlessly blew away some work in progress that was sitting in my working copy while checking a PR... 😅
I have some memories of what I learned from looking into this, will try to work on it again soon
Again, thanks for this code mod. It works very well so far!
I just wanted to pass on some examples where comments in the transformed code were not placed like I expected them to be.
Environment
@codemodsquad/asyncify
: 2.0.5jscodeshift
: 0.11.0Input
Actual Output
Expected Output