Skip to content

Lint rules

All 28 rules, their severity, and why the split matters.

The linter reads the whole tree: every page, the navigation, and the five data files. It runs before every commit, in the writer, over MCP, and in your build.

An error is a site that would be wrong for a reader. It blocks a commit.

A warning is something to look at. It does not block.

The split is by consequence, not by whether a tool can repair it. A dead anchor cannot be repaired automatically and is only a warning, because the reader still lands on the right page. A dead link is an error, because they land nowhere.

Use --strict to count warnings as failures in a build. Use --advisory to report everything and never fail.

RuleSeverityWhat it catches
frontmattererrorFrontmatter that is not valid YAML or breaks the schema.
missing-titleerrorA page with no title.
dead-linkerrorAn internal link to a page that does not exist.
duplicate-slugerrorTwo pages claiming one URL.
missing-asseterrorAn image or file reference with nothing behind it.
unsafe-htmlerrorRaw HTML in a page.
dead-anchorwarningA link to a heading that does not exist.
not-canonicalwarningMarkdown that differs from canonical form.
stray-directivewarningA directive with the wrong colon count or an unknown name.
undefined-variablewarning{{name}} with no entry in variables.yaml.
undefined-snippetwarning::snippet naming a file that does not exist.
wrong-termwarningA word the glossary rejects.
unknown-ownerwarningAn owner who is not a member of the workspace.
RuleSeverityWhat it catches
nav-invaliderrornav.yaml breaks the schema.
nav-missing-pageerrorThe navigation names a page that does not exist.
nav-duplicateerrorA page listed twice.
orphanerrorA page no section lists.
RuleSeverityWhat it catches
redirects-invaliderrorredirects.yaml breaks the schema.
redirect-looperrorA chain that returns to its start.
redirect-conflicterrorA redirect and a page claiming one path.
redirect-duplicatewarningThe same from twice.
redirect-chainwarningA redirect pointing at a redirect.
RuleSeverityWhat it catches
variables-invaliderrorvariables.yaml breaks the schema.
glossary-invaliderrorglossary.yaml breaks the schema.
search-invalidwarningsearch.yaml breaks the schema.
style-invalidwarningstyle.yaml breaks the schema.
search-missing-pagewarningSearch tuning naming a page that does not exist.

staleless lint --fix rewrites what has a mechanical repair:

  • canonical Markdown form;
  • a tab, step or card written the short way.

Everything else is reported. A tool that guessed at a dead link would be worse than one that names it.

SurfaceWhen
The writerAs you edit, and before a commit.
MCPdocs_lint on demand, and inside docs_commit.
Your buildstaleless lint, with no network and no token.

The rules are bundled into the command-line tool rather than published beside it, so your build and your workspace can never disagree about what a dead link is.