TechArticle

`wiki lint`

Infobox

description
Convention audits for broken links, filename patterns, heading style, and internal link style.

wiki lint

Run convention audits on the wiki: broken links, filename pattern, heading style, and internal link style.

wiki lint is a Wiki-policy audit, not a general Markdown linter. Its distinctive checks depend on resolved Wiki routes, cross-page links, wiki: CURIEs, and per-rule wiki.yaml severity.

When lint.heading_levels or lint.duplicate_headings is enabled, Wiki runs the in-process ESLint Markdown adapter with @eslint/markdown's markdown/heading-increment and markdown/no-duplicate-headings rules. It maps those diagnostics into Wiki's existing issue codes and severity report without an external ESLint config or subprocess. Wiki keeps the duplicate rule's H2+ scope and heading normalization, along with broken-link resolution, wiki: CURIEs, filename rules, editorial heading style, Setext-aware thematic-break checks, and link style. Mechanical formatting remains wiki fmt's job through dprint.

Exits 0 silently on success unless -v is set. See Design Philosophies.

Usage

wiki lint
wiki lint wiki/Some_Page.md
wiki lint wiki/A.md wiki/B.md
wiki lint -v
wiki lint --strict

Options

Flag Description
FILE... Optional markdown paths; otherwise entire wiki
-v, --verbose Print warnings
--strict Treat warnings as errors (exit 1)

What is linted

Configurable (lint.* in wiki.yaml)

Rule key What it audits
broken_links Wikilinks, internal markdown links, heading fragments, assets, wiki: CURIEs
filename_pattern Full filename vs wiki.filename_pattern regex (.md files only)
headings Sentence-case H2+ (H1 title case conventional), numbered headings (ATX syntax is wiki fmt)
heading_levels Heading depth must increase by one level at a time (@eslint/markdown's markdown/heading-increment)
duplicate_headings Duplicate H2+ heading text in the same document (@eslint/markdown's markdown/no-duplicate-headings, MD024-inspired)
thematic_breaks Horizontal rules (---, ***, ___) in body prose
link_style Obsidian wikilinks ([[Page]]) in body prose when link.style is standard
redundant_frontmatter A headline, dateCreated, or dateModified that exactly repeats the value the graph derives from the first H1 or Git history (wiki fix)

Each rule is error, warning, or off. Defaults: broken_links, filename_pattern, and link_style are warning; headings, heading_levels, duplicate_headings, thematic_breaks, and redundant_frontmatter are off.

redundant_frontmatter reports only exact repeats; a differing value is an intentional override and is never reported. It is off by default because a wiki that follows the common convention of repeating the H1 as headline would otherwise warn on nearly every page, and fail --strict. Remove the repeats with wiki fix --apply, then enable the rule to keep them out.

wiki lint reports broken links only — it does not repair them. Use wiki link --fix-broken for unambiguous repairs (rename map, unique fuzzy slug, or heading match).

Route safety errors (spaces, unsafe URL characters) abort lint with errors before convention rules run.

Single-file mode

wiki lint path/to/Page.md runs broken-link, filename, heading, and link-style audits for that route only.

Command Purpose
wiki fmt --check Deno/dprint Markdown formatter consistency using native inline fmt: options
wiki lint --strict Conventions (lint: in yaml)
wiki check --strict SHACL, JSON Schema frontmatter, route safety, layout frontmatter
wiki render --check Stale inline SPARQL result blocks

Run in that order in CI: fmt, then lint, then check — so mechanical fixes land before conventions and integrity checks.

wiki build runs wiki lint then wiki check before writing output unless --no-check.

Backlinks