跳到主要内容

biome

brew install biome          # by macOS Brew
pnpm add -Dw @biomejs/biome # add to Project

# check=lint+format
npx biome check ./src # 如果安装了 @biomejs/biome

npx biome start # daemon
time npx biome check ./src --use-server # 一般项目 user 快 0.2s

# 如果没安装 @biomejs/biome
npx @biomejs/biome check ./src
npx @biomejs/biome check ./src --apply

biome.json

{
"javascript": {
"parser": {
"unsafeParameterDecoratorsEnabled": true
}
},
"formatter": {
"enabled": false
},
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off",
"noShadowRestrictedNames": "off",
"noAssignInExpressions": "off"
},
"style": {
"useConst": "off",
"noNonNullAssertion": "warn",
"noUnusedTemplateLiteral": "off",
"noParameterAssign": "off"
},
"complexity": {
"noBannedTypes": "off",
"noStaticOnlyClass": "off"
}
}
}
}