Skip to content

Files

Latest commit

5dc52d8 · Mar 17, 2025

History

History
52 lines (38 loc) · 1.7 KB

markdownlint.md

File metadata and controls

52 lines (38 loc) · 1.7 KB
title description layout
Trunk | How to run Markdownlint
Markdownlint is a tool designed to enforce consistency for Markdown files. It can include checks for headings, lists, line length, and syntax preferences.
title description tableOfContents outline pagination
visible
true
visible
visible
true
visible
true
visible
true

Markdownlint

Markdownlint is a linter for Markdown.

You can enable the Markdownlint linter with:

trunk check enable markdownlint

Auto Enabling

Markdownlint will be auto-enabled if any Markdown files are present.

Settings

Markdownlint supports the following config files:

  • .markdownlint.json
  • .markdownlint.yaml
  • .markdownlint.yml
  • .markdownlintrc

You can move these files to .trunk/configs and trunk check will still find them. See Moving Linters for more info. Trunk Code Quality provides a default .markdownlint.yaml if your project does not already have one.

Usage Notes

Older versions of markdownlint had a bug where it printed plaintext output even when run with --json. We rely on JSON output so we can parse and ingest the results from markdownlint. The package we use for markdownlint is actually markdownlint-cli >= 0.29.0 is verified to work.

Links