DEV Community

Cover image for Biome: between code formatters and good competition
Giuliano1993
Giuliano1993

Posted on

Biome: between code formatters and good competition

Good morning, everyone, and happy MonDev! ☕

How was the weekend (long for some of us)? I hope to find you fresh for a new week of development!

Today, I want to talk to you about a relatively new tool that caught my attention more for the story that brought it to the forefront than directly for its functionality. Soon you'll understand why.

Today, we're talking about BiomeJS. Have you heard of it? Essentially, it's a library that is born and grows with the intent to replace Prettier, which, on the other hand, many of you probably already know and use. Completely written in Rust, Biome is a comprehensive tool with excellent performance. It provides all the options of Prettier (with just a few small additions), a versatile and intuitive CLI (starting with the ability to see at a glance, with a git-style system, which files would be changed and how), and a quite detailed documentation (including the main differences from Prettier).

All in all, a good tool but, except for performance, not particularly different from the mainstream counterpart. Why am I talking to you about it then? Beyond my love for Rust (which already earns a place among my resolutions for the new year), truth is that, as I mentioned, I was fascinated by the story behind this tool. In fact, even though it was already born and growing, the incentive for exponential improvement came directly from Prettier itself!

In late October, the well-known code formatting tool launched a challenge on Algora with a reward of $20,000 for anyone who could develop a Rust-based code formatter that passed at least 95% of Prettier's JS tests. Why would they do such a thing? On the Prettier blog, it's explained that, being the de facto standard for code formatting, the project had no real motivation to push for performance improvement. Essentially, they decided to allocate these funds to have a valid competitor and be motivated to do even better. An idea like this will now allow Prettier itself to grow and has also brought an alternative to the code formatter landscape. Plus, all contributors who participated received a portion of the prize. Indeed, initiatives are gradually emerging that allow for financial recognition from contributing to open-source projects, and this is a beautiful thing!

That's it! After this story, I decided to try adopting Biome as a code formatter, and I'm liking it. Whether you decide to try it or not, I thought it was a nice story to start the week!

As always, have a great Monday and Happy Coding 1_0

Top comments (0)