✨ feat: better biome develop experience#39
Merged
nick-cjyx9 merged 2 commits intoopen-ani:mainfrom Feb 10, 2026
Merged
Conversation
Contributor
Author
|
如果可以的话,推荐 lint-staged 也加上 biome 检查:https://biomejs.dev/recipes/git-hooks/#lint-staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改善了 Biome 相关配置,并进行了格式化。
VS Code 配置
在原有配置基础上,为常用语言显式指定 Biome 作为默认 formatter。
仅设置
"editor.defaultFormatter": "biomejs.biome"并不能保证所有开发者环境都会生效:因为可能在全局已经针对语言配置了其他 formatter。这是目前比较通用的实践。(参考 biomejs/biome-vscode#230 、@maxchang3/biome-config等)。Biome 配置
"root": true,此为默认值。useIgnoreFile,使.gitignore中文件自动被 Biome 忽略。files.includes:**)。考虑到 Biome 实际支持的语言范围有限,此前includes包含的后缀要么支持,要么不支持。.gitignore已经涵盖的文件匹配。code:lint修改为biome check --write .。项目中 Biome 同时作为 linter 和 formatter 使用,并且已启用保存时自动修复;此前脚本仅执行 lint 修复,与实际使用行为不一致,此处进行统一。