Skip to content

head-script-disabled: new option to allow modules and defer scripts inside head tag #1685

@gian1200

Description

@gian1200

Is your feature request related to a problem? Please describe.
Currently, head-script-disabled has a ON/OFF configuration regarding scripts inside head tag. However, if the script is a module or is marked with defer, then it's execution do no block html parsing (as it used to be in the past with regular scripts).

This is equivalent to placing the same script at the end of the body).

Describe the solution you'd like
I'd be nice if a new option be added to this rule to disallow scripts in head, except when they are modules (type="module") or when they are defer.

https://htmlhint.com/rules/head-script-disabled/

Additional context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions