Skip to content

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> 元素。
规则名称描述属性
noAmbiguousAnchorText禁止使用含义模糊的锚点描述。
noScriptUrl禁止在 HTML 中使用 javascript: URL。
noSyncScripts防止使用同步脚本。
noVueVIfWithVFor禁止在同一元素上使用 v-ifv-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

缺少规则?请通过 contributinganalyzer 或创建规则建议 此处 来帮助我们。

¥Missing a rule? Help us by contributing to the analyzer or create a rule suggestion here.