⚠️ This rule was deprecated and replaced by html-self-closing rule.- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
Self-closing (e.g. <br/>
) is syntax of XML/XHTML.
HTML ignores it.
This rule reports every self-closing element except XML context.
👎 Examples of incorrect code for this rule:
<template>
<div>
<img src="./logo.png"/>
</div>
</template>
👍 Examples of correct code for this rule:
<template>
<div>
<img src="./logo.png">
<svg>
<!-- this is XML context -->
<rect width="100" height="100" />
</svg>
</div>
</template>
Nothing.