6

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.

Rastislav Uhrin
  • 150
  • 1
  • 7
  • 1
    All of Prettier's options are listed here: https://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 Feb 21 '22 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 Feb 22 '22 at 09: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 Jul 11 '23 at 15:14

0 Answers0