TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

$20k bounty was claimed

716 pointsby conaclosover 1 year ago

34 comments

deweyover 1 year ago
&gt; 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.<p>I was indeed wondering that but the answer doesn&#x27;t really answer the question for me. Why not set a bounty to improve Prettier instead of building a competing project just to increase the motivation to improve Prettier? Or is the end goal to shut down the Prettier project and encourage people to switch to the Rust based one? Seems like an unnecessary fragmentation of an already confusing landscape.<p>Maybe I&#x27;m misunderstanding something though.
评论 #38436738 未加载
评论 #38436015 未加载
评论 #38435159 未加载
评论 #38435323 未加载
评论 #38434993 未加载
评论 #38435000 未加载
评论 #38437151 未加载
评论 #38436743 未加载
评论 #38442596 未加载
评论 #38435914 未加载
评论 #38436482 未加载
评论 #38435066 未加载
评论 #38434950 未加载
评论 #38441667 未加载
评论 #38441229 未加载
评论 #38442079 未加载
评论 #38436847 未加载
评论 #38440122 未加载
gostsamoover 1 year ago
Many people comment the reasons without acknowledging that part as well:<p>&gt; By matching all the tests, the Biome project also found a lot of bugs and questionable decisions in Prettier that we will be able to improve upon.<p>For me, this means that they have another implementation for sanity checking their own.
syrusakbaryover 1 year ago
I&#x27;m incredibly excited for this. The Biome team has been remarkably fast on achieving 95% compatibility with Prettier [1].<p>This will help to bring maximum speed to formatting Javascript thanks to Rust, following the ruff (Python formatter) trend.<p>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 their team has been working to achieve this as well... hopefully we&#x27;ll get Biome running in Wasmer soon!<p>Also congrats to the Algora team, as they have been doing very good work with their landing and trying to help on the challenge moving forward [4].<p>Keep up the great work!!<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;biomejs&#x2F;biome&#x2F;issues&#x2F;720">https:&#x2F;&#x2F;github.com&#x2F;biomejs&#x2F;biome&#x2F;issues&#x2F;720</a><p>[2] <a href="https:&#x2F;&#x2F;wasmer.io&#x2F;">https:&#x2F;&#x2F;wasmer.io&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;wasix.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;wasix.org&#x2F;</a><p>[4] <a href="https:&#x2F;&#x2F;console.algora.io&#x2F;challenges&#x2F;prettier" rel="nofollow noreferrer">https:&#x2F;&#x2F;console.algora.io&#x2F;challenges&#x2F;prettier</a>
评论 #38436113 未加载
评论 #38435292 未加载
nicoburnsover 1 year ago
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 <i>much</i> less readable than unformatted code, and this isn&#x27;t a problem I have with other code formatters like rustfmt.
评论 #38434991 未加载
评论 #38435257 未加载
评论 #38435718 未加载
评论 #38440321 未加载
评论 #38435353 未加载
评论 #38435070 未加载
candiddevmikeover 1 year ago
I&#x27;m still salty that all my eslint plugins decided to remove perfectly fine linters in lieu of Prettier. I find Prettier to be way too heavy handed and hard to reason about, and yet another tool that I never asked for...
评论 #38435242 未加载
评论 #38435059 未加载
评论 #38438281 未加载
namanyaygover 1 year ago
While porting to Rust has been a trend, as Prettier runs on every save, the speed boosts will be significant. I&#x27;ll be trying out Biome soon. Congrats to the Biome project!
评论 #38434957 未加载
评论 #38434852 未加载
评论 #38443222 未加载
meindnochover 1 year ago
&quot;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.<p>On November 9th, we put up a $10k bounty for any project written in Rust that would pass 95% of Prettier test suite.&quot;<p>I don&#x27;t see how better performance follows from the fact that something is written in Rust. One could have simply transpiled the existing codebase into Rust, and collect the reward.
评论 #38435962 未加载
评论 #38436536 未加载
评论 #38435321 未加载
评论 #38440019 未加载
评论 #38435675 未加载
fastballover 1 year ago
As an aside, the winning project (Biome) is a fork (renaming?) of the Rome project, which was started by Sebastian McKenzie (creator of Babel) a few years ago.<p>Forked because sebmck seems to have gone AWOL over the last year or so and contributors were unable to update many of the project&#x27;s resources as only he had access. Hope he is doing ok though and glad the Biome project seems to be going strong regardless.
globular-toastover 1 year ago
Why did it have to be Rust? Couldn&#x27;t have just been &quot;faster&quot;? Is the Rust one actually fast? Does memory safety and leaks etc even matter for a program like Prettier?
评论 #38437533 未加载
nulld3vover 1 year ago
Are there benchmarks for Biome anywhere? How much better does it perform than prettier exactly?
评论 #38436966 未加载
vinniepukhover 1 year ago
I want to use Biome, but until it either has plugins or implements the tailwindcss class sorting itself, I will not be able to adopt it.<p>This is a common sentiment in the fullstack community right now.
评论 #38438715 未加载
andrewstuartover 1 year ago
The post says the reason they did this was to motivate themselves to make the javascript version better?<p>Strange.
评论 #38435133 未加载
mvdtnzover 1 year ago
So now there are two distinct, somewhat compatible but surely diverging implementations of the same thing. Yup, sounds like the JS ecosystem.
thowaway91234over 1 year ago
So this isn&#x27;t replacing the main implementation? They just funded a new project written in Rust that is compatible?
tmm84over 1 year ago
This is something that really got me thinking about how to make my own prettier from scratch because I thought it was interesting. Needless to say, having looked at the “tests” for prettier I was kind of lost because I was trying to reverse engineer from the tests. What I saw was the format tests are auto generated and have if statements in them. If you’re a unit test stickler then seeing an if statement in a test should be a smell. The hardest part was trying to get the why behind each test. No explanation is in the test but I’ll bet it’s in the docs, source code or whatever cloud chat community.<p>Also, I had to check the winning implementation just for sanity’s sake. It is older than a week or two. Still, my hats off to them for being able to meet the compatibility mark and get the cash.
jrockwayover 1 year ago
That&#x27;s interesting. I&#x27;ve been using &quot;deno fmt&quot; as of late and it&#x27;s been fine for me.<p><a href="https:&#x2F;&#x2F;docs.deno.com&#x2F;runtime&#x2F;manual&#x2F;tools&#x2F;formatter" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.deno.com&#x2F;runtime&#x2F;manual&#x2F;tools&#x2F;formatter</a>
评论 #38435342 未加载
评论 #38435039 未加载
11235813213455over 1 year ago
I dislike prettier and wonder why it&#x27;s so popular because<p>- I sometimes prefer lines to exceed maxLength (ex: template string, which prettier would horribly break on vars)<p>- allow `1 + 2 * 3` or `a || b &amp;&amp; c` to be parenthesis-less because everyone know the precendence here
评论 #38436305 未加载
neontomoover 1 year ago
I couldn&#x27;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.
评论 #38437876 未加载
jdorfmanover 1 year ago
Thank you for posting this. Sourcegraph is now a sponsor on Open Collective.
codeptualizeover 1 year ago
Awesome! Lets gooo!<p>Can&#x27;t say prettier performance ever bothered me, but if it can run faster and leaner I&#x27;m all for it! Increase my battery life :D<p>In general it&#x27;s really exciting to see the advancements in JS tooling, the quick successions of tooling in JS might be controversial, but I love it. Each step was a significant improvement over what was there before, and the current Rust rewrite wave has already given us great tools that I use daily.<p>I also like that there is some money being thrown at the problems!
smnscuover 1 year ago
I feel like people complaining about Prettier being &quot;heavily opinionated&quot; are missing the point. Perhaps I&#x27;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&#x27;d never put up with K&amp;R-style newline opening brackets).
评论 #38435124 未加载
wg0over 1 year ago
&gt; Consider donating if you or your company are using Prettier and it has been helpful to you.<p>Wondering what company would NOT be using prettier. Not many.<p>Some arguing that Prettier isn&#x27;t foundational piece of software, I&#x27;d consider automated consistent readability enhancements as foundational though.
评论 #38440264 未加载
bovermyerover 1 year ago
So, how does Biome compare to Dprint?
评论 #38441804 未加载
ehutch79over 1 year ago
I&#x27;m looking through the docs, specifically the formatter stuff ( <a href="https:&#x2F;&#x2F;biomejs.dev&#x2F;formatter" rel="nofollow noreferrer">https:&#x2F;&#x2F;biomejs.dev&#x2F;formatter</a> ), and it feels like all the examples are backwards?<p>Am I missing stuff?
评论 #38434940 未加载
评论 #38440959 未加载
评论 #38434922 未加载
kamikaz1kover 1 year ago
Does any body have a collection of all the profiling Fabio Spampinato did?
评论 #38438430 未加载
afjeafaj848over 1 year ago
Maybe I missed it but I don&#x27;t get how this improves the JS implementation<p>Are they planning to run Rust in the browser? Or make some sort of node module that calls down into rust?
评论 #38436568 未加载
评论 #38437247 未加载
hendryover 1 year ago
Anyone know the minimal package.json or Github template to get this going in a new repository please?
refulgentisover 1 year ago
&quot;[to] get Biome running in Wasmer&quot;, it seems
assimpleaspossiover 1 year ago
Their next bounty should be for fixing their insistence on putting a closing slash on HTML tags that have never, ever required them in any HTML specification.
laurels-martsover 1 year ago
noob question but how does one actually use prettier? i find that the formatting just make the code less readable. is the goal to train yourself to be able to read prettier-formatted code as well as you could read your own hand-formatted code?<p>when i&#x27;m in the thick of it working on a piece of code, writing some logic and have everything laid out the way that makes sense to me and then i hit cmd + s and BOOM all the lines get shifted and wrapped and i&#x27;m ripped out of my flow i wondering what the heck it is i&#x27;m now staring at. sometimes i disable prettier on save and just run it on a pre-commit hook because at that point who cares that the code is unreadable to me.
razodactylover 1 year ago
Congratulations to the winning team.
anshulbhideover 1 year ago
Would be cool to use a Replit Bounty next time!
thenbeover 1 year ago
While it&#x27;s always great to see performance gains, my largest pain point with prettier was never performance. Instead my only gripe with prettier is the &quot;line wrapping noise&quot; it creates, illustrated here by Anthony Fu: <a href="https:&#x2F;&#x2F;antfu.me&#x2F;posts&#x2F;why-not-prettier#the-line-wrapping-noise" rel="nofollow noreferrer">https:&#x2F;&#x2F;antfu.me&#x2F;posts&#x2F;why-not-prettier#the-line-wrapping-no...</a><p>Would it be realistic to expect a solution for this issue now that &quot;prettier needs to step up it&#x27;s game&quot;?
评论 #38435476 未加载
评论 #38438160 未加载
评论 #38435548 未加载
评论 #38435367 未加载
评论 #38439936 未加载
评论 #38435923 未加载
评论 #38436607 未加载
评论 #38435515 未加载
评论 #38435227 未加载
评论 #38435308 未加载
评论 #38435403 未加载
评论 #38440167 未加载
shrimpxover 1 year ago
&gt; You may not be aware but thanks to all those donations, we&#x27;ve been able to pay two people $1.5k&#x2F;month for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job!<p>It&#x27;s incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.
评论 #38436591 未加载
评论 #38436401 未加载
评论 #38436403 未加载
评论 #38437822 未加载