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:
@@ -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/**"]
|
||||||
|
}
|
||||||
+3
-1
@@ -12,7 +12,8 @@
|
|||||||
"lint": "pnpm -r --if-present lint",
|
"lint": "pnpm -r --if-present lint",
|
||||||
"typecheck": "pnpm -r typecheck",
|
"typecheck": "pnpm -r typecheck",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"format:check": "prettier --check ."
|
"format:check": "prettier --check .",
|
||||||
|
"md:lint": "markdownlint-cli2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "9.39.4",
|
"@eslint/js": "9.39.4",
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
"eslint-config-prettier": "10.1.8",
|
"eslint-config-prettier": "10.1.8",
|
||||||
"eslint-plugin-react": "7.37.5",
|
"eslint-plugin-react": "7.37.5",
|
||||||
"eslint-plugin-react-hooks": "7.1.1",
|
"eslint-plugin-react-hooks": "7.1.1",
|
||||||
|
"markdownlint-cli2": "0.22.1",
|
||||||
"prettier": "3.8.4",
|
"prettier": "3.8.4",
|
||||||
"typescript-eslint": "8.61.0"
|
"typescript-eslint": "8.61.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+644
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user