@codacy/tools-markdownlint-0
Table of Contents
Overview
Markdown linter using the markdownlint Node.js library. Uses the Library execution strategy — calls the markdownlint API directly rather than spawning a subprocess.
| Property | Value |
|---|---|
| Tool ID | markdownlint |
| Codacy UUID | 547ff16b-d57c-4d75-8067-5ccf3ea88a00 |
| Strategy | Library |
| Languages | Markdown |
| Dependency | markdownlint npm package (v0.x) |
| File patterns | **/*.md |
Updating patterns
# Re-fetch pattern metadata from the Codacy API
pnpm prefetch
# Commit the result
git add src/patterns.json
Pattern IDs follow the format markdownlint_MD001, markdownlint_MD013, etc.
Updating the markdownlint version
- Update the
markdownlintversion indevDependenciesofpackage.json, andpreferredVersioninsrc/metadata.ts - Run
pnpm install - Run
pnpm generate-payloads markdownlint-0from the repo root to re-pinpayload/package.jsonand regenerate its lockfile - Run
pnpm prefetchto check for new/removed rules - Run
pnpm testto verify compatibility - If the major version changes, create a new adapter package (
markdownlint-1/)
Development
pnpm build # Build with tsup
pnpm test # Run tests
Notes for maintainers
- markdownlint v0.37+ is pure ESM. The adapter uses
dynamic import()at runtime to stay CJS-compatible with the tsup build. checkAvailabilitydynamically imports markdownlint and checks its version.- The tool is an npm payload, not a dependency: it is resolved at run time (a Codacy-managed install under
~/.codacy/tools/<id>/, aCODACY_TOOL_ROOT_<ID>root, or this package's ownnode_modulesin the monorepo) andinstallrunsnpm ciagainst the committedpayload/package-lock.json. Seesrc/payload.ts.