Live data from Hacker News

$20k bounty was claimed

prettier.io

91–100 of 345 posts

Re: $20k bounty was claimed

#91
post #8

> One question you are probably wondering is why would the Prettier team fund another project!? In practice, Prettier has been the dominant code formatter for JavaScript and as a result of a lack of competition, there has been little incentive to push on performance and fix various edge cases. I was indeed wondering that but the answer doesn't really answer the question for me. Why not set a bounty to improve Prettie…

I can't speak for the Prettier folks, but as an OSS maintainer, I'm more interested in the problem being solved than everyone using my particular solution. I actually don't benefit at all from you using my code; I did all the work to make the world a place where $PROBLEM has an accessible solution. So if I were passionate about, say, JS code formatting, I would be pretty happy if someone came along and solved that problem in a more performant way.

Re: $20k bounty was claimed

#92
post #81
post #68

Earlier quoted context omitted.

Specifically for reviewing a pull request in GitHub, wouldn't the "Hide whitespace" setting reduce some of this noise? I could be mistaken, though, but that's how I interpreted that setting. 0: https://github.blog/2011-10-21-github-secrets/

This is often useful, but JavaScript specifically has the annoying property that newlines can be semantically meaningful. For example, if someone changes: function isUserBanned(username) { return db.findUserByName(username)?.banned; } To: function isUserBanned(username) { return db.findUserByName(username)?.banned; } you want to see that diff because the second version always returns undefined. If you ignore whitespa…

Enforce semicolons.

Re: $20k bounty was claimed

#93
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

`lineWidth` is actually one of the available options in the biome formatter: https://biomejs.dev/formatter#configuration

Re: $20k bounty was claimed

#94

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?

The parent poster (syrusakbary) is the CEO of Wasmer and trying to push WASIX, a quasi-proprietary 'open standard' while it seems the rest of the WASM ecosystem is in fact moving to WASI preview 2 [0]

[0] https://news.ycombinator.com/item?id=37545670

Re: $20k bounty was claimed

#95
post #83
post #52

Earlier quoted context omitted.

FWIW it doesn't matter which formatter you choose, so long as everyone working on the project is required to use it.

100% I also personally believe you should pick a formatter and NOT configure it. I don’t care anymore about style. Just want formatting to be consistent.

Yeah, that's my take as well. The less there is to configure, the better. Something I like about Go is that I don't need any project-specific settings, because there are none. (Not strictly true, as some people use gofumpt instead of gofmt. I think this is a bad idea, even though I agree with all of gofumpt's formatting changes. What matters is will everyone use it on every commit? Not if gopls doesn't do it for you.)

At my last job, we had a lot of fun with Prettier. We basically made our Typescript codebase look as much like Go as possible. I am not sure this is a particularly valuable endeavor, but it was fun. So if people are willing to spend $20,000 on making that faster, whatever. They can have that fun, I guess.

Re: $20k bounty was claimed

#96

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…

This is the first time I've come across WASIX. Upon reading about it, I can't help but see it as a reincarnation of the JVM. Is that accurate? What advantage is there to executing code in WASIX if it can access the system and isn't actually in a sandbox?

Re: $20k bounty was claimed

#97
post #81
post #68

Earlier quoted context omitted.

Specifically for reviewing a pull request in GitHub, wouldn't the "Hide whitespace" setting reduce some of this noise? I could be mistaken, though, but that's how I interpreted that setting. 0: https://github.blog/2011-10-21-github-secrets/

This is often useful, but JavaScript specifically has the annoying property that newlines can be semantically meaningful. For example, if someone changes: function isUserBanned(username) { return db.findUserByName(username)?.banned; } To: function isUserBanned(username) { return db.findUserByName(username)?.banned; } you want to see that diff because the second version always returns undefined. If you ignore whitespa…

gawd and this is why the semicolon debate wasn't just bike shedding.

Re: $20k bounty was claimed

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

Re: $20k bounty was claimed

#99
post #79

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.

I think the real issue with prettier is that it's almost become a de facto standard. E.g. personally I don't like it at all , but do like Svelte, and Svelte's official (and AFAIK only) formatter uses prettier. Hence I use prettier for Svelte, and ditto for a few other things. So the whole "extremely opinionated, if you want configuration go somewhere else" is great in principle, when people are choosing to use the to…

Well, this bounty is just about the only way that the Prettier team could contribute to solving that issue, so rejoice.

Besides that, I get the impression being a universal standard is kind of a non-issue for Prettier:

- If it was widespread, but highly configurable, that increases friction when switching projects, because there will be tiny formatting differences everywhere

- If it was not widespread, it would not be well known, increasing friction for users entering a project where it was used

Post reply on HN