-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure formatter can always get a newline character #38579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Impact is low, but risk is also low, so I'd be fine with including this in a servicing release.
FYI @jessetrinity who is also working in this area |
@typescript-bot cherry-pick this to release-3.9 |
Heya @andrewbranch, I've started to run the task to cherry-pick this into |
Hey @andrewbranch, I've opened #38666 for you. |
* upstream/master: Support naming tuple members (microsoft#38234) LEGO: check in for master to temporary branch. fix: extract const in jsx (microsoft#37912) No contextual types from circular mapped type properties (microsoft#38653) Ensure formatter can always get a newline character (microsoft#38579) Fix debug command for Node debugging Remove mentions of runtests-browser in CONTRIBUTING.md fix(33233): add outlining for comments before property access expression regression(38485): allow using rawText property in processing a tagged template
Fixes #38548
It looks like this was always a problem, but didn’t surface itself (at least not where anyone noticed) until we started preserving source newlines in refactors and codefixes. Also, I don’t think this bug was ever observable from VS or VS Code because AFAIK they always populate
formattingSettings.newLineCharacter
. The bug report stemmed from programmatic language service usage.