Skip to content

Conversation

@weswigham
Copy link
Member

Picks #22836 into release-2.8

…ix (microsoft#22836)

@amcasey: Preserve leading trivia when organizing imports

When organizing imports, we used to move the leading and trailing trivia
of each individual import with that import as it was repositioned or
deleted.  This had the unfortunate effect of repositioning or deleting
the header comment of the file.

Our new approach is to leave the leading trivia of the first import
ahead of the resulting block of imports (i.e. it no longer follows the
first import as it is repositioned or deleted).  Trailing trivia on the
first import and trivia on subsequent imports are treated as before.
@weswigham
Copy link
Member Author

ping @mhegazy to request a merge for 2.8

@weswigham weswigham merged commit 0a1d427 into microsoft:release-2.8 Mar 26, 2018
@weswigham weswigham deleted the charry-pick-comment-token-emit-fix branch March 26, 2018 20:57
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants