useVueValidVBind
¥Summary
-
规则生效日期:
v2.3.6¥Rule available since:
v2.3.6 -
诊断类别:
lint/nursery/useVueValidVBind¥Diagnostic Category:
lint/nursery/useVueValidVBind -
此规则没有修复方案。
¥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-bind相同¥Same as
vue/valid-v-bind
-
¥How to configure
{ "linter": { "rules": { "nursery": { "useVueValidVBind": "error" } } }}¥Description
禁止 v-bind 指令缺少参数或修饰符无效。
¥Forbids v-bind directives with missing arguments or invalid modifiers.
此规则会在以下情况下报告 v-bind 指令:
¥This rule reports v-bind directives in the following cases:
-
该指令没有参数。例如
<div v-bind></div>¥The directive does not have an argument. E.g.
<div v-bind></div> -
该指令没有值。例如
<div v-bind:aaa></div>¥The directive does not have a value. E.g.
<div v-bind:aaa></div> -
该指令包含无效修饰符。例如
<div v-bind:aaa.bbb="ccc"></div>¥The directive has invalid modifiers. E.g.
<div v-bind:aaa.bbb="ccc"></div>
¥Examples
¥Invalid
<Foo v-bind /><div v-bind></div>¥Valid
<Foo v-bind:foo="foo" />¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号