Require a specific case for DOCTYPE

Rule ID:
doctype-style
Category:
Style
Standards:
-

While DOCTYPE is case-insensitive in the standard this rule requires it to be a specific style. The standard consistently uses uppercase which is the default style for this rule.

Mixed case it not supported.

Rule details

Examples of incorrect code for this rule:

<!Doctype html>
error: DOCTYPE should be uppercase (doctype-style) at inline:1:1:
> 1 | <!Doctype html>
    | ^^^^^^^^^^


1 error found.

Examples of correct code for this rule:

<!DOCTYPE html>

Options

This rule takes an optional object:

{
  "style": "uppercase"
}

style