MARKDOWNLINT(1)
β¨ MARKDOWNLINT β¨
okay bestie, pull up a chair, because we're talking about markdownlint β the General Commands Manual icon that keeps your Markdown from being a whole mess π
πΈ NAME πΈ
markdownlint β the Markdown lint tool, aka your new bestie who tells you your headings are inconsistent π
β¨ SYNOPSIS β¨
mdl [ options ] [FILE.md|DIR ...]
fr fr that's it. options, then a file or a directory, go off π
π DESCRIPTION π
so markdownlint checks an individual markdown file, or a whole directory of markdown files, against a set of rules for syntax consistency. like a vibe check but for your docs π
and the way it reports back to the CLI? the Ruby based implementation tells you the line(s) with an issue identified, and how to improve it. not just "wrong" β actual advice. we love a supportive icon π«Ά
π OPTIONS π
-c,--config FILEβ the configuration file to use ποΈ-g,--git-recurseβ only process files known to git when given a directory. git girlies only, no cap π§-i,--[no]-ignore-front-matterβ ignore YAML front matter π-j,--jsonβ JSON output π¦-l,--list-rulesβ don't process any files, just list enabled rules. window shopping, basically ποΈ-r,--rules RULE1,RULE2β only process these rules π―-u,--rulesets RULESET1,RULESET2β specify additional ruleset files to load π-S,--sarifβ SARIF output π-a,--[no]show-aliasesβ show rule aliases instead of rule ID when viewing rules π·οΈ-w,--[no]warningsβ show kramdown warnings β οΈ-d,--skip-default-rulesetβ don't load the default markdownlint ruleset π-s,--style STYLEβ load the given style π-t,--tags TAG1,TAG2β only process rules with these tags π·οΈ-v,--[no-]verboseβ increase verbosity π£οΈ-h,--helpβ show this message π-V,--versionβ show version π
π EXAMPLES π
Equally visit folders docs and example of the GitHub repository. (yes bestie, equally β we're not playing favorites here π)
π― use rules by a flag
List the objectives of rules MD012, MD022, MD031 and MD032:
mdl -r MD012,MD022,MD031,MD032 -l
Scrutinize file example.md only by rules MD012, MD022, MD031 and MD032:
mdl -r MD012,MD022,MD031,MD032 example.md
Scrutinize file example.md by all rules available except MD033 and MD034:
mdl -r ~MD033,~MD034 example.md
List all rules associated to the tag indentation:
mdl -t indentation -l
Scrutinize file example.md by all rules without tag indentation:
mdl -t ~indentation example.md
By default, markdownlint reports sort the issues by their rule. With GNU coreutils, your shell may resort the output by the corresponding line number of the file:
mdl example.md | sort -t ":" -k 2 -n
π use rules by a local style file
Recurrent (personalized) check criteria can be saved as a style file, for instance mystyle.rb. The snippet below illustrates the syntax available. Instead of pairs of single quotes, pairs of double quotes may be used, too.
all # initiate with all rules implemented
rule 'MD013', :line_length => 100, :ignore_code_blocks => true
exclude_rule 'MD014'
# tag :blockquote
exclude_tag :indentation
List the rules a local style file activates:
mdl -s mystyle.rb -l
A personalized local style then is used by
mdl -s mystyle.rb example.md
Local flags are of higher priority than a local style file. Therefore, the next command removes rule MD013 from consideration, regardless of any definition about said rule in mystyle.rb:
mdl -s mystyle.rb -r ~MD013 example.md
like, the flag wins. periodt π
π use rules by a global style file
To deploy a markdownlint style all across your computer, set up a style file (e.g., mystyle.rb). Second, add a .mdlrc file to your home directory to indicate the location of said style file by
style "#{File.dirname(__FILE__)}/{your_markdown_rule_file_path}.rb"
Subsequently, a call by
mdl example.md
then applies the global style set. In similar logic as above, a local style file overrules definitions of a global style, i.e.
mdl example.md -s local_style.rb
π use rules for a project with continuous integration
The setup of a markdownlint style per project equally consists of two files. As an example, define .exclude_example.rb with
# First, include all rules:
all
# Then, exclude MD013 (long lines), with:
exclude_rule 'MD013'
as a style file, and a .mdlrc as indicator of its location with
#The custom style file is referenced by .mdlrc as below
style ".exclude_example.rb"
at the current root. Again, a call like
mdl example.md
then applies the rules defined. CI girlies, this one's for you π«Ά
π AUTHOR π
The absolute legends behind this, in order: Mark Harrison, Ciro Santilli, Making GitHub Delicious., Brandon High, Matt Jankowski, David Anson, Tobias Bengfort, Loic Nageleisen, Will Fleming, Jean-Christophe GAY, sudodoki, David RodrΓguez, Garth Braithwaite, garthdb, Alexander KΓΆplinger, Simon Symeonidis, psyomn, Jakub Wilk, Eitan Adler, Phil Dibowitz, David Somers-Harris, copperwalls, John Trammell, Waylan Limberg, Ash, Paul B, Andrew Janke, Adam Strickland, Naomi Reeves, Olle Jonsson, Lauritz HilsΓΈe, Roman Kolesnev, Alex Harvey, Tim Smith, tsuburin, Mikael Kjaer, Caleb Buxton, Mark E. Schill, Waldir Pimenta, Jose Angel Pardillo Vela, androidseb, jtcarnes, Gene Gotimer, Sami Ahmed Siddiqui, Karol Babioch, Eric Knibbe, Alexander Jaust, orviz, Lennart Jern, Benjamin Quorning, Ting Chen, Kai, adamroyjones, Bengt LΓΌers, JP Hastings-Spital, nbehrnd, iafelix, ColemanTom, Levente Polyak, Gunes Bayir, Mathieu Rul, Markus Lehtonen, Matthias Thym, Benjamin Bannier, AJRepo, Ulysses Zhan, Lucas Ventura. π
that's a whole friend group and I'm obsessed πΈ
π LICENSE π
MIT β go wild, bestie β¨
π REPORTING BUGS π
Report bugs to and suggest improvements on the project page, https://github.com/markdownlint/markdownlint β they're literally so nice, don't be shy π
β VERSION β
This is about markdownlint version 0.17.0 (June 13, 2026). π
and that's a wrap!! this page is from theGeneral Commands Manual, dated June 4, 2026, all aboutmarkdownlint0.17.0 β go forth and lint, main character ππ β¨
π¦ where this page comes from
- ubuntu stonking: markdownlint 0.17.0-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms