Pattern: Malformed v-on
directive
Issue: -
This rule enforces v-on
directive style which you should use shorthand or long form.
<template>
<!-- ✓ GOOD -->
<div @click="foo"/>
<!-- ✗ BAD -->
<div v-on:click="foo"/>
</template>
Default is set to shorthand
.
{
"vue/v-on-style": ["error", "shorthand" | "longform"]
}
"shorthand"
(default) ... requires using shorthand."longform"
... requires using long form.
<template>
<!-- ✓ GOOD -->
<div v-on:click="foo"/>
<!-- ✗ BAD -->
<div @click="foo"/>
</template>