Skip to content
Marcos Caceres edited this page Mar 28, 2026 · 1 revision

check-charset

Default: false

Verifies the document has exactly one <meta charset="utf-8"> in the <head>. Warns if it is missing or if multiple charset declarations are present.

Usage

var respecConfig = {
  lint: {
    "check-charset": true,
  },
};

What it checks

<head>
  <meta charset="utf-8" />
  <!-- only one charset declaration — OK -->
</head>
<head>
  <!-- no <meta charset> — will warn -->
</head>

Notes

  • Off by default
  • The ReSpec starter templates include <meta charset="utf-8"> so this rule is mainly useful as a safety check on legacy documents

Guides

Configuration options

W3C Configuration options

Linting rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

HTML attributes

CSS Classes

Special properties

Clone this wiki locally