Closed justingrant closed 3 months ago
Whoops, sorry I posted this into pretter-vscode instead of the main prettier repo. Sorry for the noise. Closing.
Real issue is here: https://github.com/prettier/prettier/issues/16006
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Is your feature request related to a problem? Please describe.
Prettier splits arrow functions across lines, like this:
I found this surprising because parameters and body of a function are very closely related so it'd be nice to keep them on the same line if possible.
Describe the solution you'd like
Describe alternatives you've considered
My colleague in a code review asked me to convert this arrow function to use curly braces to avoid the split, like this:
This is a pretty big refactor! I'd like to avoid these in the future.
This matches our style for
if
andelse
statements where we always put curly braces around muilti-line conditionals like this:Additional context Add any other context or screenshots about the feature request here.