Open schmidtk opened 6 years ago
This seems to be unexpected behavior in jscodeshift
, so I opened an issue here:
facebook/jscodeshift/issues/258
Added code to detect this problem and log a warning so developers can correct it more easily. Leaving this open in case it can be fixed.
Opened benjamn/recast/issues/508 and benjamn/recast/issues/509 to see if these can be fixed.
Open this AST Explorer example.
The
ObjectExpression
returned by the function has bothleadingComments
defined and"parenthesizedExpression": true
. When theCallExpression
forgoog.isDef
is replaced, the pretty printer writes the leading comments inside the parentheses for the object expression.