feat(15-01): add markdownlint-cli2 + md:lint script + root config

- Install markdownlint-cli2@0.22.1 as root workspace devDependency
- Add md:lint script (no glob args — globs/ignores live in config file)
- Create .markdownlint-cli2.jsonc with prettier preset + content rules
- Enable MD001/MD024/MD040/MD031/MD051/MD052; disable MD041/MD034/MD036
- Glob: docs/**/*.md, *.md, apps/**/*.md; ignores .planning/** and node_modules
This commit is contained in:
Lucas Berger
2026-06-12 10:42:52 -04:00
parent 4728c41539
commit adb7641c19
3 changed files with 670 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
// .markdownlint-cli2.jsonc
{
"config": {
// Disable all rules that conflict with Prettier (23 rules — line-length, list-indent,
// blanks-around-fences, emphasis-style, etc.)
"extends": "markdownlint/style/prettier",
// Content rules to KEEP:
"MD001": true, // heading-increment: no skipping h1→h3
"MD024": true, // no-duplicate-heading
"MD040": true, // fenced-code-language: all fences must declare a language
"MD031": true, // blanks-around-fences (re-enabled — see Pitfall 4 in RESEARCH.md)
"MD051": true, // link-fragments: broken anchor links
"MD052": true, // reference-links-images: undefined link references
// Rules DISABLED (Prettier owns these OR they fire on non-author-controlled files):
"MD041": false, // first-line-h1: CLAUDE.md legitimately starts with ## Project
"MD034": false, // no-bare-urls: CLAUDE.md version table uses pkg@version syntax
"MD036": false // no-emphasis-as-heading: docs/API.md uses **Response 200** as label
},
"globs": ["docs/**/*.md", "*.md", "apps/**/*.md"],
"ignores": [".planning/**", "node_modules/**", "**/node_modules/**", ".pnpm-store/**"]
}