MADR v2 / v3 / v4 aware
Reads YAML frontmatter (v3/v4) and v2 body-list metadata — both bold
(- **Status**:) and the canonical plain (* Status:) shapes. Target a
version explicitly or let it auto-detect.
madr-lint checks that your MADR files follow the
conventions your team relies on — required sections, a valid status, ISO‑8601
dates, filename format, and cross‑file integrity like unique numbering and
non‑broken links.
MADR v2 / v3 / v4 aware
Reads YAML frontmatter (v3/v4) and v2 body-list metadata — both bold
(- **Status**:) and the canonical plain (* Status:) shapes. Target a
version explicitly or let it auto-detect.
ESLint-style rules
Named rules (madr/required-sections, …) with error / warn / off
severities and per-rule options validated by a JSON Schema.
Per-file & cross-file
Fast per-file checks (sections, status, dates, filename) plus project rules for unique numbering, the supersedes graph, and link rot.
CLI, library & Action
Run it from the command line, call it programmatically, or drop it into CI as a GitHub Action. Text, JSON and SARIF reporters.
# lint the ADRs in your configured adrDir (default: docs/adr)npx madr-lint
# or point it at explicit pathsnpx madr-lint docs/adr
# machine-readable output for CInpx madr-lint --format sarifimport { defineConfig } from 'madr-lint';
export default defineConfig({ extends: ['madr-lint:recommended'], madrVersion: 'auto', adrDir: 'docs/adr', rules: { 'madr/filename-format': ['error', { pattern: '^[0-9]{4}-.+\\.md$' }], 'madr/no-numbering-gap': 'off', },});Head to Getting started to install and run your first lint, or jump to Configuration for the full set of options.