- ⚙️ This rule is included in
"plugin:vue/strongly-recommended"
and"plugin:vue/recommended"
. - 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
This rule enforces v-on
directive style which you should use shorthand or long form.
👎 Examples of incorrect code for this rule:
<div v-on:click="foo"/>
👍 Examples of correct code for this rule:
<div @click="foo"/>
👎 Examples of incorrect code for this rule with "longform"
option:
<div @click="foo"/>
👍 Examples of correct code for this rule with "longform"
option:
<div v-on:click="foo"/>
"shorthand"
(default) ... requires using shorthand."longform"
... requires using long form.