Skip to content

useVueValidVHtml

  • Rule available since: v2.3.6
  • Diagnostic Category: lint/correctness/useVueValidVHtml
  • This rule is recommended, meaning it is enabled by default.
  • This rule doesn’t have a fix.
  • The default severity of this rule is error.
  • This rule belongs to the following domains:
  • Sources:
biome.json
{
"linter": {
"rules": {
"correctness": {
"useVueValidVHtml": "error"
}
}
}
}

Enforce valid v-html directives.

This rule reports v-html directives in the following cases:

  • The directive has an argument. E.g. <div v-html:aaa></div>
  • The directive has a modifier. E.g. <div v-html.bbb></div>
  • The directive does not have an attribute value. E.g. <div v-html></div>
<div v-html:aaa="foo"></div>
<div v-html.bbb="foo"></div>
<div v-html></div>
<div v-html="htmlContent"></div>