HTML Rules
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.
| Rule name | Description | Properties |
|---|---|---|
| noAccessKey | Enforce that the accesskey attribute is not used on any HTML element. | |
| noDistractingElements | Enforces that no distracting elements are used. | |
| noHeaderScope | The scope prop should be used only on <th> elements. | |
| useButtonType | Enforces the usage and validity of the attribute type for the element button | |
| useHtmlLang | Enforce that html element has lang attribute. |
nursery
Section titled “nursery”| Rule name | Description | Properties |
|---|---|---|
| noSyncScripts | Prevent the usage of synchronous scripts. | |
| noVueVIfWithVFor | Disallow using v-if and v-for directives on the same element. | |
| useVueHyphenatedAttributes | Enforce hyphenated (kebab-case) attribute names in Vue templates. | |
| useVueValidVBind | Forbids v-bind directives with missing arguments or invalid modifiers. | |
| useVueValidVElse | Enforce valid usage of v-else. | |
| useVueValidVElseIf | Enforce valid v-else-if directives. | |
| useVueValidVHtml | Enforce valid v-html directives. | |
| useVueValidVIf | Enforces valid v-if usage for Vue templates. | |
| useVueValidVOn | Enforce valid v-on directives with proper arguments, modifiers, and handlers. | |
| useVueValidVText | Enforce valid v-text Vue directives. |
Recommended rules
Section titled “Recommended rules”- noAccessKey (Severity: error)
- noDistractingElements (Severity: error)
- noHeaderScope (Severity: error)
- useButtonType (Severity: error)
- useHtmlLang (Severity: error)
Missing a rule? Help us by contributing to the analyzer or create a rule suggestion here.
Copyright (c) 2023-present Biome Developers and Contributors.