Live data from Hacker News

$20k bounty was claimed

prettier.io

41–50 of 345 posts

Re: $20k bounty was claimed

#41
post #23

I feel like people complaining about Prettier being "heavily opinionated" are missing the point. Perhaps I'm biased by my decade of using Go, but not having to worry about superfluous stylistic choices is a welcome reduction in cognitive load. (Up to a point I guess, e.g. I'd never put up with K&R-style newline opening brackets).

Prettier is very opinionated about line length which gofmt isn't. That's the only complaint I have and it's bad enough I just refuse to use it. Add one character to a line and enjoy a ten-line diff. Edit: See a contrived example of something gofmt doesn't touch (the behavior I want): https://go.dev/play/p/cKMKnFwT8tq

[deleted]

Re: $20k bounty was claimed

#42

Speed is always welcome, but I just wish prettier was a little less opinionated. Specifically around line length, it will just not leave my formatting alone. I find prettier formatted code much less readable than unformatted code, and this isn't a problem I have with other code formatters like rustfmt.

Have you tried the print width option: https://prettier.io/docs/en/options.html#print-width?

Re: $20k bounty was claimed

#43
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.

I mean.. sure https://xkcd.com/927/

It isn't really applicable here since Prettier was de-facto standard at pretty much every place I've worked at - start-ups to FAANG

Re: $20k bounty was claimed

#44
post #23

I feel like people complaining about Prettier being "heavily opinionated" are missing the point. Perhaps I'm biased by my decade of using Go, but not having to worry about superfluous stylistic choices is a welcome reduction in cognitive load. (Up to a point I guess, e.g. I'd never put up with K&R-style newline opening brackets).

Prettier is very opinionated about line length which gofmt isn't. That's the only complaint I have and it's bad enough I just refuse to use it. Add one character to a line and enjoy a ten-line diff. Edit: See a contrived example of something gofmt doesn't touch (the behavior I want): https://go.dev/play/p/cKMKnFwT8tq

Then just change it in the prettier config.

80 characters is a really good default. I have an extra wide monitor, and with 2 side panels open in my IDE, that's the perfect length.

Re: $20k bounty was claimed

#45

Speed is always welcome, but I just wish prettier was a little less opinionated. Specifically around line length, it will just not leave my formatting alone. I find prettier formatted code much less readable than unformatted code, and this isn't a problem I have with other code formatters like rustfmt.

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.

[deleted]

Re: $20k bounty was claimed

#46

I'm incredibly excited for this. The Biome team has been remarkably fast on achieving 95% compatibility with Prettier [1]. This will help to bring maximum speed to formatting Javascript thanks to Rust, following the ruff (Python formatter) trend. Just as a note, as it was not mentioned in the article, Wasmer [2] also participated with a $2,500 bounty to compile Biome to WASIX [3], and it has been awesome to see how t…

Do you know the reason for enabling compilation to WASIX?

Re: $20k bounty was claimed

#48

Earlier quoted context omitted.

I wish it were more opinionated. It treats new lines as significant in a lot of its formatting

I also don't understand their stand about curly braces. They don't add or remove them. I think they should make it uniform.

There is a plugin for that: https://github.com/JoshuaKGoldberg/prettier-plugin-curly

Re: $20k bounty was claimed

#49
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"?

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

Re: $20k bounty was claimed

#50

"This means that we can now focus on the next important aspect: Performance. Prettier has never been fast per se, but fast enough for most use cases. This has always felt unsatisfying so we wanted to do something about it. What better way than a friendly competition. On November 9th, we put up a $10k bounty for any project written in Rust that would pass 95% of Prettier test suite." I don't see how better performance…

> One could have simply transpiled the existing codebase into Rust, and collect the reward

Why didn't you, then?

Post reply on HN