Markdown Lint Gallery feed (extension)

Markdown linting extension for Visual Studio. Provides lint warnings and errors for markdown files based on markdownlint rules (MD001-MD058). Configure rules via .editorconfig files.

▼ Download
Author
Mads Kristensen
Version
1.0.123
Updated
12 hours ago
Tags
markdown,lint,linting,md,documentation
Supports
VS 2022 VS 2026 VS 2022 (ARM64) VS 2026 (ARM64)

Packages are supplied by their publishers and are not built or reviewed by this gallery.

Markdown Lint for Visual Studio

Build GitHub Sponsors

A powerful Visual Studio extension that brings real-time Markdown linting to your editor, based on the popular markdownlint rules, with extension-specific checks for local file and image links.

💡 Recommended pairing: Use Markdown Editor v2 for syntax-aware editing and live preview, and use Markdown Lint for validation, diagnostics, and automatic fixes. The two extensions are designed to work together.

Features

Real-time linting - See issues as you type with squiggly underlines
Error List integration - All warnings appear in Visual Studio's Error List
Quick fixes - Press Ctrl+. for automatic fixes (light bulb suggestions)
Fix All support - Fix all violations of a rule or all auto-fixable issues at once
Inline suppression - Suppress rules with <!-- markdownlint-disable-line --> comments
Format Document - Auto-fix all issues via Format Document (Ctrl+K, Ctrl+D)
Fix on Save - Automatically apply safe fixes whenever a Markdown document is saved
Lint Folder/Solution - Lint all Markdown files in a folder, project, or solution
EditorConfig support - Configure rules per-project using .editorconfig files
Options page - Toggle rules on/off via Tools → Options → Markdown Lint → Rules
Context menu - Quick access to enable/disable linting and settings
50+ rules - Comprehensive coverage of the supported markdownlint rules, plus local file and image link checks
Works with any Markdown editor - Including the built-in Markdown editor and most Markdown extensions

Installation

  1. Open Visual Studio 2022
  2. Go to ExtensionsManage Extensions
  3. Search for "Markdown Lint"
  4. Click Download and restart Visual Studio

Or download directly from the Visual Studio Marketplace.

Getting Started

Once installed, the extension works automatically on any .md file. It is compatible with both the built-in Markdown editor in Visual Studio and the Markdown Editor v2 extension.

  1. Open a Markdown file
  2. Linting issues appear as squiggly underlines
  3. Hover over issues to see the rule description
  4. Press Ctrl+. on an issue to see available quick fixes
  5. Check the Error List (Ctrl+\, E) for all issues in the document

Context Menu

Right-click in any Markdown file to access the Markdown Lint submenu:

  • Enabled - Toggle linting on/off (checkmark indicates current state)
  • Settings... - Open the Rules options page directly

Lint Folder / Solution

Right-click on any folder, project, or solution in Solution Explorer to lint all Markdown files:

  • Lint Markdown Files - Lint all .md files in the selected folder or project
  • Lint All Markdown Files - Lint all .md files in the entire solution

Open Folder mode: When using Visual Studio's Open Folder feature (without a solution), right-click on any folder or file in the Folder View to lint all Markdown files in that location.

Results appear in the Error List window, with clickable entries to navigate directly to issues. Files are processed in parallel for fast performance. The error list is automatically cleared when you close the solution or folder.

Ignored folders: By default, common folders like node_modules, vendor, .git, bin, and obj are automatically ignored. You can customize this list in Tools → Options → Markdown Lint → General → Ignored Folders.

.markdownlintignore support: Create .markdownlintignore files at the project root or in nested folders to exclude additional files or patterns (uses .gitignore syntax). Nested patterns are relative to their containing folder and can override inherited rules.

Format Document

Use Format Document (Ctrl+K, Ctrl+D) or Format Selection (Ctrl+K, Ctrl+F) to automatically fix all auto-fixable violations. The first time you use this feature, you'll be prompted to enable or disable automatic fixing on format commands. You can change this setting later in Tools → Options → Markdown Lint → General.

Fix on Save

When Fix on Save Behavior is enabled, saving a Markdown document applies all safe auto-fixes before the file is written. The default Ask setting prompts on the first save; choose On to keep fixing on save or Off to save without changes. You can change the choice at any time in Tools → Options → Markdown Lint → General.

Configuration

Rules can be configured in two ways:

  1. Options Page - Configure general settings and toggle rules via Tools → Options → Markdown Lint
  2. EditorConfig - Configure rules per-project using .editorconfig files

EditorConfig settings take precedence over the Options page. If no EditorConfig rule exists for a specific rule, the Options page setting is used.

General Options

Go to Tools → Options → Markdown Lint → General to configure:

SettingDescription
Linting EnabledEnable or disable all markdown linting
Format Document BehaviorControl auto-fixing on Format Document/Selection (Ask, On, Off)
Fix on Save BehaviorControl auto-fixing when saving Markdown documents (Ask, On, Off)
Ignored FoldersComma-separated list of folders to ignore when linting (default: node_modules, vendor, .git, bin, obj, packages, TestResults)

Rules Options

Go to Tools → Options → Markdown Lint → Rules to access all rule settings organized by category:

CategoryRules
1. HeadingsMD001, MD003, MD018-MD026, MD041, MD043, MD044
2. ListsMD004, MD005, MD007, MD029, MD030, MD032
3. WhitespaceMD009, MD010, MD012, MD013, MD047
4. Code BlocksMD014, MD031, MD040, MD046, MD048
5. LinksMD011, MD034, MD039, MD042, MD045, MD051-MD054, MD061, MD062
6. InlineMD033, MD035-MD038, MD049, MD050
7. BlockquotesMD027, MD028
8. TablesMD055, MD056, MD058, MD060
9. AccessibilityMD059

Changes take effect immediately when you click OK or Apply - all open markdown files are automatically revalidated.

EditorConfig

Rules can also be configured in your .editorconfig file. All rules use the md_ prefix.

💡 Tip: Install the EditorConfig Language Service extension to get IntelliSense and validation for markdown lint rules in your .editorconfig files.

Example .editorconfig

[*.md]
# Disable trailing spaces rule
md_no_trailing_spaces = false

# Set line length to 120 characters
md_line_length = 120

# Change severity to error
md_no_hard_tabs = true:error

# Change severity to suggestion
md_no_multiple_blanks = true:suggestion

# Use specific heading style with warning severity
md_heading_style = atx:warning

Severity Levels

Severity is specified after the value using a colon: rule = value:severity

md_no_trailing_spaces = true:error
md_line_length = 120:suggestion
md_heading_style = atx:warning

The default severity for all rules is warning.

Available severity levels:

  • error - Shown as error (red squiggle)
  • warning - Shown as warning (green squiggle) [default]
  • suggestion - Shown as suggestion/hint (gray dots)
  • silent - Rule runs but doesn't report
  • none - Rule is disabled

To disable a rule entirely, set the value to false:

md_no_trailing_spaces = false

Available Rules

Click to expand the full list of supported rules
EditorConfig PropertyRuleDescription
md_heading_incrementMD001Heading levels should only increment by one level at a time
md_heading_styleMD003Heading style (atx, atx_closed, setext, consistent)
md_ul_styleMD004Unordered list style (asterisk, plus, dash, consistent)
md_list_indentMD005Inconsistent indentation for list items at the same level
md_ul_indentMD007Unordered list indentation (default: 2 spaces)
md_no_trailing_spacesMD009Trailing spaces not allowed
md_no_hard_tabsMD010Hard tabs not allowed
md_no_reversed_linksMD011Reversed link syntax
md_no_multiple_blanksMD012Multiple consecutive blank lines
md_line_lengthMD013Line length (default: 80 characters, disabled by default)
md_commands_show_outputMD014Dollar signs used before commands without showing output
md_no_missing_space_atxMD018No space after hash on atx style heading
md_no_multiple_space_atxMD019Multiple spaces after hash on atx style heading
md_no_missing_space_closed_atxMD020No space inside hashes on closed atx style heading
md_no_multiple_space_closed_atxMD021Multiple spaces inside hashes on closed atx style heading
md_blanks_around_headingsMD022Headings should be surrounded by blank lines
md_heading_start_leftMD023Headings must start at the beginning of the line
md_no_duplicate_headingMD024Multiple headings with the same content
md_single_titleMD025Multiple top-level headings in the same document
md_no_trailing_punctuationMD026Trailing punctuation in heading
md_no_multiple_space_blockquoteMD027Multiple spaces after blockquote symbol
md_no_blanks_blockquoteMD028Blank line inside blockquote
md_ol_prefixMD029Ordered list item prefix (one, ordered, one_or_ordered, zero)
md_list_marker_spaceMD030Spaces after list markers
md_blanks_around_fencesMD031Fenced code blocks should be surrounded by blank lines
md_blanks_around_listsMD032Lists should be surrounded by blank lines
md_no_inline_htmlMD033Inline HTML not allowed (disabled by default)
md_no_bare_urlsMD034Bare URL used
md_hr_styleMD035Horizontal rule style (consistent, ---, ***, ___)
md_no_emphasis_as_headingMD036Emphasis used instead of a heading (disabled by default)
md_no_space_in_emphasisMD037Spaces inside emphasis markers
md_no_space_in_codeMD038Spaces inside code span elements
md_no_space_in_linksMD039Spaces inside link text
md_fenced_code_languageMD040Fenced code blocks should have a language specified
md_first_line_headingMD041First line in a file should be a top-level heading (disabled by default)
md_no_empty_linksMD042No empty links
md_required_headingsMD043Required heading structure (disabled by default)
md_proper_namesMD044Proper names should have the correct capitalization (disabled by default)
md_no_alt_textMD045Images should have alternate text (alt text)
md_code_block_styleMD046Code block style (fenced, indented, consistent)
md_single_trailing_newlineMD047Files should end with a single newline character (disabled by default)
md_code_fence_styleMD048Code fence style (backtick, tilde, consistent)
md_emphasis_styleMD049Emphasis style (asterisk, underscore, consistent)
md_strong_styleMD050Strong style (asterisk, underscore, consistent)
md_link_fragmentsMD051Link fragments should be valid
md_reference_links_imagesMD052Reference links and images should use a label that is defined
md_link_image_reference_definitionsMD053Link and image reference definitions should be needed
md_link_image_styleMD054Link and image style
md_table_pipe_styleMD055Table pipe style (leading_and_trailing, consistent)
md_table_column_countMD056Table column count should be consistent
md_blanks_around_tablesMD058Tables should be surrounded by blank lines
md_descriptive_link_textMD059Link text should be descriptive
md_table_column_styleMD060Table column style should be consistent
md_file_links_existMD061Local file links should exist
md_image_links_existMD062Local image links should exist
md_root_path-Root path for resolving root-relative links (e.g., /images/logo.png)

Rule Documentation

For detailed documentation on each rule, see the markdownlint Rules Documentation.

Quick Fixes

The extension provides intelligent quick fixes (Ctrl+.) for many common issues:

RuleQuick Fix
MD004Change list marker style
MD005/MD007Correct list indentation
MD009Remove trailing whitespace
MD010Replace tabs with spaces
MD011Fix reversed link syntax
MD012Remove extra blank lines
MD014Remove dollar signs from commands
MD018Add space after heading hash
MD019/MD021/MD027Normalize multiple spaces
MD020Add space inside closed atx heading
MD022/MD031/MD032/MD058Add blank lines around elements
MD023Remove leading whitespace from headings
MD026Remove trailing punctuation
MD028Add blockquote prefix
MD029Fix ordered list prefix
MD030Normalize list marker spacing
MD034Wrap bare URLs in angle brackets
MD035Change horizontal rule style
MD037Remove spaces in emphasis
MD038Remove spaces in code spans
MD039Remove spaces in link text
MD040Add language identifier to code blocks
MD044Correct proper-name capitalization
MD045Add alt text placeholder to images
MD047Add/remove trailing newline
MD048Change code fence style
MD049Change emphasis style
MD050Change strong/bold style
MD051Normalize a matching heading fragment
MD053Remove an unused reference definition
MD054Convert safely between link styles
MD055Add leading and trailing pipes
MD056Fix table delimiter row

Fix All Actions

Right-click on any fixable issue to access bulk fix options:

  • Fix all [rule] violations in document - Fix all instances of a specific rule
  • Convert all [style] to [target] style - Normalize emphasis, strong, or list marker style across the entire document
  • Fix all auto-fixable violations in document - Fix all auto-fixable issues at once

Inline Suppression

Suppress specific rules directly in your Markdown files using HTML comments, compatible with the standard markdownlint suppression syntax.

Suppressing Errors

There are multiple ways to suppress an error:

  1. From QuickInfo - Hover over an error and click the "Suppress in code" link
  2. From Error List - Right-click an error in the Error List and select "Suppress in code"
  3. Manually - Type <!-- markdownlint-disable-line --> and use IntelliSense to add rule codes

Suppression Comment Syntax

<!-- markdownlint-disable-line MD013 -->
This line is excluded from the MD013 (line length) rule.

<!-- markdownlint-disable-line MD013 MD033 -->
This line is excluded from multiple rules.

<!-- markdownlint-disable MD013 -->
All lines below are excluded from MD013...
<!-- markdownlint-enable MD013 -->

<!-- markdownlint-disable-next-line MD041 -->
The next line is excluded from MD041.

<!-- markdownlint-disable-file MD013 -->
The entire file is excluded from MD013.

IntelliSense Support

When typing suppression comments, IntelliSense provides:

  • Rule code completion - Type MD to see all available rule codes (MD001, MD003, etc.)
  • Rule name completion - Type the rule name like heading-increment or line-length
  • QuickInfo tooltips - Hover over rule codes in suppression comments to see the rule description

Supported Directives

DirectiveDescription
disable-lineSuppress rules on the current line
disable-next-lineSuppress rules on the next line
disable / enableSuppress rules for a block of lines
disable-fileSuppress rules for the entire file
capture / restoreSave and restore suppression state

Contributing

Found a bug or have a feature request? Please open an issue on GitHub.

License

This extension is open source. See the LICENSE file for details.