Closed andrewmherren closed 5 years ago
@andrewmherren, ow yeah, that's good thinking! I needed to remove that traverse a long time ago :D Change looks OKeish, I maybe would replace .forEach
with combining .filter
and .map
, since now it's doable, but it's not critical. My approach is 'make the code work -> make the code fast -> make the code nice', and thus I am on 'make it work' phase now - I will merge it :)
@Bogdan-Lyashenko When I took a look, I saw there was a previous ToDo comment about AST containing a comment property. After investigating that it seems to handle the consecutive comment/crumb issue well.
As a result, I removed babelTraverse and instead applied the existing foreach to the ast.comments object.
Definitely open to suggestions and feedback you have. Thanks!