useVueValidVOn
¥Summary
-
规则生效日期:
v2.3.6¥Rule available since:
v2.3.6 -
诊断类别:
lint/nursery/useVueValidVOn¥Diagnostic Category:
lint/nursery/useVueValidVOn -
此规则没有修复方案。
¥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-on相同¥Same as
vue/valid-v-on
-
¥How to configure
{ "linter": { "rules": { "nursery": { "useVueValidVOn": "error" } } }}¥Description
强制使用带有正确参数、修饰符和处理程序的有效 v-on 指令。
¥Enforce valid v-on directives with proper arguments, modifiers, and handlers.
此规则会在以下情况下报告 v-on 指令:
¥This rule reports v-on directives in the following cases:
-
该指令没有事件名称。例如
<div v-on="foo"></div>¥The directive does not have an event name. E.g.
<div v-on="foo"></div> -
该指令包含无效修饰符。例如
<div v-on:click.bogus="foo"></div>¥The directive has invalid modifiers. E.g.
<div v-on:click.bogus="foo"></div> -
该指令缺少处理表达式。例如
<div v-on:click></div>¥The directive is missing a handler expression. E.g.
<div v-on:click></div>
¥Examples
¥Invalid
<Foo v-on />¥Valid
<Foo v-on:click="foo" />¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号