Do not indent semicolons on new lines
Fixes #48571
@typescript-bot pack this
Starting jobs; this comment will be updated as builds start and complete.
| Command | Status | Results |
|---|---|---|
pack this |
✅ Started | ✅ Results |
Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:
{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/163464/artifacts?artifactName=tgz&fileId=93A2E2FF5FB5BF284A820B4F94B53E7E0185446277C34E0DACE2AA284E2B4FD602&fileName=/typescript-5.7.0-insiders.20240827.tgz"
}
}
and then running npm install.
There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;
I'm surprised there's no test for this, but there's a change where the following
type X =
| 1
| 2
| 3
;
is now formatted into:
type X =
| 1
| 2
| 3
;
We also used to support going the opposite way, where the latter was formatted into the former.
I don't think that that's desirable. Not sure if others have opinions here.
Yeah, that would probably be a regression. Should definitely have a test for it...
Hmm. That's going to require scanning forward to see if the ; is alone on the line (or just it and comments?)
Since that adds probably too much complexity, maybe it would be best to only do what this commit does if the semicolons format option is set to remove?