src/content/docs/linter/rules/use-vue-consistent-v-bind-style.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="HTML" icon="seti:html"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.3.11` - Diagnostic Category: [`lint/nursery/useVueConsistentVBindStyle`](/reference/diagnostics#diagnostic-category) - This rule has an [**unsafe**](/linter/#unsafe-fixes) fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - This rule belongs to the following domains: - [`vue`](/linter/domains#vue) - Sources: - Same as [`vue/v-bind-style`](https://eslint.vuejs.org/rules/v-bind-style){
"linter": {
"rules": {
"nursery": {
"useVueConsistentVBindStyle": "error"
}
}
}
}
Enforce a consistent style for v-bind in Vue templates.
<div v-bind:foo="bar" />
<div :foo="bar" />
styleConfigures the preferred directive style. Default: "shorthand".
{
"linter": {
"rules": {
"nursery": {
"useVueConsistentVBindStyle": {
"options": {
"style": "longhand"
}
}
}
}
}
}
<div :foo="bar" />
<div v-bind:foo="bar" />