HTML 规则
以下是 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.
| 规则名称 | 描述 | 属性 |
|---|---|---|
| noHeaderScope | 范围属性应仅用于 <th> 元素。 |
nursery
Section titled “nursery”| 规则名称 | 描述 | 属性 |
|---|---|---|
| noAmbiguousAnchorText | 禁止使用含义模糊的锚点描述。 | |
| noScriptUrl | 禁止在 HTML 中使用 javascript: URL。 | |
| noSyncScripts | 防止使用同步脚本。 | |
| noVueVIfWithVFor | 禁止在同一元素上使用 v-if 和 v-for 指令。 | |
| useVueHyphenatedAttributes | 强制 Vue 模板中的属性名称使用连字符(kebab-case)。 | |
| useVueValidVBind | 禁止 v-bind 指令缺少参数或修饰符无效。 | |
| useVueValidVElse | 强制使用 v-else 语句。 | |
| useVueValidVElseIf | 强制使用有效的 v-else-if 指令。 | |
| useVueValidVHtml | 强制使用有效的 v-html 指令。 | |
| useVueValidVIf | 强制 Vue 模板使用有效的 v-if。 | |
| useVueValidVOn | 强制使用带有正确参数、修饰符和处理程序的有效 v-on 指令。 | |
| useVueValidVText | 强制使用有效的 Vue v-text 指令。 |
¥Recommended rules
-
noHeaderScope(严重性:error)
¥noHeaderScope (Severity: error)
缺少规则?请通过 contributing 至 analyzer 或创建规则建议 此处 来帮助我们。
¥Missing a rule? Help us by contributing to the analyzer or create a rule suggestion here.
Biome v2.1 中文网 - 粤ICP备13048890号