Skip to content

useVueConsistentVBindStyle (HTML)

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

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

<div v-bind:foo="bar" />
code-block.vue:1:6 lint/style/useVueConsistentVBindStyle  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use shorthand ':' syntax instead of v-bind.

> 1 │ <div v-bind:foo="bar" />
^^^^^^^^^^^^^^^^
2 │

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

Unsafe fix: Use the shorthand ':' syntax instead.

1 - <div·v-bind:foo="bar"·/>
1+ <div·:foo="bar"·/>
2 2

<div :foo="bar" />
<div v-bind="props" />

Configures the preferred directive style. Default: "shorthand".

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

Use longhand 'v-bind' syntax instead of ':'.

> 1 │ <div :foo="bar" />
^^^^^^^^^^
2 │

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

Unsafe fix: Use longhand 'v-bind' syntax instead.

1 - <div·:foo="bar"·/>
1+ <div·v-bind:foo="bar"·/>
2 2

<div v-bind:foo="bar" />