I Ditched Prettier and ESLint (Here's Why)
Vložit
- čas přidán 27. 06. 2024
- ESLint and Prettier have been around for ages, and without much competition for their top spot. Biome, has claimed the bounty and offers insane performance improvements as well as some quality of life features, all while being a linter and a formatter in one. Can it rival ESLint and Prettier? Lets find out.
Biome: biomejs.dev/
Migrating ESLint and Prettier: biomejs.dev/guides/migrate-es...
Biome Rules: biomejs.dev/linter/rules-sour...
-------
🐦 Twitter (X): jollycod.ing/x
🤓 Personal Site: jollycod.ing/me
💻 GitHub: jollycod.ing/git
JollyUI: jollycod.ing/ui
You’re really good at finding these hidden gems man! Great video
Wow.
This looks really good. Thanks for the video. I will give this a try.
Any way to fix it automatically? Only for that rule?
Other thing, any rule to remove unnecessary `{}`, like `prop={"test"}` when can be only `prop="test"`
Nice recommendation, thanks!
I use eslint airbnb rules. Can J have it in biome as well? I didn't see it in the plugins at the moment
Started using biome right now loving it❤
Nice video! Thanks for sharing. I gave it a try in my Neovim but when I have a large file it literally cuts like 80% when formatting the code lol
Yeah I think I saw this bug in their issues list, related to organise imports, hopefully gets fixed!
Tried it out after this video. Migration is super easy, works great, I even removed Prettier and Eslint. But later I noticed that it can't force type keyword on imports, or, at worst, remove them all. I knew that import sort sucks, still ok for small projects, but without that rule, it's not suitable for TS at all. And I suspect there are many such nuances that can spoil everything
There is an ongoing debate on way of sorting imports. That is kind of dealbreaker for now, yet Biome looks promising.
Not sure if this is a good idea, but I use Biome formatting in ci and prettier for in editor (for tailwind classname sorting)
Okay you have my attention.
using tabs instead of spaces, removed all single quotes... mmm honestly these defaults are not comfortable for me, but the execution speed is so impressive
6:20 unfouchently import sorting is important. It's not about pretty. For example I use pixijs and spine animation - spine plugin should be import after pixijs but before your code. Spine modifies pixijs as I get. it's dirty, but I can't change it
Yeah Biome is truly a life saver
what about oxc?
Both great tools with some differences in direction. Notably, Biome intends to support all languages formatting wise in the future and is the most feature complete.
Oxc linter on the other hand is more compatible with old ESLint. Personally I liked biome here as it was one package simple set up, and I didn’t need any extra configs.
Good comparison in Biomes GitHub here: github.com/biomejs/biome/discussions/1281#discussioncomment-7921674
@@JollyCoding thanks
One thing I worry biome doest not support graphQL 😏
Once I figure out how to use Tailwind Prettier plugin, I'll start using Biome.
Yeah I’ve found I haven’t missed too much from the prettier plugin that biome doesn’t have built in. Good to compare!
the tw plugin is too immature and lack of format on save is kind of a dealbreaker. Also, would be nice as a vsc plugin
Maybe stop using these shit tools like tailwind
Agreed. I don’t know why people are so scared of learning plain old css.
I don't know why people dunk on tailwind. You're writing actual css. Just in the same file