Biome 配置
安装
npx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/biome-rules.jsonyarn dlx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/biome-rules.jsonpnpx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/biome-rules.jsonbunx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/biome-rules.json参考
最佳实践
请根据项目需求调整配置文件内容。
- 将
biome.json文件放置在项目根目录。 - 使用
biome check命令检查代码质量,代替eslint。 - 使用
biome format命令格式化代码。
package.json 示例:
{
"scripts": {
"lint": "biome check --write",
"format": "biome format --write"
}
}