vikejs / bati

Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want.
https://batijs.dev
MIT License
284 stars 14 forks source link

eslint-ignore comments should be replaced with biome equivalents when generating biome #428

Open firxworx opened 4 days ago

firxworx commented 4 days ago

Describe the bug

Generating a new repo with bati with the biome option selected outputs code files that may have eslint ignore comments which are not supported by biome. Instead biome equivalents should be conditionally used in place.

As a related issue which I'll note here vs. filing (I leave it to you to decide): there are some biome format

My $0.02 would be to run either eslint or biome lint+format with write (depending on what option the user selected) as a "post" step after scaffolding a new application. If lint errors might look scary re DX for new users then they could be output to a file or suppressed and the instructions displayed in the terminal (bullet list that starts with installing dependencies)

FYI biome has a biome check --write command where check includes both lint and format. I would kindly suggest also adding it as a "check" or "biome:check" script in package.json.

Bati is incredible work by the way, it is very ambitious. I hope you find me chipping in a few issues helpful related to my experience trying it out. Its a tough job to maintain something with so many different combinations and moving targets with all the deps in play.

To Reproduce

Run bati with biome option.

Use rg or find+grep to find estlint related comments, or try running lint/format.

Expected behavior

No mentions of eslint or eslint-specific suppression comments when generating with biome.

magne4000 commented 1 day ago

This is indeed something I want to fix, but I need to find a proper solution to solve this.

My $0.02 would be to run either eslint or biome lint+format with write

Remaining errors will mostly be non auto-fixable. In IDE, code is checked through ESLint (because it supports more use case than Biome for now, like SolidJS). In generated code, it can be checked by ESLint or Biome, and would indeed need some kind of way to remove ESLint comments when necessary, but also add Biome ones if required.