Cevdet Haran

deadhead

An HTML head linter with a CLI, an ESLint plugin and a playground

Checks the HTML head of web pages for harmful, outdated or unnecessary tags, explains every finding with sources and fixes what is safe to fix.

Home page of deadhead

deadhead.cevdet.ch

Device
Home page of deadhead on a desktop, light schemeHome page of deadhead on a desktop, dark scheme

Drag the handle to compare light and dark.Left: your scheme. Right: the other one.

Home page of deadhead on a phone, light schemeHome page of deadhead on a phone, dark scheme

Drag the handle to compare light and dark.Left: your scheme. Right: the other one.

Facts

Role
Creator and maintainer
Kind
package
Status
shipped and kept up to date
Site
deadhead.cevdet.ch
Lighthouse
Performance 100 · Accessibility 100 · Best practices 100 · SEO 100,measured by PageSpeed Insights on the home page (mobile; performance the best of 5 runs, the rest the median), 21 November 2026
Repository
cevdetch/deadhead
npm deadhead
0.4.0, released 21 November 2026
npm eslint-plugin-deadhead
0.4.0, released 21 November 2026
Latest release
v0.4.0, 21 November 2026
Licence
MIT
Active
September 2026 to November 2026
Commits
352
Rules
205 sourced rules: 92 for the head and 113 for markup in the body or anywhere in the page

Stack

Highlights

  • Built an HTML head linter with 205 sourced rules, a CLI, an ESLint plugin and a browser playground, generating the linter and its documentation from one set of Markdown rule files.
  • Audited 4,570 homepages from the Tranco top 10,000, respecting robots.txt: 44% had a finding classified as harmful and 99% had at least one.
Metrics
MetricValueMeasuredSource
Sourced rules20521 November 2026deadhead 0.4.0 release notes
Homepages audited4,570 of 10,000 targets4 October 2026deadhead corpus results
Homepages with a harmful-classified finding2,029 (44%)4 October 2026deadhead corpus results

Problem

Most linters say that something is wrong. Markup in the <head> needs why: advice written years ago may no longer hold, and a tag that looks harmless can stop people zooming in, leave a page without a language for screen readers, or break link previews. deadhead finds head markup that is harmful, deprecated or unnecessary, and links every finding to a written explanation with sources.

Constraints

  • Every rule needs at least two independent sources and a concrete consequence for users. A rule that cannot be explained does not ship.
  • A fix must not reformat the file. Parsing a document and printing it back rewrites quote style, attribute order and whitespace, turning a one-line fix into a large diff.
  • The same rules run in three places: a CLI for CI, an ESLint plugin for the editor, and a bookmarklet that reads the rendered DOM of any page. A live DOM has no source text or byte offsets, so some checks and all fixes are unavailable there.
  • Layout partials and components are not whole pages, so a fragment must never be reported for head content that another file supplies.
  • The corpus crawl had to be polite: robots.txt honoured, one request per page, a user agent that names the project, and only aggregate counts committed.

Decisions

  • Each rule is one Markdown file, and the linter’s registry and the documentation site at deadhead.cevdet.ch are both generated from those files, so a finding and its explanation cannot drift apart. Every finding prints the URL of its rule page.
  • A rule’s severity describes its cost: harmful breaks something for users, deprecated is formally obsolete but inert, and unnecessary works but is dead weight.
  • --fix splices byte ranges out of the original text and only ever subtracts. A rule whose detection is partial never edits a file, and overlapping fixes are skipped for a second pass rather than merged.
  • A conformance suite tests the adapters against each other, running every fixture through every adapter, including the built bookmarklet, and asserting that the CLI and ESLint autofix produce byte-identical output. The DOM’s known differences are declared in the suite and asserted in both directions.
  • Baselines count findings per file and per rule, without line numbers, so reindenting a file does not light up CI with findings nobody introduced.
  • The docs site’s build runs the CLI over its own rendered output, so the head the project ships is held to the rules it ships.
  • Reports come as stylish text, JSON or SARIF, with exit codes as the CI contract. A Vite plugin reports findings for served pages during development.

Results

  • The deadhead and eslint-plugin-deadhead packages are on npm. The rules are published one page each at deadhead.cevdet.ch, and the browser playground checks pasted HTML without installing anything.
  • A corpus run over the Tranco top 10,000 linted 4,570 homepages as served. 44% had at least one harmful-classified finding and 99% had at least one finding of any kind. Applying every fix saved only a median of tens of bytes per page after compression, so the case for cleaning up is correctness, not weight. The write-up, What 10,000 home pages put in their head, sets out the method and the data behind every number.
  • The corpus fed back into the rules. A review of 20 findings per rule turned up autofixes that changed what a page does, false positives, and documentation claims that their own sources contradicted. The fixes shipped in the following patch release.

Next

  • New rules arrive one at a time through the New rule issue form, whose fields are the research checklist. One rule per issue and one rule per pull request keeps each rule’s sources reviewable.
  • The corpus lint and aggregation steps run offline against the stored snapshot, so later corpus runs can measure the current rule set against the same method.