pyodide icon indicating copy to clipboard operation
pyodide copied to clipboard

Add more formatter rules and enable TS linter in Biome

Open ryanking13 opened this issue 4 months ago • 4 comments

Description

Thanks to @rbm0524, we replaced prettier with biome (#5820), a Rust-based, super-fast JS/TS formatter and linter.

Currently, we are only applying very basic formatting rules in Biome, but I think we can have more rules to improve the formatting of our TS codebase.

Also, as a biome can serve as a linter too, introducing linter rules would help us check common human errors automatically.

ryanking13 avatar Aug 23 '25 02:08 ryanking13

I checked, please assign me the issue!

rbm0524 avatar Aug 23 '25 04:08 rbm0524

@rbm0524 Thanks!

ryanking13 avatar Aug 24 '25 06:08 ryanking13

https://biomejs.dev/reference/configuration/#javascript https://biomejs.dev/linter/javascript/rules/#recommended-rules The first link is a description of the recommended-rules in linter, and the second link is a description of the recommended-rules in linter for compatibility with linter. I think it would be better to apply only the recommended-rules in linter and keep the format as it is, what do you think?

rbm0524 avatar Sep 07 '25 05:09 rbm0524

@rbm0524

Yes, the current formatting rule is not that bad, so we don't need to agressively add more rules. If you find if there are some formatting rules that might be useful, feel free to apply it and ask for review though.

About the linter rules, yes, I think we can start by adding the recommended rules in the docs you linked. However, let's apply it gradually to avoid making too many changes in a single PR.

ryanking13 avatar Sep 08 '25 12:09 ryanking13