Migrate ESLint rules to Biome
Convert an ESLint config with Biome, then verify the generated rules against files that should pass and fail before switching CI.
When you replace ESLint with Biome, keep both linters long enough to run them on the same files. Start by migrating one rule and checking that both commands catch the same violation.
Convert one rule and trip it
In a project with ESLint and Biome installed, run the migration from the directory that contains the ESLint config. For a scratch project, put this flat config in eslint.config.mjs.
export default [
{
rules: {
eqeqeq: 'error',
},
},
]ESLint will report a loose equality comparison as an error in the JavaScript files covered by this config.
If the project has no Biome config, run pnpm exec biome init to create one. Run Biome's ESLint migration. Leave --write off to inspect the proposed changes before writing, especially if the project has a Biome config already.
pnpm exec biome migrate eslint --writeFor this config, the migration sets linter.rules.suspicious.noDoubleEquals to error in biome.json.
Save const matches = value => value == 0 in probe.js and run both linters on that file while the old config is still available.
pnpm exec eslint probe.js
pnpm exec biome lint probe.jsBoth commands flag the comparison, and replacing == with === removes that diagnostic in both.
Compare what CI will check
Repeat the probe for any rule you rely on for correctness. Use a real exception from your config as the passing fixture if you have one. For example, put a comparison inside a directory with an ESLint override and inspect the diagnostics in that directory as well as in application code. Check the rule name and the exit status. A warning where you had an error can let a failing check through CI.
Some ESLint rules have a Biome rule inspired by them. Biome leaves those out by default. Review those cases before using --include-inspired, since the rule can flag different code or expose different options. For a rule with no equivalent, you can keep a smaller ESLint check for the files that need it.
Run both lint jobs over the same checkout before removing the old one. Start with files at the edges of your lint scope, such as tests or generated output, where a missed ignore or override can change what CI sees.