modern.js icon indicating copy to clipboard operation
modern.js copied to clipboard

[Feature]: Replace ESLint with Biome

Open chenjiahan opened this issue 1 year ago • 7 comments

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:

  • https://biomejs.dev/
  • https://github.com/web-infra-dev/rspress/pull/702

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.

chenjiahan avatar Mar 06 '24 09:03 chenjiahan

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

kirillbashtenko avatar Mar 13 '24 14:03 kirillbashtenko

@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

chenjiahan avatar Mar 14 '24 02:03 chenjiahan

Thank you, now it's clear!

kirillbashtenko avatar Mar 14 '24 13:03 kirillbashtenko

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

YanPes avatar Jun 14 '24 09:06 YanPes

bumpinng

ScriptedAlchemy avatar Jun 17 '24 16:06 ScriptedAlchemy

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

YanPes avatar Jun 18 '24 11:06 YanPes

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

chenjiahan avatar Jun 18 '24 13:06 chenjiahan

Thank you for this 🎉

YanPes avatar Aug 16 '24 06:08 YanPes