Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 965 Bytes

v-bind-style.md

File metadata and controls

52 lines (39 loc) · 965 Bytes

Enforce v-bind directive style (v-bind-style)

  • 🔧 This rule is fixable with eslint --fix command.

This rule enforces v-bind directive style which you should use shorthand or long form.

📖 Rule Details

👎 Examples of incorrect code for this rule:

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

👍 Examples of correct code for this rule:

<template>
    <div>
        <div :foo="foo"></div>
    </div>
</template>

👎 Examples of incorrect code for this rule with "longform" option:

<template>
    <div>
        <div :foo="foo"></div>
    </div>
</template>

👍 Examples of correct code for this rule with "longform" option:

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

🔧 Options

  • "shorthand" (default) ... requires using shorthand.
  • "longform" ... requires using long form.