Eslint -> Biome. Build still uses eslint?
Answered
English Angora posted this in #help-forum
English AngoraOP
I'm attempting to rid myself of eslint.
Next build still seems to use it, despite me setting my lint target to use biome as documented. Have I missed a step?Answered by English Angora
In another Discord I figured out that the issue is that I'm using Next 15.5, not 16. I'm now using biome as my linter and formatter in VSCode, using build --no-lint.
10 Replies
including biome.json
English AngoraOP
yep. Sorry for the delay...
English AngoraOP
my package.json has:
biome.json:
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "biome check",
"format": "biome format --write",
"typegen": "next typegen",
},biome.json:
{
"$schema": "https://biomejs.dev/schemas/2.3.6/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"lineWidth": 155
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"assist": {
"enabled": true,
"actions": {
"source": { "organizeImports": "on"
}
}
}
}I noticed that eslint was still in use, because while I switched to biome, and VSCode is using biome ... the build doesn't. One of my kyesly migrations has a biome ignore comment, but no eslint ignore comment, and as a result it failed the lint step.
@English Angora I noticed that eslint was still in use, because while *I* switched to biome, and VSCode is using biome ... the build doesn't. One of my kyesly migrations has a biome ignore comment, but no eslint ignore comment, and as a result it failed the lint step.
nextjs itself uses eslint. You however, can call your own linting script before the build process, to validate your code. A little bit like that:
"build": "npm run lint && next build"English AngoraOP
In another Discord I figured out that the issue is that I'm using Next 15.5, not 16. I'm now using biome as my linter and formatter in VSCode, using build --no-lint.
Answer
English AngoraOP
Thank you for getting back to me, though.