Skip to content

v-bind-style

Reports v-bind: where the shorthand : would do (v-bind:href). The fix writes :.

One form keeps the templates uniform and shorter; the long form reads as a different thing from the short one though they mean the same.

To fix, write :; the fix does it.

Reported
<template>
<MyCard v-bind:title="t" v-on:click="go" :cardTitle="c" cardSub="s" my-prop="p"
:ok="1"
...
After the fix
<template>
<MyCard :title="t" @click="go" :cardTitle="c" cardSub="s" my-prop="p"
:ok="1"
...
angular:
lint:
rules:
v-bind-style: warn # off, warn (default), error
html:
lint:
rules:
v-bind-style: warn # off, warn (default), error
svelte:
lint:
rules:
v-bind-style: warn # off, warn (default), error
vue:
lint:
rules:
v-bind-style: warn # off, warn (default), error

Enabled by the presets: html/eslint-plugin-vue-recommended.

Suppress one line with sudsy-disable-next-line v-bind-style in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
eslint-plugin-vue v-bind-style full