> 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…
$20k bounty was claimed
91–100 of 345 posts
Re: $20k bounty was claimed
#92Earlier 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…
Re: $20k bounty was claimed
#93I 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
Re: $20k bounty was claimed
#94I'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
#95Earlier 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.
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
#96I'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…
Re: $20k bounty was claimed
#97Earlier 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…
Re: $20k bounty was claimed
#98It's incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.
Re: $20k bounty was claimed
#99Speed 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…
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