The markdownlint VS Code extension checks Markdown style and structure with many rules, quick fixes, formatting, and workspace-wide linting.
Overview
markdownlint is a Visual Studio Code extension that lint-checks Markdown and CommonMark files using a large library of rules. It highlights inconsistencies such as heading structure, list indentation, trailing spaces, bare URLs, and spacing around fences, with rule IDs shown as MD### warnings in the editor.
While editing, violations appear as wavy underlines and in the Problems panel. Quick fixes and the extension’s format commands can automatically correct many rules. A fix-all command and save-time code actions can apply batches of fixes, which you can undo normally.
Linting uses the markdownlint-cli2 engine, the same engine as the standalone CLI and a related GitHub Action, so project config can align between editor and automation. Rules are configured via .markdownlint.json, YAML, JavaScript, or markdownlint-cli2 config files, plus optional VS Code user or workspace settings.
Workspace linting runs all Markdown files through the CLI engine and surfaces results in a terminal and the Problems panel. You can toggle linting off temporarily, customize which globs are included, and open or create a config file from a command when a workspace has no config yet.
Key features
- Large Markdown rule library
- In-editor warnings and quick fixes
- Format document and fix-all commands
- Project .markdownlint config files
- Workspace-wide lint via CLI engine
- Save-time auto-fix code actions
- Rule help opened from quick fixes
- Shared engine with markdownlint-cli2
Use cases
- Enforce Markdown style in docs repos
- Fix list and heading issues automatically
- Lint all Markdown files in a workspace
- Match CI lint rules in the editor