src/content/docs/linter/rules/use-vue-valid-v-on.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="HTML" icon="seti:html"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.3.6` - Diagnostic Category: [`lint/nursery/useVueValidVOn`](/reference/diagnostics#diagnostic-category) - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - This rule belongs to the following domains: - [`vue`](/linter/domains#vue) - Sources: - Same as [`vue/valid-v-on`](https://eslint.vuejs.org/rules/valid-v-on){
"linter": {
"rules": {
"nursery": {
"useVueValidVOn": "error"
}
}
}
}
Enforce valid v-on directives with proper arguments, modifiers, and handlers.
This rule reports v-on directives in the following cases:
<div v-on="foo"></div><div v-on:click.bogus="foo"></div><div v-on:click></div><Foo v-on />
<Foo v-on:click="foo" />