Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 1.34 KB

no-multi-spaces.md

File metadata and controls

69 lines (52 loc) · 1.34 KB

disallow multiple spaces (vue/no-multi-spaces)

  • ⚙️ 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.

The --fix option on the command line can automatically fix some of the problems reported by this rule.

This rule aims to remove multiple spaces in a row between attributes which are not used for indentation.

Rule Details

Examples of incorrect code for this rule:

<div     class="foo"
      :style="bar"         />
<i
  :class="{
    'fa-angle-up'   : isExpanded,
    'fa-angle-down' : !isExpanded,
  }"
/>

Examples of correct code for this rule:

<div
  class="foo"
  :style="bar"
/>
<i
  :class="{
    'fa-angle-up' : isExpanded,
    'fa-angle-down' : !isExpanded,
  }"
/>

🔧 Options

This rule has an object option:

"ignoreProperties": false (default) whether or not objects' properties should be ignored

Example:

"vue/no-multi-spaces": [2, {
  "ignoreProperties": true
}]

👍 Examples of correct code for this rule:

<i
  :class="{
    'fa-angle-up'   : isExpanded,
    'fa-angle-down' : !isExpanded,
  }"
/>