Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Switch-case block body placement #2407

Closed
Tracked by #2403
MichaReiser opened this issue Apr 13, 2022 · 1 comment · Fixed by #2514
Closed
Tracked by #2403

Switch-case block body placement #2407

MichaReiser opened this issue Apr 13, 2022 · 1 comment · Fixed by #2514
Labels
A-Formatter Area: formatter good first issue Good for newcomers I-Easy Implementation: easy task, usually a good fit for new contributors

Comments

@MichaReiser
Copy link
Contributor

MichaReiser commented Apr 13, 2022

Rome's formatter places a switch case's block body on a new line and indents it whereas Prettier formats the block start on the same line as the case start. Playground

Input

switch ("test") {
  case "test": {}
}

Prettier

switch ("test") {
	case "test": {
	}
}

Rome

switch ("test") {
	case "test":
		{}
}

Expected

Formatting to match Prettier's formatting.

@MichaReiser MichaReiser added good first issue Good for newcomers A-Formatter Area: formatter labels Apr 13, 2022
@ematipico
Copy link
Contributor

@ematipico ematipico added the I-Easy Implementation: easy task, usually a good fit for new contributors label May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter good first issue Good for newcomers I-Easy Implementation: easy task, usually a good fit for new contributors
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants