web-infra-dev / modern.js

Modern.js is a web engineering system, including a web framework and a npm package solution.
https://modernjs.dev/en/
MIT License
4.29k stars 354 forks source link

[Feature]: Replace ESLint with Biome #5506

Open chenjiahan opened 4 months ago

chenjiahan commented 4 months ago

What problem does this feature solve?

ESLint has obvious performance issues in large monorepos like modern.js.

We can use Biome as the linter to replace ESLint, which can reduce dependencies and improve the lint performance.

Ref:

What does the proposed API look like?

  1. Add Biome to the Modern.js repo and replace ESLint.
  2. Consider adding Biome to the project templates of Modern.js App and Module.
  3. If 1 and 2 are done, we can remove the @modern-js/eslint-config package and reduce the maintenance overhead.
kirillbashtenko commented 4 months ago

Hello @chenjiahan , I'm curious why not oxclint since it's already part of the ecosystem?

chenjiahan commented 4 months ago

@kirillbashtenko Both Biome and OXC can be used to speed up linting, Modern.js choose to use Biome because it can be used for both linting and formatting.

Here is a discussion for comparison: https://github.com/biomejs/biome/discussions/1281

kirillbashtenko commented 4 months ago

Thank you, now it's clear!

YanPes commented 1 month ago

@chenjiahan thank you for opening the issue. Would love to use biome with modernjs for our code bases

ScriptedAlchemy commented 1 month ago

bumpinng

YanPes commented 1 month ago

@chenjiahan Is it planned to have a dedicated set of "default" fields or will you use the standard biome "recommended" list as default?

chenjiahan commented 1 month ago

I prefer following the standard biome "recommended" list because it is well designed.