# svelte/no-spaces-around-equal-signs-in-attribute
disallow spaces around equal signs in attribute
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
# 📖 Rule Details
This rule disallows spaces around equal signs in attributes
<script>
/* eslint svelte/no-spaces-around-equal-signs-in-attribute: "error" */
</script>
<!-- ✓ GOOD -->
<div class=""/>
<p style="color: red;">hi</p>
<img src="img.png" alt="A photo of a very cute {animal}">
<!-- ✗ BAD -->
<div classUnexpected spaces found around equal signs. (svelte/no-spaces-around-equal-signs-in-attribute) = ""/>
<p styleUnexpected spaces found around equal signs. (svelte/no-spaces-around-equal-signs-in-attribute) ="color: red;">hi</p>
<img srcUnexpected spaces found around equal signs. (svelte/no-spaces-around-equal-signs-in-attribute)
=
"img.png" altUnexpected spaces found around equal signs. (svelte/no-spaces-around-equal-signs-in-attribute) = "A photo of a very cute {animal}">
# 🔧 Options
Nothing.
# 🚀 Version
This rule was introduced in eslint-plugin-svelte v2.3.0