useVueValidVHtml
¥Summary
-
规则生效日期:
v2.3.6¥Rule available since:
v2.3.6 -
诊断类别:
lint/nursery/useVueValidVHtml¥Diagnostic Category:
lint/nursery/useVueValidVHtml -
此规则没有修复方案。
¥This rule doesn’t have a fix.
-
此规则的默认严重级别为 information。
¥The default severity of this rule is information.
-
此规则属于以下域:
¥This rule belongs to the following domains:
-
来源:
¥Sources:
-
与
vue/valid-v-html相同¥Same as
vue/valid-v-html
-
¥How to configure
{ "linter": { "rules": { "nursery": { "useVueValidVHtml": "error" } } }}¥Description
强制使用有效的 v-html 指令。
¥Enforce valid v-html directives.
此规则会在以下情况下报告 v-html 指令:
¥This rule reports v-html directives in the following cases:
-
该指令包含一个参数。例如
<div v-html:aaa></div>¥The directive has an argument. E.g.
<div v-html:aaa></div> -
该指令有一个修饰符。例如
<div v-html.bbb></div>¥The directive has a modifier. E.g.
<div v-html.bbb></div> -
该指令没有属性值。例如
<div v-html></div>¥The directive does not have an attribute value. E.g.
<div v-html></div>
¥Examples
¥Invalid
<div v-html:aaa="foo"></div><div v-html.bbb="foo"></div><div v-html></div>¥Valid
<div v-html="htmlContent"></div>¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号