`)">
Skip to content

lodash-template/no-multi-spaces-in-html-tag

disallow multiple spaces in HTML tags. (ex. 🆖 <input···type="text">)

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

Rule Details

This rule aims to disallow multiple whitespace in a between attributes which are not used for indentation.

html
<% /* eslint "lodash-template/no-multi-spaces-in-html-tag": "error" */ %>
<!-- ✓ GOOD -->
<input
  class="foo"
  type="text"
>

<input class="foo" type="text">

<!-- ✗ BAD -->
<input
class="foo"
type="text"
>

Implementation