Skip to content

Conversation

@nicogaldamez
Copy link
Contributor

@nicogaldamez nicogaldamez commented Sep 3, 2025

Add html-body-only-elements rule

This PR adds a new linter rule html-body-only-elements that enforces certain HTML elements are only placed within the <body> tag.

What does this rule do?

This rule prevents content-bearing and interactive HTML elements from being placed in the <head> section or outside the HTML document structure.

Closes #378

@marcoroth marcoroth changed the title Add html-body-only-elements rule Sep 16, 2025
@marcoroth marcoroth changed the title Implement html-body-only-elements rule linter rule Oct 8, 2025
@marcoroth marcoroth changed the title Linter: Implement html-body-only-elements rule linter rule Oct 14, 2025
@marcoroth marcoroth merged commit 09e065e into marcoroth:main Oct 14, 2025
asilano pushed a commit to fac/herb that referenced this pull request Oct 21, 2025
Add `html-body-only-elements` rule

This PR adds a new linter rule `html-body-only-elements` that enforces
certain HTML elements are only placed within the `<body>` tag.

## What does this rule do?

This rule prevents content-bearing and interactive HTML elements from
being placed in the `<head>` section or outside the HTML document
structure.

Closes marcoroth#378

---------

Co-authored-by: Marco Roth <marco.roth@intergga.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants