4 ms·
Prettier often makes code written using sequences of .chaining much more difficult to read by forcing it all to the same line. For the same reason, it often ma
by harimau777 3y ago
Prettier often makes code written using sequences of .chaining much more difficult to read by forcing it all to the same line.
For the same reason, it often makes code written using composition more difficult to read since it won't let you decide when to put a sub-call on its own indented line for clarity.
- floydnoel 3y agoIn those situations I make use of comments to force new lines where I want them. Stupid but it works!
- pkilgore 3y agoDisable it! (https://prettier.io/docs/en/ignore.html https://prettier.io/docs/en/ignore.html) I do this occasionally, and especially with things like test tables. Linters/formatters are there to help in the common case, not to be some oppressive dogma.
- hu3 3y agoIf the fix is to disable prettier for an entire file, you're proving your parent poster point.
- dewey 3y agoIt doesn't have to be disabled for the whole file, you can annotate lines too as shown in the link the parent commenter shared.
- francislavoie 3y agoAdding comments just to fight with prettier is... uglier. I rather just not use prettier at all. It's more harmful than good IMO.
- HellsMaddy 3y agoI had the same gripe, and recently tried switching to dprint. It is much less aggressive with changing where lines break, and honestly it’s a huge relief to be able to break lines wherever I think makes the code most readable. It’s also significantly faster than prettier. I’ve been very happy with it.
- morbicer 3y agodprint is soo much better (configurable) and already written in Rust so very fast I am sad it's not getting more popular