Prettier’s biggest win is that it automates 99% of style complaints away and practically eliminates most classes of nitpicking.
But, as well as the issue with line noise, it also encourages patterns that I think detract from code comprehension. It favours expressions over statements and even now, it’s not easy to set a breakpoint in the middle of one, so you end up rewriting into statements just so you can step through.
It will favour deeply nested ternary statements in react so your code reads more like a tree with densely tangled roots.
It will favour shorthand syntax for optionally merging properties into an object, which basically relies on a quirk of the splat operator.
There is fuck all standard library to speak of without pulling in an insane amount of dependencies, but surely stuff like deep merge and compact should be provided out of the box?
> It favours expressions over statements and even now, it’s not easy to set a breakpoint in the middle of one, so you end up rewriting into statements just so you can step through.
I've never had an issue setting an inline breakpoint[1] in VS Code, is it an issue in other IDEs?
does it? prettier is extremely configurable, unlike gofmt. so deferring to the authority of prettier is essentially deferring to the authority of the prettier.yml config. not that i have a problem with that _per se_, i’d expect the author(s) to take responsibility and appreciate that they’re defining/imposing their own taste(s).
the delta, when prettier is introduced in a project for the first time, not counting +/- whitespace and semicolons (where none existed) isn’t huge. where it matters, the configuration options you get is all that’s necessary.
But, as well as the issue with line noise, it also encourages patterns that I think detract from code comprehension. It favours expressions over statements and even now, it’s not easy to set a breakpoint in the middle of one, so you end up rewriting into statements just so you can step through.
It will favour deeply nested ternary statements in react so your code reads more like a tree with densely tangled roots.
It will favour shorthand syntax for optionally merging properties into an object, which basically relies on a quirk of the splat operator.
There is fuck all standard library to speak of without pulling in an insane amount of dependencies, but surely stuff like deep merge and compact should be provided out of the box?