top | item 38435257

(no title)

bennyg | 2 years ago

Have you tried the print width option: https://prettier.io/docs/en/options.html#print-width?

discuss

order

nicoburns|2 years ago

Yes, but unlike most formatters where the width option is a maximum and it mostly leaves your code alone below that width, prettier will aggressively widen your code to fit if you up the print width setting.

I think rustfmt will actually also widen code you have put newlines in sometimes. But it's heuristic is somehow much better than prettier's.