Samfundet / Samfundet4

The new website for Samfundet
MIT License
10 stars 1 forks source link

Switch to Biome #1195

Open robines opened 3 weeks ago

robines commented 3 weeks ago

I'd like us to consider switching to Biome. Biome provides both a formatter and a linter, and is super fast compared to ESLint and Prettier. I've been using Biome for some other projects and I've been really pleased with it. It has a really sane default configuration, is easy to configure, has good editor/IDE support, and I find its output/suggestions much more helpful.

Its Differences with Prettier page is also a good read.

Below are some timing results (using GNU time) on the Samf4 project on master, using the default Biome config.

ESLint

root@e72eafc92be7:/app# time yarn run eslint:check

real    0m6.858s
user    0m9.880s
sys 0m1.168s

Time to run: ~6s

Biome lint

root@e72eafc92be7:/app# time yarn run biome lint .

***truncated output***

real    0m0.668s
user    0m0.841s
sys 0m0.210s

Time to run: ~0.6s

Biome format

root@e72eafc92be7:/app# time yarn run biome format .

***truncated output***

real    0m0.710s
user    0m0.747s
sys 0m0.271s

Time to run: ~0.7s

Biome check (same as lint+format in one step)

root@e72eafc92be7:/app# time yarn run biome check .

***truncated output***

real    0m0.733s
user    0m0.953s
sys 0m0.270s

Time to run: ~0.7s

robines commented 2 weeks ago

@emilte Noen tanker om dette? Har gjort endringene i #1226 hvis du vil teste det ut

emilte commented 2 weeks ago

Hittil synes jeg alt rundt formatter og linter har vært herk i frontend verden. Jeg støtter å prøve noe annet