astro/no-omitted-end-tags
disallow omitted end tags
- β οΈ This rule was deprecated.
π Rule Details
This rule was a temporary migration aid for finding elements whose end tags were omitted. It is now deprecated and no longer reports any problems.
Astroβs Rust compiler (@astrojs/compiler-rs) does not infer HTML optional
end tags such as <p>one<p>two, <li>one<li>two, or
<option>A<option>B. Astro v7 made the Rust compiler the default compiler and
requires every non-void element to have a matching end tag. Files with omitted
end tags are rejected before ESLint rules can run, so this rule can no longer
report them.
Historically, the previous compiler documented unclosed HTML tags as accepted syntax. The explicit form required by the Rust compiler should be used instead.
π§ Options
Nothing.
π Note
This rule is kept as a deprecated no-op so existing ESLint configurations that
still mention astro/no-omitted-end-tags do not fail with an unknown-rule
configuration error.
If you still need the historical linting and autofix behavior while migrating a
codebase, keep using an earlier eslint-plugin-astro release from v2.1 onward
that still implements this rule. Once the source has been updated to use
explicit end tags, you can upgrade safely and remove this rule from your
configuration.
π Further Reading
- Astro v7 Upgrade Guide > Rust compiler
@astrojs/compiler-rsissue #50: donβt infer HTML optional end tags
π Version
This rule was introduced in eslint-plugin-astro v2.1.0
π Implementation
Edit this page
βastro/no-unused-css-selectorNext Page
astro/prefer-class-list-directiveβ