markdownlint-cli2 — Markdown linter rebased on Red Hat Hardened Images
803
markdownlint-cli2 is DavidAnson's canonical CommonMark + GitHub-Flavored-Markdown linter, the same engine VS Code's official Markdown extension runs. ~50 built-in rules covering heading hierarchy, line length, table formatting, code-fence languages, link syntax, image alt text, list indentation, and more.
This image bundles markdownlint-cli2 with its full transitive dependency tree (resolved at fetch time via containerized npm install --global) and lands on Red Hat Hardened hi/nodejs:latest. The published .tgz is SHA256-verified at fetch; per-dep integrity comes from the npm package-lock.json. Built image is cosign-signed with a CycloneDX SBOM and SLSA Level 3 provenance attestation attached.
Complements Vale (prose linter) — markdownlint-cli2 catches structural Markdown issues; Vale catches prose issues. Both live in the same documentation-quality layer.
# Lint all .md files in repo, against per-repo .markdownlint-cli2.jsonc
podman run --rm -v "$(pwd):/repo:ro,Z" markdownlint-cli2:<version>-rhhi '**/*.md'
# Specific files
podman run --rm -v "$(pwd):/repo:ro,Z" markdownlint-cli2:<version>-rhhi 'README.md' 'docs/**/*.md'
# Without writing a config file, override rules inline via env var
podman run --rm -v "$(pwd):/repo:ro,Z" \
-e MARKDOWNLINT_CLI2_CONFIG='{"config":{"MD013":false}}' \
markdownlint-cli2:<version>-rhhi '**/*.md'
.markdownlint-cli2.jsonc at repo root){
"config": {
"default": true,
"MD013": { "line_length": 120 },
"MD024": { "siblings_only": true },
"MD033": false // allow inline HTML
},
"ignores": ["CHANGELOG.md", "node_modules/**"]
}
registry.access.redhat.com/hi/nodejs:latest (Red Hat Hardened)registry.access.redhat.com/hi/nodejs:24.15-builderfetch-npm-tool.sh lives under containerfiles/_template/)Content type
Image
Digest
sha256:6d866672e…
Size
53.2 MB
Last updated
4 months ago
docker pull timothyswan/markdownlint-cli2:0.22.1-rhhi