v-on-style
Angular templatesHTMLVue / SvelteVue / Sveltestylefix: safedefault: warnhtml/eslint-plugin-vue-recommended
What it does
Section titled “What it does”Reports v-on: where the shorthand @ would do (v-on:click). The fix writes @.
Why it matters
Section titled “Why it matters”One form keeps the templates uniform and shorter.
To fix, write @; the fix does it.
Example
Section titled “Example”<template> <MyCard v-bind:title="t" v-on:click="go" :cardTitle="c" cardSub="s" my-prop="p" :ok="1"...<template> <MyCard :title="t" @click="go" :cardTitle="c" cardSub="s" my-prop="p" :ok="1"...Configuration
Section titled “Configuration”angular: lint: rules: v-on-style: warn # off, warn (default), errorhtml: lint: rules: v-on-style: warn # off, warn (default), errorsvelte: lint: rules: v-on-style: warn # off, warn (default), errorvue: lint: rules: v-on-style: warn # off, warn (default), errorEnabled by the presets: html/eslint-plugin-vue-recommended.
Suppress one line with sudsy-disable-next-line v-on-style in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| eslint-plugin-vue | v-on-style |
full |