feat: Markdown-Hook mit Custom-Rule "no-hr"

Erzwingt Struktur über Überschriften statt horizontaler Trennlinien.

- Custom Rule hooks/markdownlint-rules/no-hr.js erkennt --- / *** / ___
  über das markdown-it-Token "hr" und liefert fixInfo zum Entfernen.
- .markdownlint-cli2.jsonc aktiviert no-hr und deaktiviert MD013/MD040/MD041/MD060
  (Begründung jeweils inline kommentiert).
- hooks/auto-format.sh erweitert um md|markdown-Zweig mit zwei --fix-Pässen
  (zweiter Pass räumt MD012-Doppel-Leerzeilen auf, die nach HR-Entfernung entstehen).
- bootstrap.sh installiert markdownlint-cli2 idempotent via npm -g.

Verifiziert:
- Custom Rule meldet --- und *** als Verstoß.
- Zwei --fix-Pässe entfernen Trennlinien und überflüssige Leerzeilen, Endzustand 0 Fehler.
- Bestehende README in /home/martin/Darktable/README.md ist nach Konfig-Anpassung 0 Fehler.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-22 10:10:17 +02:00
co-authored by Claude Opus 4.7
parent ab736c2466
commit 6aecff2eea
4 changed files with 60 additions and 0 deletions
+12
View File
@@ -75,6 +75,18 @@ else
echo "✓ shellcheck installiert"
fi
# --- markdownlint-cli2 (Markdown-Lint-Hook, custom rule no-hr) ---
if command -v markdownlint-cli2 &>/dev/null; then
echo "✓ markdownlint-cli2 $(markdownlint-cli2 --version 2>/dev/null | head -1)"
else
echo " markdownlint-cli2 fehlt installiere via npm..."
if ! command -v npm &>/dev/null; then
sudo apt-get install -y npm
fi
sudo npm install -g markdownlint-cli2
echo "✓ markdownlint-cli2 installiert"
fi
# --- gitea-mcp Binary ---
if [[ -x ~/go/bin/gitea-mcp ]]; then
echo "✓ gitea-mcp vorhanden"