7

instead of this enter image description here do this enter image description here

It could take only 2 lines not making my file longer than needed.

3
  • 1
    All of Prettier's options are listed here: prettier.io/docs/en/options.html. The point of the tool is to not spend time thinking about how the code should be laid out.
    – jonrsharpe
    Commented Feb 21, 2022 at 11:17
  • 1
    It's a valid question, but generally prettier is an "opinionated" formatter so it decides everything for you. I think it makes the code ugly and unreadable because the code should be consistent bases on other blocks in the file, not on a line by line bases. We also all have big 4k monitors these days, and the 80 character line limit is a waste of space.
    – conor909
    Commented Feb 22, 2022 at 9:21
  • I also think it is a valid question, but I think the user's example seems like a situation where they can add // prettier-ignore comments. We use them only sparingly in my projects.
    – Joseph
    Commented Jul 11, 2023 at 15:14

0