3 Matching Annotations
- Nov 2020
-
prettier.io prettier.io
-
Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth. Remember, computers are dumb. You need to explicitly tell them what to do, while humans can make their own (implicit) judgements, for example on when to break a line. In other words, don’t try to use printWidth as if it was ESLint’s max-len – they’re not the same. max-len just says what the maximum allowed line length is, but not what the generally preferred length is – which is what printWidth specifies.
-
-
github.com github.com
-
I'm not sure what's the best solution, but it could be a good idea to print the full path only at the end of the line, since it takes a lot of space, or to move it to a separate line.
-