This repository was archived by the owner on May 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Don't strip comments (both inline and end of line) #3
Comments
After thinking about this more, we should always normalize to 1 After thinking about this more, we should always normalize to 1 var a, b; to
var a /* sup */, b; to var a; /* sup */
var b; var a, // sup
b; to var a; //sup
var b; var a // sup
, b; to var a; //sup
var b; |
Started on this but stopping due to draining time and other priorities. https://github.com/twolfson/esformatter-var-each/tree/dev/allow.comments |
If we ever resume this, my parting thoughts are:
To rephrase:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Our latest iteration is better than our first as it preserves node/token linkages. However, we are currently stripping out the content between
VariableDeclarator's
. We should preserve this information by some means (e.g. generating a newbetweenDeclarationTokens
set for each declaration pair).Here are some test cases:
to
to
to
to
to
The text was updated successfully, but these errors were encountered: