JS.VUE.MUSTACHE.INTERPOLATION.SPACING
Enforce unified spacing in mustache interpolations
Rule Details
This rule aims at enforcing unified spacing in mustache interpolations.
{'vue/mustache-interpolation-spacing': ['error']}
Copy
<template>
<!-- GOOD -->
<div>{{ text }}</div>
<div>{{ text }}</div><!-- Use vue/no-multi-spaces rule to disallow multiple spaces. -->
<!-- BAD -->
<div>{{text}}</div>
</template>
Options
Copy
{
"vue/mustache-interpolation-spacing": ["error", "always" | "never"]
}
"always"
(default) ... Expect one space between expression and curly brackets."never"
... Expect no spaces between expression and curly brackets.
"never"
{'vue/mustache-interpolation-spacing': ['error', 'never']}
Copy
<template>
<!-- GOOD -->
<div>{{text}}</div>
<!-- BAD -->
<div>{{ text }}</div>
<div>{{ text }}</div>
</template>