Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.27 KB

mustache-interpolation-spacing.md

File metadata and controls

58 lines (38 loc) · 1.27 KB

enforce unified spacing in mustache interpolations (vue/mustache-interpolation-spacing)

  • ⚙️ This rule is included in "plugin:vue/strongly-recommended" and "plugin:vue/recommended".
  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule aims to enforce unified spacing in mustache interpolations.

👎 Examples of incorrect code for this rule:

<div>{{   text   }}</div>
<div>{{text}}</div>

👍 Examples of correct code for this rule:

<div>{{ text }}</div>

🔧 Options

Default spacing is set to always

'vue/mustache-interpolation-spacing': [2, 'always'|'never']

"always" - Expect one space between expression and curly brackets.

👎 Examples of incorrect code for this rule:

<div>{{   text   }}</div>
<div>{{text}}</div>

👍 Examples of correct code for this rule:

<div>{{ text }}</div>

"never" - Expect no spaces between expression and curly brackets.

👎 Examples of incorrect code for this rule:

<div>{{ text }}</div>

👍 Examples of correct code for this rule:

<div>{{text}}</div>