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

πŸš€ Version

This rule was introduced in eslint-plugin-astro v2.1.0

πŸ” Implementation



Edit this page