Mar 3, 2021
I agree with you here. The formatting you see in the example is what Prettier auto-formatted it to be. I'd be curious to know what their rationale is for formatting the ternary the way they do. After digging through some GitHub issues on the Prettier repo, it seems that ternary formatting has gone back and forth a few times, and it's not possible to make everyone happy. https://github.com/prettier/prettier/issues?q=is%3Aissue+ternary