JSON 规则
以下是 Biome 支持的规则列表,按组划分。以下是表情符号的图例:
¥Below the list of rules supported by Biome, divided by group. Here’s a legend of the emojis:
-
图标 表示该规则是推荐规则的一部分。
¥The icon indicates that the rule is part of the recommended rules.
-
图标 表示该规则提供了可以安全应用的代码操作(修复)。
¥The icon indicates that the rule provides a code action (fix) that is safe to apply.
-
图标 表示该规则提供了不安全应用的代码操作(修复)。
¥The icon indicates that the rule provides a code action (fix) that is unsafe to apply.
-
图标 表示该规则已实现并计划在下一个版本中发布。
¥The icon indicates that the rule has been implemented and scheduled for the next release.
nursery
Section titled “nursery”| 规则名称 | 描述 | 属性 |
|---|---|---|
| noDuplicateDependencies | 防止列出重复的依赖。 | |
| useRequiredScripts | 强制要求 package.json 中包含所需的脚本。 |
suspicious
Section titled “suspicious”| 规则名称 | 描述 | 属性 |
|---|---|---|
| noBiomeFirstException | 防止在 files.includes 字段中误用 glob 模式。 | |
| noDuplicateObjectKeys | 禁止在对象内部使用两个同名的键。 | |
| noQuickfixBiome | 禁止在编辑器设置文件中使用 if quickfix.biome。 | |
| useBiomeIgnoreFolder | 推广在配置文件中忽略文件夹的正确用法。 |
¥Recommended rules
-
noBiomeFirstException(严重性:error)
¥noBiomeFirstException (Severity: error)
-
noDuplicateObjectKeys(严重性:error)
¥noDuplicateObjectKeys (Severity: error)
-
noQuickfixBiome(严重性:information)
¥noQuickfixBiome (Severity: information)
-
useBiomeIgnoreFolder(严重性:warning)
¥useBiomeIgnoreFolder (Severity: warning)
缺少规则?请通过 contributing 至 analyzer 或创建规则建议 此处 来帮助我们。
¥Missing a rule? Help us by contributing to the analyzer or create a rule suggestion here.
Biome v2.1 中文网 - 粤ICP备13048890号