mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-04 23:40:34 +02:00
25 lines
578 B
Bash
25 lines
578 B
Bash
#!/usr/bin/env bash
|
|
#
|
|
# Lint all Markdown files in the repository.
|
|
# Config, globs, and ignores are defined in .markdownlint-cli2.jsonc.
|
|
#
|
|
# Usage:
|
|
# ./scripts/lint-markdown.sh # check
|
|
# ./scripts/lint-markdown.sh --fix # auto-fix
|
|
#
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
cd "$REPO_ROOT"
|
|
|
|
# Resolve markdownlint-cli2 binary
|
|
if command -v markdownlint-cli2 &>/dev/null; then
|
|
LINT_CMD="markdownlint-cli2"
|
|
else
|
|
LINT_CMD="npx --yes markdownlint-cli2"
|
|
fi
|
|
|
|
echo "Linting Markdown files..."
|
|
$LINT_CMD "$@"
|
|
echo "Markdown lint passed."
|