` :ng: `
`)">
Skip to content

lodash-template/no-space-attribute-equal-sign

disallow spacing around equal signs in attribute. (ex. 🆗 <div class="item"> 🆖 <div class = "item">)

  • ⚙️ 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 disallow spacing around equal signs in attribute.

HTML5 allows spaces around equal signs. But space-less is easier to read, and groups entities better together.

html
<% /* eslint "lodash-template/no-space-attribute-equal-sign": "error" */ %>
<!-- ✓ GOOD -->
<input class="item">

<!-- ✗ BAD -->
<input class 
=
"item">

Further Reading

Implementation