Live data from Hacker News

$20k bounty was claimed

prettier.io

101–110 of 345 posts

Re: $20k bounty was claimed

#101
post #24

Earlier quoted context omitted.

> I find Prettier to be way too heavy handed But that's the purpose of such tools: to stop endless debates about style.

The problem is that style matters and therefore those debates matter. Just because something isn't important to the developers that made Prettier doesn't mean that it's not important to the productivity of other developers.

> The problem is that style matters and therefore those debates matter.

Does it? IME/O, styling only matters up until the point that it is consistent and reasonable. And I'm saying this as someone who used to want to debate and micromanage a lot of formatting standards in my projects. Ego is removed from the equation (unless you're the one trying to introduce Prettier to a reluctant team), and without ego, the debates no longer seem very important.

Re: $20k bounty was claimed

#102
post #55
post #33

While it's always great to see performance gains, my largest pain point with prettier was never performance. Instead my only gripe with prettier is the "line wrapping noise" it creates, illustrated here by Anthony Fu: https://antfu.me/posts/why-not-prettier#the-line-wrapping-no... Would it be realistic to expect a solution for this issue now that "prettier needs to step up it's game"?

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 throu…

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).

Re: $20k bounty was claimed

#103

I dislike prettier and wonder why it's so popular because - I sometimes prefer lines to exceed maxLength (ex: template string, which prettier would horribly break on vars) - allow `1 + 2 * 3` or `a || b && c` to be parenthesis-less because everyone know the precendence here

> I sometimes prefer lines to exceed maxLength (ex: template string, which prettier would horribly break on vars)

Prettier doesn't break a long template literal though...?

> allow `1 + 2 * 3` or `a || b && c` to be parenthesis-less because everyone know the precendence here

"Everyone knows" is usually an unwise assumption. And adding parentheses does make it easier to read even for people who know their order of operations.

Re: $20k bounty was claimed

#104

Earlier quoted context omitted.

Do you have any examples where prettier code is much less readable? I haven't really ran into that issue and have been very happy with prettier.

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.

In those situations I make use of comments to force new lines where I want them. Stupid but it works!

Re: $20k bounty was claimed

#105

Earlier quoted context omitted.

Do you have any examples where prettier code is much less readable? I haven't really ran into that issue and have been very happy with prettier.

If I don't remember wrong, doesn't it put object destructurings on one line if they fit? That's both less readable than putting each destructured member on its own line as well as a cause of unnecessary whitespace changes in your commit history if you ever add one more field to the destructuring that takes it over the line length limit.

Add a comment anywhere in the destructuring and it will force each property onto its own line.

Re: $20k bounty was claimed

#106
post #49

Earlier quoted context omitted.

eh -- this is a one-time occurrence with prettier. Subsequent changes are guaranteed to be changes-only since formatting is consistent between authors.

It happens often in JSX, you add one prop, which makes the line longer than the line width, which turns it into a multi line change. It's annoying, but not a reason to throw the baby out with the bathwater.

This isn't just a JSX problem. This is in any language that once you go over the column limit that it'll try to break it somewhere.

Re: $20k bounty was claimed

#107
I couldn't find the answer - does Biome work with a prettierrc.json file so that it can be implemented in an organisation that uses Prettier? In this case it would only be for speed reasons, not the formatting.

Re: $20k bounty was claimed

#108
post #98

> You may not be aware but thanks to all those donations, we've been able to pay two people $1.5k/month for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job! It's incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.

I don't want to disparage prettier, but to call it a foundational piece...

Re: $20k bounty was claimed

#109
post #98

> You may not be aware but thanks to all those donations, we've been able to pay two people $1.5k/month for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job! It's incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.

Nerd sniping is incredibly effective. I would say it's abused quite often too.

I don't know what to say other than, if these people are out of a job, and you're a company funding prettier or need good JS people, please hire them.

Re: $20k bounty was claimed

#110
post #98

> You may not be aware but thanks to all those donations, we've been able to pay two people $1.5k/month for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job! It's incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.

I don't want to disparage prettier, but to call it a foundational piece...

I agree. Foundational isn't the right word here. I would though accept "impactful". A lot of people care about code formatting "taken care of".
Post reply on HN