Re:Prettier 2.0 – Opinionated JavaScript formatter
by mpawelski on Sunday March 22, 2020 @07:14PM
(#22659681)
I wouldn't call change of `arrowParens` to `always` as "incredibly sane". This is just a differt opinion about what is "better". I have different.
Re:Prettier 2.0 – Opinionated JavaScript formatter
by gkoberger on Sunday March 22, 2020 @07:19PM
(#22659728)
I like it, because it's consistent. If you remove or add a parameter to a function, you have parenthesis either way and don't have to think about it.
Re:Prettier 2.0 – Opinionated JavaScript formatter
by jimmux on Sunday March 22, 2020 @10:15PM
(#22660666)
We had to change the old default because of TypeScript complaining if the param has a type annotation and no parens. So it's more consistent with TypeScript now as well. I had to argue for this exception to be added to our config, so it's a nice bit of validation that Prettier has come around.
I think there's another way to look at it. It's more "we have decided on X so YOU can move on to more important issues."
With Prettier, you just follow their opinions. Their opinions can change, and your code might look different, but it doesn't really matter. It might reformat a few lines, but the point is that it's still consistent across your team (without anyone having to memorize a bunch of rules).