Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.45 KB

no-spaces-around-equal-signs-in-attribute.md

File metadata and controls

53 lines (37 loc) · 1.45 KB
pageClass sidebarDepth title description since
rule-details
0
svelte/no-spaces-around-equal-signs-in-attribute
disallow spaces around equal signs in attribute
v2.3.0

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 class = ""/>
<p style ="color: red;">hi</p>
<img src
    =
    "img.png" alt   = "A photo of a very cute {animal}">

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-svelte v2.3.0

🔍 Implementation