Skip to content

Rules

Every rule has an ESLint-style name (madr/<kebab-case>) and supports the error / warn / off severities. Rules are either per-file (pure checks over one ADR) or project (cross-file integrity). Configure severities and options in your config file. A single legitimate exception does not need a config change — silence it inline with a suppression comment.

RuleChecksOptionsRecommended
madr/required-sectionsRequired heading sections are presentYeserror
madr/status-enumstatus is one of the allowed valuesYeserror
madr/date-iso8601date is a valid ISO-8601 dateYeserror
madr/filename-formatFilename matches the ADR conventionYeserror
RuleChecksOptionsRecommended
madr/no-broken-linksRelative links resolve to existing filesNoerror
madr/no-duplicate-numberingADR numbers are uniqueNoerror
madr/no-numbering-gapADR numbers are contiguous (no gaps)Nooff
madr/supersedes-bidirectionalsupersedes / superseded-by links agreeNoerror

madr/no-numbering-gap is a convention-only rule and is off in the recommended preset — enable it if your team treats ADR numbering as a contiguous sequence.

madr-lint.config.ts
import { defineConfig } from 'madr-lint';
export default defineConfig({
extends: ['madr-lint:recommended'],
rules: {
'madr/status-enum': 'warn',
'madr/required-sections': ['error', { sections: ['Context', 'Decision', 'Consequences'] }],
'madr/no-numbering-gap': 'off',
},
});

See each rule’s page for its exact options, and Configuration for the severity and options format.