Skip to content

Conversation

@ChiriVulpes
Copy link
Contributor

Fixes #48571

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Aug 24, 2024
@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 27, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 27, 2024

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]".;

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Aug 27, 2024

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.

@jakebailey
Copy link
Member

Yeah, that would probably be a regression. Should definitely have a test for it...

@ChiriVulpes
Copy link
Contributor Author

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?

@ChiriVulpes ChiriVulpes force-pushed the disable-leading-semicolon-indentation branch from 581c0c8 to 64edd9b Compare September 23, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

Suggestion: Formatting: Disable inserting spaces around leading semicolon

4 participants