Skip to content

useVueConsistentVOnStyle (HTML)

Language HTML
biome.json
{
"linter": {
"rules": {
"style": {
"useVueConsistentVOnStyle": "error"
}
}
}
}

Enforce a consistent style for v-on in Vue templates.

<div v-on:click="onClick" />
code-block.vue:1:6 lint/style/useVueConsistentVOnStyle  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use shorthand '@' syntax instead of 'v-on'.

> 1 │ <div v-on:click="onClick" />
^^^^^^^^^^^^^^^^^^^^
2 │

This project prefers to use shorthand syntax for v-on.

Unsafe fix: Rewrite to shorthand '@' syntax.

1 - <div·v-on:click="onClick"·/>
1+ <div·@click="onClick"·/>
2 2

<div @click="onClick" />

Configures the preferred directive style. Accepts "shorthand" or "longhand". Default: "shorthand".

biome.json
{
"linter": {
"rules": {
"style": {
"useVueConsistentVOnStyle": {
"level": "on",
"options": {
"style": "longhand"
}
}
}
}
}
}
<div @click="onClick" />
code-block.vue:1:6 lint/style/useVueConsistentVOnStyle  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use longhand 'v-on' syntax instead of '@'.

> 1 │ <div @click="onClick" />
^^^^^^^^^^^^^^^^
2 │

This project prefers to use longhand syntax for v-on.

Unsafe fix: Rewrite to longhand 'v-on' syntax.

1 - <div·@click="onClick"·/>
1+ <div·v-on:click="onClick"·/>
2 2

<div v-on:click="onClick" />