markdownlint 0.26.2 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CONTRIBUTING.md +81 -59
  2. package/README.md +424 -303
  3. package/demo/markdownlint-browser.js +374 -144
  4. package/doc/CustomRules.md +101 -50
  5. package/doc/Prettier.md +14 -10
  6. package/doc/ReleaseProcess.md +20 -0
  7. package/doc/Rules.md +453 -296
  8. package/doc/md001.md +37 -0
  9. package/doc/md002.md +37 -0
  10. package/doc/md003.md +59 -0
  11. package/doc/md004.md +49 -0
  12. package/doc/md005.md +53 -0
  13. package/doc/md006.md +46 -0
  14. package/doc/md007.md +55 -0
  15. package/doc/md009.md +51 -0
  16. package/doc/md010.md +56 -0
  17. package/doc/md011.md +30 -0
  18. package/doc/md012.md +38 -0
  19. package/doc/md013.md +60 -0
  20. package/doc/md014.md +54 -0
  21. package/doc/md018.md +27 -0
  22. package/doc/md019.md +28 -0
  23. package/doc/md020.md +29 -0
  24. package/doc/md021.md +31 -0
  25. package/doc/md022.md +46 -0
  26. package/doc/md023.md +26 -0
  27. package/doc/md024.md +47 -0
  28. package/doc/md025.md +49 -0
  29. package/doc/md026.md +41 -0
  30. package/doc/md027.md +24 -0
  31. package/doc/md028.md +40 -0
  32. package/doc/md029.md +98 -0
  33. package/doc/md030.md +82 -0
  34. package/doc/md031.md +50 -0
  35. package/doc/md032.md +38 -0
  36. package/doc/md033.md +27 -0
  37. package/doc/md034.md +44 -0
  38. package/doc/md035.md +42 -0
  39. package/doc/md036.md +45 -0
  40. package/doc/md037.md +37 -0
  41. package/doc/md038.md +40 -0
  42. package/doc/md039.md +21 -0
  43. package/doc/md040.md +52 -0
  44. package/doc/md041.md +49 -0
  45. package/doc/md042.md +32 -0
  46. package/doc/md043.md +72 -0
  47. package/doc/md044.md +35 -0
  48. package/doc/md045.md +34 -0
  49. package/doc/md046.md +40 -0
  50. package/doc/md047.md +34 -0
  51. package/doc/md048.md +41 -0
  52. package/doc/md049.md +32 -0
  53. package/doc/md050.md +32 -0
  54. package/doc/md051.md +50 -0
  55. package/doc/md052.md +33 -0
  56. package/doc/md053.md +38 -0
  57. package/helpers/README.md +35 -15
  58. package/helpers/helpers.js +204 -42
  59. package/helpers/package.json +2 -2
  60. package/lib/constants.js +8 -1
  61. package/lib/markdownlint.js +7 -7
  62. package/lib/md011.js +2 -2
  63. package/lib/md013.js +7 -6
  64. package/lib/md019.js +1 -1
  65. package/lib/md022.js +15 -3
  66. package/lib/md023.js +1 -1
  67. package/lib/md026.js +1 -1
  68. package/lib/md033.js +15 -4
  69. package/lib/md034.js +70 -45
  70. package/lib/md035.js +1 -1
  71. package/lib/md037.js +2 -2
  72. package/lib/md038.js +1 -1
  73. package/lib/md039.js +1 -1
  74. package/lib/md040.js +21 -2
  75. package/lib/md043.js +4 -2
  76. package/lib/md044.js +4 -3
  77. package/lib/md051.js +37 -5
  78. package/lib/rules.js +1 -1
  79. package/package.json +31 -21
  80. package/schema/.markdownlint.jsonc +10 -3
  81. package/schema/.markdownlint.yaml +8 -2
  82. package/schema/markdownlint-config-schema.json +27 -3
  83. package/style/prettier.json +26 -0
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  ## Install
9
9
 
10
- ```shell
10
+ ```bash
11
11
  npm install markdownlint --save-dev
12
12
  ```
13
13
 
@@ -32,25 +32,43 @@ and test cases came directly from that project.
32
32
 
33
33
  ### Related
34
34
 
35
- * CLI
36
- * [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)
37
- command-line interface for Node.js ([works with pre-commit](https://github.com/igorshubovych/markdownlint-cli#use-with-pre-commit))
38
- * [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2)
39
- command-line interface for Node.js ([works with pre-commit](https://github.com/DavidAnson/markdownlint-cli2#pre-commit))
40
- * GitHub
41
- * [GitHub Super-Linter Action](https://github.com/github/super-linter)
42
- * [GitHub Actions problem matcher for markdownlint-cli](https://github.com/xt0rted/markdownlint-problem-matcher)
43
- * Editor
44
- * [vscode-markdownlint extension for VS Code](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
45
- * [Sublime Text markdownlint for Sublime Text](https://packagecontrol.io/packages/SublimeLinter-contrib-markdownlint)
46
- * [coc-markdownlint extension for Vim/Neovim](https://github.com/fannheyward/coc-markdownlint)
47
- * Tooling
48
- * [eslint-plugin-markdownlint for the ESLint analyzer](https://github.com/paweldrozd/eslint-plugin-markdownlint)
49
- * [grunt-markdownlint for the Grunt task runner](https://github.com/sagiegurari/grunt-markdownlint)
50
- * [Cake.Markdownlint addin for Cake build automation system](https://github.com/cake-contrib/Cake.Markdownlint)
51
- * [Lombiq Node.js Extensions for MSBuild (.NET builds)](https://github.com/Lombiq/NodeJs-Extensions)
52
- * Ruby
53
- * [markdownlint/mdl gem for Ruby](https://rubygems.org/gems/mdl)
35
+ - CLI
36
+ - [markdownlint-cli][markdownlint-cli] command-line interface for Node.js
37
+ ([works with pre-commit][markdownlint-cli-precommit])
38
+ - [markdownlint-cli2][markdownlint-cli2] command-line interface for Node.js
39
+ ([works with pre-commit][markdownlint-cli2-precommit])
40
+ - GitHub
41
+ - [GitHub Action for markdownlint-cli2][markdownlint-cli2-action]
42
+ - [GitHub Super-Linter Action][super-linter]
43
+ - [GitHub Actions problem matcher for
44
+ markdownlint-cli][markdownlint-problem-matcher]
45
+ - Editor
46
+ - [vscode-markdownlint extension for VS Code][vscode-markdownlint]
47
+ - [Sublime Text markdownlint for Sublime Text][sublimelinter]
48
+ - [coc-markdownlint extension for Vim/Neovim][coc]
49
+ - Tooling
50
+ - [eslint-plugin-markdownlint for the ESLint analyzer][eslint-plugin]
51
+ - [grunt-markdownlint for the Grunt task runner][grunt-markdownlint]
52
+ - [Cake.Markdownlint addin for Cake build automation system][cake]
53
+ - [Lombiq Node.js Extensions for MSBuild (.NET builds)][nodejs-extensions]
54
+ - Ruby
55
+ - [markdownlint/mdl gem for Ruby][rubygems-mdl]
56
+
57
+ [cake]: https://github.com/cake-contrib/Cake.Markdownlint
58
+ [coc]: https://github.com/fannheyward/coc-markdownlint
59
+ [eslint-plugin]: https://github.com/paweldrozd/eslint-plugin-markdownlint
60
+ [grunt-markdownlint]: https://github.com/sagiegurari/grunt-markdownlint
61
+ [markdownlint-cli]: https://github.com/igorshubovych/markdownlint-cli
62
+ [markdownlint-cli-precommit]: https://github.com/igorshubovych/markdownlint-cli#use-with-pre-commit
63
+ [markdownlint-cli2]: https://github.com/DavidAnson/markdownlint-cli2
64
+ [markdownlint-cli2-action]: https://github.com/marketplace/actions/markdownlint-cli2-action
65
+ [markdownlint-cli2-precommit]: https://github.com/DavidAnson/markdownlint-cli2#pre-commit
66
+ [markdownlint-problem-matcher]: https://github.com/xt0rted/markdownlint-problem-matcher
67
+ [nodejs-extensions]: https://github.com/Lombiq/NodeJs-Extensions
68
+ [rubygems-mdl]: https://rubygems.org/gems/mdl
69
+ [sublimelinter]: https://packagecontrol.io/packages/SublimeLinter-contrib-markdownlint
70
+ [super-linter]: https://github.com/github/super-linter
71
+ [vscode-markdownlint]: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
54
72
 
55
73
  ## Demonstration
56
74
 
@@ -61,106 +79,116 @@ playground for learning and exploring.
61
79
 
62
80
  <!-- markdownlint-disable line-length -->
63
81
 
64
- * **[MD001](doc/Rules.md#md001)** *heading-increment/header-increment* - Heading levels should only increment by one level at a time
65
- * ~~**[MD002](doc/Rules.md#md002)** *first-heading-h1/first-header-h1* - First heading should be a top-level heading~~
66
- * **[MD003](doc/Rules.md#md003)** *heading-style/header-style* - Heading style
67
- * **[MD004](doc/Rules.md#md004)** *ul-style* - Unordered list style
68
- * **[MD005](doc/Rules.md#md005)** *list-indent* - Inconsistent indentation for list items at the same level
69
- * ~~**[MD006](doc/Rules.md#md006)** *ul-start-left* - Consider starting bulleted lists at the beginning of the line~~
70
- * **[MD007](doc/Rules.md#md007)** *ul-indent* - Unordered list indentation
71
- * **[MD009](doc/Rules.md#md009)** *no-trailing-spaces* - Trailing spaces
72
- * **[MD010](doc/Rules.md#md010)** *no-hard-tabs* - Hard tabs
73
- * **[MD011](doc/Rules.md#md011)** *no-reversed-links* - Reversed link syntax
74
- * **[MD012](doc/Rules.md#md012)** *no-multiple-blanks* - Multiple consecutive blank lines
75
- * **[MD013](doc/Rules.md#md013)** *line-length* - Line length
76
- * **[MD014](doc/Rules.md#md014)** *commands-show-output* - Dollar signs used before commands without showing output
77
- * **[MD018](doc/Rules.md#md018)** *no-missing-space-atx* - No space after hash on atx style heading
78
- * **[MD019](doc/Rules.md#md019)** *no-multiple-space-atx* - Multiple spaces after hash on atx style heading
79
- * **[MD020](doc/Rules.md#md020)** *no-missing-space-closed-atx* - No space inside hashes on closed atx style heading
80
- * **[MD021](doc/Rules.md#md021)** *no-multiple-space-closed-atx* - Multiple spaces inside hashes on closed atx style heading
81
- * **[MD022](doc/Rules.md#md022)** *blanks-around-headings/blanks-around-headers* - Headings should be surrounded by blank lines
82
- * **[MD023](doc/Rules.md#md023)** *heading-start-left/header-start-left* - Headings must start at the beginning of the line
83
- * **[MD024](doc/Rules.md#md024)** *no-duplicate-heading/no-duplicate-header* - Multiple headings with the same content
84
- * **[MD025](doc/Rules.md#md025)** *single-title/single-h1* - Multiple top-level headings in the same document
85
- * **[MD026](doc/Rules.md#md026)** *no-trailing-punctuation* - Trailing punctuation in heading
86
- * **[MD027](doc/Rules.md#md027)** *no-multiple-space-blockquote* - Multiple spaces after blockquote symbol
87
- * **[MD028](doc/Rules.md#md028)** *no-blanks-blockquote* - Blank line inside blockquote
88
- * **[MD029](doc/Rules.md#md029)** *ol-prefix* - Ordered list item prefix
89
- * **[MD030](doc/Rules.md#md030)** *list-marker-space* - Spaces after list markers
90
- * **[MD031](doc/Rules.md#md031)** *blanks-around-fences* - Fenced code blocks should be surrounded by blank lines
91
- * **[MD032](doc/Rules.md#md032)** *blanks-around-lists* - Lists should be surrounded by blank lines
92
- * **[MD033](doc/Rules.md#md033)** *no-inline-html* - Inline HTML
93
- * **[MD034](doc/Rules.md#md034)** *no-bare-urls* - Bare URL used
94
- * **[MD035](doc/Rules.md#md035)** *hr-style* - Horizontal rule style
95
- * **[MD036](doc/Rules.md#md036)** *no-emphasis-as-heading/no-emphasis-as-header* - Emphasis used instead of a heading
96
- * **[MD037](doc/Rules.md#md037)** *no-space-in-emphasis* - Spaces inside emphasis markers
97
- * **[MD038](doc/Rules.md#md038)** *no-space-in-code* - Spaces inside code span elements
98
- * **[MD039](doc/Rules.md#md039)** *no-space-in-links* - Spaces inside link text
99
- * **[MD040](doc/Rules.md#md040)** *fenced-code-language* - Fenced code blocks should have a language specified
100
- * **[MD041](doc/Rules.md#md041)** *first-line-heading/first-line-h1* - First line in a file should be a top-level heading
101
- * **[MD042](doc/Rules.md#md042)** *no-empty-links* - No empty links
102
- * **[MD043](doc/Rules.md#md043)** *required-headings/required-headers* - Required heading structure
103
- * **[MD044](doc/Rules.md#md044)** *proper-names* - Proper names should have the correct capitalization
104
- * **[MD045](doc/Rules.md#md045)** *no-alt-text* - Images should have alternate text (alt text)
105
- * **[MD046](doc/Rules.md#md046)** *code-block-style* - Code block style
106
- * **[MD047](doc/Rules.md#md047)** *single-trailing-newline* - Files should end with a single newline character
107
- * **[MD048](doc/Rules.md#md048)** *code-fence-style* - Code fence style
108
- * **[MD049](doc/Rules.md#md049)** *emphasis-style* - Emphasis style should be consistent
109
- * **[MD050](doc/Rules.md#md050)** *strong-style* - Strong style should be consistent
110
- * **[MD051](doc/Rules.md#md051)** *link-fragments* - Link fragments should be valid
111
- * **[MD052](doc/Rules.md#md052)** *reference-links-images* - Reference links and images should use a label that is defined
112
- * **[MD053](doc/Rules.md#md053)** *link-image-reference-definitions* - Link and image reference definitions should be needed
82
+ - **[MD001](doc/md001.md)** *heading-increment/header-increment* - Heading levels should only increment by one level at a time
83
+ - ~~**[MD002](doc/md002.md)** *first-heading-h1/first-header-h1* - First heading should be a top-level heading~~
84
+ - **[MD003](doc/md003.md)** *heading-style/header-style* - Heading style
85
+ - **[MD004](doc/md004.md)** *ul-style* - Unordered list style
86
+ - **[MD005](doc/md005.md)** *list-indent* - Inconsistent indentation for list items at the same level
87
+ - ~~**[MD006](doc/md006.md)** *ul-start-left* - Consider starting bulleted lists at the beginning of the line~~
88
+ - **[MD007](doc/md007.md)** *ul-indent* - Unordered list indentation
89
+ - **[MD009](doc/md009.md)** *no-trailing-spaces* - Trailing spaces
90
+ - **[MD010](doc/md010.md)** *no-hard-tabs* - Hard tabs
91
+ - **[MD011](doc/md011.md)** *no-reversed-links* - Reversed link syntax
92
+ - **[MD012](doc/md012.md)** *no-multiple-blanks* - Multiple consecutive blank lines
93
+ - **[MD013](doc/md013.md)** *line-length* - Line length
94
+ - **[MD014](doc/md014.md)** *commands-show-output* - Dollar signs used before commands without showing output
95
+ - **[MD018](doc/md018.md)** *no-missing-space-atx* - No space after hash on atx style heading
96
+ - **[MD019](doc/md019.md)** *no-multiple-space-atx* - Multiple spaces after hash on atx style heading
97
+ - **[MD020](doc/md020.md)** *no-missing-space-closed-atx* - No space inside hashes on closed atx style heading
98
+ - **[MD021](doc/md021.md)** *no-multiple-space-closed-atx* - Multiple spaces inside hashes on closed atx style heading
99
+ - **[MD022](doc/md022.md)** *blanks-around-headings/blanks-around-headers* - Headings should be surrounded by blank lines
100
+ - **[MD023](doc/md023.md)** *heading-start-left/header-start-left* - Headings must start at the beginning of the line
101
+ - **[MD024](doc/md024.md)** *no-duplicate-heading/no-duplicate-header* - Multiple headings with the same content
102
+ - **[MD025](doc/md025.md)** *single-title/single-h1* - Multiple top-level headings in the same document
103
+ - **[MD026](doc/md026.md)** *no-trailing-punctuation* - Trailing punctuation in heading
104
+ - **[MD027](doc/md027.md)** *no-multiple-space-blockquote* - Multiple spaces after blockquote symbol
105
+ - **[MD028](doc/md028.md)** *no-blanks-blockquote* - Blank line inside blockquote
106
+ - **[MD029](doc/md029.md)** *ol-prefix* - Ordered list item prefix
107
+ - **[MD030](doc/md030.md)** *list-marker-space* - Spaces after list markers
108
+ - **[MD031](doc/md031.md)** *blanks-around-fences* - Fenced code blocks should be surrounded by blank lines
109
+ - **[MD032](doc/md032.md)** *blanks-around-lists* - Lists should be surrounded by blank lines
110
+ - **[MD033](doc/md033.md)** *no-inline-html* - Inline HTML
111
+ - **[MD034](doc/md034.md)** *no-bare-urls* - Bare URL used
112
+ - **[MD035](doc/md035.md)** *hr-style* - Horizontal rule style
113
+ - **[MD036](doc/md036.md)** *no-emphasis-as-heading/no-emphasis-as-header* - Emphasis used instead of a heading
114
+ - **[MD037](doc/md037.md)** *no-space-in-emphasis* - Spaces inside emphasis markers
115
+ - **[MD038](doc/md038.md)** *no-space-in-code* - Spaces inside code span elements
116
+ - **[MD039](doc/md039.md)** *no-space-in-links* - Spaces inside link text
117
+ - **[MD040](doc/md040.md)** *fenced-code-language* - Fenced code blocks should have a language specified
118
+ - **[MD041](doc/md041.md)** *first-line-heading/first-line-h1* - First line in a file should be a top-level heading
119
+ - **[MD042](doc/md042.md)** *no-empty-links* - No empty links
120
+ - **[MD043](doc/md043.md)** *required-headings/required-headers* - Required heading structure
121
+ - **[MD044](doc/md044.md)** *proper-names* - Proper names should have the correct capitalization
122
+ - **[MD045](doc/md045.md)** *no-alt-text* - Images should have alternate text (alt text)
123
+ - **[MD046](doc/md046.md)** *code-block-style* - Code block style
124
+ - **[MD047](doc/md047.md)** *single-trailing-newline* - Files should end with a single newline character
125
+ - **[MD048](doc/md048.md)** *code-fence-style* - Code fence style
126
+ - **[MD049](doc/md049.md)** *emphasis-style* - Emphasis style should be consistent
127
+ - **[MD050](doc/md050.md)** *strong-style* - Strong style should be consistent
128
+ - **[MD051](doc/md051.md)** *link-fragments* - Link fragments should be valid
129
+ - **[MD052](doc/md052.md)** *reference-links-images* - Reference links and images should use a label that is defined
130
+ - **[MD053](doc/md053.md)** *link-image-reference-definitions* - Link and image reference definitions should be needed
113
131
 
114
132
  <!-- markdownlint-restore -->
115
133
 
116
134
  See [Rules.md](doc/Rules.md) for more details.
117
135
 
118
- ~~Struck through~~ rules are deprecated, and provided for backward-compatibility.
136
+ ~~Struck through~~ rules are deprecated and provided for backward-compatibility.
119
137
 
120
- > All rules with `heading` as part of their name are also available as
121
- > `header` aliases (e.g. `heading-increment` is also available as `header-increment`).
138
+ > All rules with `heading` as part of their name are also available as `header`
139
+ > aliases (e.g. `heading-increment` is also available as `header-increment`).
122
140
  > The use of `header` is deprecated and provided for backward-compatibility.
123
141
 
142
+ ### Custom Rules
143
+
144
+ In addition to built-in rules, custom rules can be used to address
145
+ project-specific requirements. To find community-developed rules use
146
+ [keyword `markdownlint-rule` on npm][markdownlint-rule].
147
+ To implement your own rules, refer to [CustomRules.md](doc/CustomRules.md).
148
+
149
+ [markdownlint-rule]: https://www.npmjs.com/search?q=keywords:markdownlint-rule
150
+
124
151
  ## Tags
125
152
 
126
153
  Tags group related rules and can be used to enable/disable multiple
127
154
  rules at once.
128
155
 
129
- * **accessibility** - MD045
130
- * **atx** - MD018, MD019
131
- * **atx_closed** - MD020, MD021
132
- * **blank_lines** - MD012, MD022, MD031, MD032, MD047
133
- * **blockquote** - MD027, MD028
134
- * **bullet** - MD004, MD005, MD006, MD007, MD032
135
- * **code** - MD014, MD031, MD038, MD040, MD046, MD048
136
- * **emphasis** - MD036, MD037, MD049, MD050
137
- * **hard_tab** - MD010
138
- * **headers** - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022,
139
- MD023, MD024, MD025, MD026, MD036, MD041, MD043
140
- * **headings** - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022,
141
- MD023, MD024, MD025, MD026, MD036, MD041, MD043
142
- * **hr** - MD035
143
- * **html** - MD033
144
- * **images** - MD045, MD052, MD053
145
- * **indentation** - MD005, MD006, MD007, MD027
146
- * **language** - MD040
147
- * **line_length** - MD013
148
- * **links** - MD011, MD034, MD039, MD042, MD051, MD052, MD053
149
- * **ol** - MD029, MD030, MD032
150
- * **spaces** - MD018, MD019, MD020, MD021, MD023
151
- * **spelling** - MD044
152
- * **ul** - MD004, MD005, MD006, MD007, MD030, MD032
153
- * **url** - MD034
154
- * **whitespace** - MD009, MD010, MD012, MD027, MD028, MD030, MD037,
155
- MD038, MD039
156
+ - **`accessibility`** - `MD045`
157
+ - **`atx`** - `MD018`, `MD019`
158
+ - **`atx_closed`** - `MD020`, `MD021`
159
+ - **`blank_lines`** - `MD012`, `MD022`, `MD031`, `MD032`, `MD047`
160
+ - **`blockquote`** - `MD027`, `MD028`
161
+ - **`bullet`** - `MD004`, `MD005`, `MD006`, `MD007`, `MD032`
162
+ - **`code`** - `MD014`, `MD031`, `MD038`, `MD040`, `MD046`, `MD048`
163
+ - **`emphasis`** - `MD036`, `MD037`, `MD049`, `MD050`
164
+ - **`hard_tab`** - `MD010`
165
+ - **`headers`** - `MD001`, `MD002`, `MD003`, `MD018`, `MD019`, `MD020`, `MD021`,
166
+ `MD022`, `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`, `MD043`
167
+ - **`headings`** - `MD001`, `MD002`, `MD003`, `MD018`, `MD019`, `MD020`,
168
+ `MD021`, `MD022`, `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`,
169
+ `MD043`
170
+ - **`hr`** - `MD035`
171
+ - **`html`** - `MD033`
172
+ - **`images`** - `MD045`, `MD052`, `MD053`
173
+ - **`indentation`** - `MD005`, `MD006`, `MD007`, `MD027`
174
+ - **`language`** - `MD040`
175
+ - **`line_length`** - `MD013`
176
+ - **`links`** - `MD011`, `MD034`, `MD039`, `MD042`, `MD051`, `MD052`, `MD053`
177
+ - **`ol`** - `MD029`, `MD030`, `MD032`
178
+ - **`spaces`** - `MD018`, `MD019`, `MD020`, `MD021`, `MD023`
179
+ - **`spelling`** - `MD044`
180
+ - **`ul`** - `MD004`, `MD005`, `MD006`, `MD007`, `MD030`, `MD032`
181
+ - **`url`** - `MD034`
182
+ - **`whitespace`** - `MD009`, `MD010`, `MD012`, `MD027`, `MD028`, `MD030`,
183
+ `MD037`, `MD038`, `MD039`
156
184
 
157
185
  ## Configuration
158
186
 
159
187
  Text passed to `markdownlint` is parsed as Markdown, analyzed, and any
160
188
  issues reported. Two kinds of text are ignored:
161
189
 
162
- * [HTML comments](https://www.w3.org/TR/html5/syntax.html#comments)
163
- * [Front matter](https://jekyllrb.com/docs/frontmatter/) (see
190
+ - [HTML comments](https://www.w3.org/TR/html5/syntax.html#comments)
191
+ - [Front matter](https://jekyllrb.com/docs/frontmatter/) (see
164
192
  `options.frontMatter` below)
165
193
 
166
194
  Rules can be enabled, disabled, and configured via `options.config`
@@ -169,37 +197,37 @@ To enable or disable rules at a particular location within a file, add
169
197
  one of these markers to the appropriate place (HTML comments don't
170
198
  appear in the final markup):
171
199
 
172
- * Disable all rules: `<!-- markdownlint-disable -->`
173
- * Enable all rules: `<!-- markdownlint-enable -->`
174
- * Disable all rules for the current line: `<!-- markdownlint-disable-line -->`
175
- * Disable all rules for the next line: `<!-- markdownlint-disable-next-line -->`
176
- * Disable one or more rules by name: `<!-- markdownlint-disable MD001 MD005 -->`
177
- * Enable one or more rules by name: `<!-- markdownlint-enable MD001 MD005 -->`
178
- * Disable one or more rules by name for the current line:
200
+ - Disable all rules: `<!-- markdownlint-disable -->`
201
+ - Enable all rules: `<!-- markdownlint-enable -->`
202
+ - Disable all rules for the current line: `<!-- markdownlint-disable-line -->`
203
+ - Disable all rules for the next line: `<!-- markdownlint-disable-next-line -->`
204
+ - Disable one or more rules by name: `<!-- markdownlint-disable MD001 MD005 -->`
205
+ - Enable one or more rules by name: `<!-- markdownlint-enable MD001 MD005 -->`
206
+ - Disable one or more rules by name for the current line:
179
207
  `<!-- markdownlint-disable-line MD001 MD005 -->`
180
- * Disable one or more rules by name for the next line:
208
+ - Disable one or more rules by name for the next line:
181
209
  `<!-- markdownlint-disable-next-line MD001 MD005 -->`
182
- * Capture the current rule configuration: `<!-- markdownlint-capture -->`
183
- * Restore the captured rule configuration: `<!-- markdownlint-restore -->`
210
+ - Capture the current rule configuration: `<!-- markdownlint-capture -->`
211
+ - Restore the captured rule configuration: `<!-- markdownlint-restore -->`
184
212
 
185
213
  For example:
186
214
 
187
215
  ```markdown
188
216
  <!-- markdownlint-disable-next-line no-space-in-emphasis -->
189
- deliberate space * in * emphasis
217
+ space * in * emphasis
190
218
  ```
191
219
 
192
220
  Or:
193
221
 
194
222
  ```markdown
195
- deliberate space * in * emphasis <!-- markdownlint-disable-line no-space-in-emphasis -->
223
+ space * in * emphasis <!-- markdownlint-disable-line no-space-in-emphasis -->
196
224
  ```
197
225
 
198
226
  Or:
199
227
 
200
228
  ```markdown
201
229
  <!-- markdownlint-disable no-space-in-emphasis -->
202
- deliberate space * in * emphasis
230
+ space * in * emphasis
203
231
  <!-- markdownlint-enable no-space-in-emphasis -->
204
232
  ```
205
233
 
@@ -232,22 +260,22 @@ space * in * emphasis <!-- markdownlint-disable --> <!-- markdownlint-enable -->
232
260
  To apply changes to an entire file regardless of where the comment is located,
233
261
  the following syntax is supported:
234
262
 
235
- * Disable all rules: `<!-- markdownlint-disable-file -->`
236
- * Enable all rules: `<!-- markdownlint-enable-file -->`
237
- * Disable one or more rules by name: `<!-- markdownlint-disable-file MD001 -->`
238
- * Enable one or more rules by name: `<!-- markdownlint-enable-file MD001 -->`
263
+ - Disable all rules: `<!-- markdownlint-disable-file -->`
264
+ - Enable all rules: `<!-- markdownlint-enable-file -->`
265
+ - Disable one or more rules by name: `<!-- markdownlint-disable-file MD001 -->`
266
+ - Enable one or more rules by name: `<!-- markdownlint-enable-file MD001 -->`
239
267
 
240
268
  This can be used to "hide" `markdownlint` comments at the bottom of a file.
241
269
 
242
270
  In cases where it is desirable to change the configuration of one or
243
271
  more rules for a file, the following more advanced syntax is supported:
244
272
 
245
- * Configure: `<!-- markdownlint-configure-file { options.config JSON } -->`
273
+ - Configure: `<!-- markdownlint-configure-file { options.config JSON } -->`
246
274
 
247
275
  For example:
248
276
 
249
277
  ```markdown
250
- <!-- markdownlint-configure-file { "MD013": { "code_blocks": false } } -->
278
+ <!-- markdownlint-configure-file { "hr-style": { "style": "---" } } -->
251
279
  ```
252
280
 
253
281
  or
@@ -275,7 +303,7 @@ alternate formats.
275
303
 
276
304
  Standard asynchronous API:
277
305
 
278
- ```js
306
+ ```javascript
279
307
  /**
280
308
  * Lint specified Markdown files.
281
309
  *
@@ -288,7 +316,7 @@ function markdownlint(options, callback) { ... }
288
316
 
289
317
  Synchronous API (for build scripts, etc.):
290
318
 
291
- ```js
319
+ ```javascript
292
320
  /**
293
321
  * Lint specified Markdown files synchronously.
294
322
  *
@@ -301,7 +329,7 @@ function markdownlint.sync(options) { ... }
301
329
  Promise API (in the `promises` namespace like Node.js's
302
330
  [`fs` Promises API](https://nodejs.org/api/fs.html#fs_fs_promises_api)):
303
331
 
304
- ```js
332
+ ```javascript
305
333
  /**
306
334
  * Lint specified Markdown files.
307
335
  *
@@ -354,15 +382,23 @@ configuration object with all properties set to the default value.
354
382
  Sets of rules (known as a "style") can be stored separately and loaded
355
383
  as [JSON](https://en.wikipedia.org/wiki/JSON).
356
384
 
357
- Example:
385
+ Example of referencing a built-in style from JavaScript:
358
386
 
359
- ```js
387
+ ```javascript
360
388
  const options = {
361
389
  "files": [ "..." ],
362
390
  "config": require("style/relaxed.json")
363
391
  };
364
392
  ```
365
393
 
394
+ Example doing so from `.markdownlint.json` via `extends` (more on this below):
395
+
396
+ ```json
397
+ {
398
+ "extends": "markdownlint/style/relaxed"
399
+ }
400
+ ```
401
+
366
402
  See the [style](style) directory for more samples.
367
403
 
368
404
  See [markdownlint-config-schema.json](schema/markdownlint-config-schema.json)
@@ -392,7 +428,7 @@ And a `custom.json` configuration file:
392
428
 
393
429
  Then code like the following:
394
430
 
395
- ```js
431
+ ```javascript
396
432
  const options = {
397
433
  "config": markdownlint.readConfigSync("./custom.json")
398
434
  };
@@ -400,7 +436,7 @@ const options = {
400
436
 
401
437
  Merges `custom.json` and `base.json` and is equivalent to:
402
438
 
403
- ```js
439
+ ```javascript
404
440
  const options = {
405
441
  "config": {
406
442
  "default": true,
@@ -418,12 +454,13 @@ Array of functions to parse the content of `markdownlint-configure-file` blocks.
418
454
  As shown in the [Configuration](#configuration) section, inline comments can be
419
455
  used to customize the [configuration object](#optionsconfig) for a document. By
420
456
  default, the `JSON.parse` built-in is used, but custom parsers can be specified.
421
- Content is passed to each parser function until one returns a value (vs. throwing
422
- an exception). As such, strict parsers should come before flexible ones.
457
+ Content is passed to each parser function until one returns a value (vs.
458
+ throwing an exception). As such, strict parsers should come before flexible
459
+ ones.
423
460
 
424
461
  For example:
425
462
 
426
- ```js
463
+ ```javascript
427
464
  [ JSON.parse, require("toml").parse, require("js-yaml").load ]
428
465
  ```
429
466
 
@@ -434,13 +471,11 @@ Type: `Array` of `Object`
434
471
  List of custom rules to include with the default rule set for linting.
435
472
 
436
473
  Each array element should define a rule. Rules are typically exported
437
- by another package, but can be defined locally. Custom rules are
438
- identified by the
439
- [keyword `markdownlint-rule` on npm](https://www.npmjs.com/search?q=keywords:markdownlint-rule).
474
+ by another package, but can be defined locally.
440
475
 
441
476
  Example:
442
477
 
443
- ```js
478
+ ```javascript
444
479
  const extraRules = require("extraRules");
445
480
  const options = {
446
481
  "customRules": [ extraRules.one, extraRules.two ]
@@ -475,8 +510,8 @@ specify a custom `RegExp` or use the value `null` to disable the feature.
475
510
 
476
511
  The default value:
477
512
 
478
- ```js
479
- /((^---\s*$[^]*?^---\s*$)|(^\+\+\+\s*$[^]*?^(\+\+\+|\.\.\.)\s*$)|(^\{\s*$[^]*?^\}\s*$))(\r\n|\r|\n|$)/m
513
+ ```javascript
514
+ /((^---\s*$[\s\S]*?^---\s*)|(^\+\+\+\s*$[\s\S]*?^(\+\+\+|\.\.\.)\s*)|(^\{\s*$[\s\S]*?^\}\s*))(\r\n|\r|\n|$)/m
480
515
  ```
481
516
 
482
517
  Ignores [YAML](https://en.wikipedia.org/wiki/YAML),
@@ -494,14 +529,16 @@ Note: Matches must occur at the start of the file.
494
529
 
495
530
  ##### options.fs
496
531
 
497
- Type: `Object` implementing the [file system API](https://nodejs.org/api/fs.html)
532
+ Type: `Object` implementing the [file system API][node-fs-api]
498
533
 
499
- In advanced scenarios, it may be desirable to bypass the default file system API.
500
- If a custom file system implementation is provided, `markdownlint` will use that
501
- instead of invoking `require("fs")`.
534
+ In advanced scenarios, it may be desirable to bypass the default file system
535
+ API. If a custom file system implementation is provided, `markdownlint` will use
536
+ that instead of invoking `require("fs")`.
502
537
 
503
538
  Note: The only methods called are `readFile` and `readFileSync`.
504
539
 
540
+ [node-fs-api]: https://nodejs.org/api/fs.html
541
+
505
542
  ##### options.handleRuleFailures
506
543
 
507
544
  Type: `Boolean`
@@ -521,13 +558,15 @@ is allowed to continue and report any violations that were found.
521
558
 
522
559
  Type: `Array` of `Array` of `Function` and plugin parameters
523
560
 
524
- Specifies additional [markdown-it plugins](https://www.npmjs.com/search?q=keywords:markdown-it-plugin)
525
- to use when parsing input. Plugins can be used to support additional syntax and
526
- features for advanced scenarios.
561
+ Specifies additional [markdown-it plugins][markdown-it-plugin] to use when
562
+ parsing input. Plugins can be used to support additional syntax and features for
563
+ advanced scenarios.
564
+
565
+ [markdown-it-plugin]: https://www.npmjs.com/search?q=keywords:markdown-it-plugin
527
566
 
528
567
  Each item in the top-level `Array` should be of the form:
529
568
 
530
- ```js
569
+ ```javascript
531
570
  [ require("markdown-it-plugin"), plugin_param_0, plugin_param_1, ... ]
532
571
  ```
533
572
 
@@ -535,7 +574,7 @@ Each item in the top-level `Array` should be of the form:
535
574
 
536
575
  Type: `Boolean`
537
576
 
538
- Disables the use of HTML comments like `<!-- markdownlint-disable -->` to toggle
577
+ Disables the use of HTML comments like `<!-- markdownlint-enable -->` to toggle
539
578
  rules within the body of Markdown content.
540
579
 
541
580
  By default, properly-formatted inline comments can be used to create exceptions
@@ -546,24 +585,27 @@ comments.
546
585
 
547
586
  Type: `Number`
548
587
 
549
- Specifies which version of the `result` object to return (see the "Usage" section
550
- below for examples).
588
+ Specifies which version of the `result` object to return (see the "Usage"
589
+ section below for examples).
551
590
 
552
- Passing a `resultVersion` of `0` corresponds to the original, simple format where
553
- each error is identified by rule name and line number. *This is deprecated.*
591
+ Passing a `resultVersion` of `0` corresponds to the original, simple format
592
+ where each error is identified by rule name and line number. *This is
593
+ deprecated.*
554
594
 
555
- Passing a `resultVersion` of `1` corresponds to a detailed format where each error
556
- includes information about the line number, rule name, alias, description, as well
557
- as any additional detail or context that is available. *This is deprecated.*
595
+ Passing a `resultVersion` of `1` corresponds to a detailed format where each
596
+ error includes information about the line number, rule name, alias, description,
597
+ as well as any additional detail or context that is available. *This is
598
+ deprecated.*
558
599
 
559
- Passing a `resultVersion` of `2` corresponds to a detailed format where each error
560
- includes information about the line number, rule names, description, as well as any
561
- additional detail or context that is available. *This is deprecated.*
600
+ Passing a `resultVersion` of `2` corresponds to a detailed format where each
601
+ error includes information about the line number, rule names, description, as
602
+ well as any additional detail or context that is available. *This is
603
+ deprecated.*
562
604
 
563
605
  Passing a `resultVersion` of `3` corresponds to the detailed version `2` format
564
- with additional information about how to fix automatically-fixable errors. In this
565
- mode, all errors that occur on each line are reported (other versions report only
566
- the first error for each rule). *This is the default.*
606
+ with additional information about how to fix automatically-fixable errors. In
607
+ this mode, all errors that occur on each line are reported (other versions
608
+ report only the first error for each rule). *This is the default.*
567
609
 
568
610
  ##### options.strings
569
611
 
@@ -605,17 +647,18 @@ for readability and easy reuse. The `readConfig` and `readConfigSync` functions
605
647
  load configuration settings and support the `extends` keyword for referencing
606
648
  other files (see above).
607
649
 
608
- By default, configuration files are parsed as JSON (and named `.markdownlint.json`).
609
- Custom parsers can be provided to handle other formats like JSONC, YAML, and TOML.
650
+ By default, configuration files are parsed as JSON (and named
651
+ `.markdownlint.json`). Custom parsers can be provided to handle other formats
652
+ like JSONC, YAML, and TOML.
610
653
 
611
654
  Asynchronous API:
612
655
 
613
- ```js
656
+ ```javascript
614
657
  /**
615
658
  * Read specified configuration file.
616
659
  *
617
660
  * @param {string} file Configuration file name.
618
- * @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing function(s).
661
+ * @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing function.
619
662
  * @param {Object} [fs] File system implementation.
620
663
  * @param {ReadConfigCallback} [callback] Callback (err, result) function.
621
664
  * @returns {void}
@@ -625,7 +668,7 @@ function readConfig(file, parsers, fs, callback) { ... }
625
668
 
626
669
  Synchronous API:
627
670
 
628
- ```js
671
+ ```javascript
629
672
  /**
630
673
  * Read specified configuration file synchronously.
631
674
  *
@@ -640,7 +683,7 @@ function readConfigSync(file, parsers, fs) { ... }
640
683
  Promise API (in the `promises` namespace like Node.js's
641
684
  [`fs` Promises API](https://nodejs.org/api/fs.html#fs_promises_api)):
642
685
 
643
- ```js
686
+ ```javascript
644
687
  /**
645
688
  * Read specified configuration file.
646
689
  *
@@ -658,12 +701,13 @@ Type: `String`
658
701
 
659
702
  Location of configuration file to read.
660
703
 
661
- The `file` is resolved relative to the current working directory. If an `extends`
662
- key is present once read, its value will be resolved as a path relative to `file`
663
- and loaded recursively. Settings from a file referenced by `extends` are applied
664
- first, then those of `file` are applied on top (overriding any of the same keys
665
- appearing in the referenced file). If either the `file` or `extends` path begins
666
- with the `~` directory, it will act as a placeholder for the home directory.
704
+ The `file` is resolved relative to the current working directory. If an
705
+ `extends` key is present once read, its value will be resolved as a path
706
+ relative to `file` and loaded recursively. Settings from a file referenced by
707
+ `extends` are applied first, then those of `file` are applied on top (overriding
708
+ any of the same keys appearing in the referenced file). If either the `file` or
709
+ `extends` path begins with the `~` directory, it will act as a placeholder for
710
+ the home directory.
667
711
 
668
712
  #### parsers
669
713
 
@@ -671,25 +715,28 @@ Type: *Optional* `Array` of `Function` taking (`String`) and returning `Object`
671
715
 
672
716
  Array of functions to parse configuration files.
673
717
 
674
- The contents of a configuration file are passed to each parser function until one
675
- of them returns a value (vs. throwing an exception). Consequently, strict parsers
676
- should come before flexible parsers.
718
+ The contents of a configuration file are passed to each parser function until
719
+ one of them returns a value (vs. throwing an exception). Consequently, strict
720
+ parsers should come before flexible parsers.
677
721
 
678
722
  For example:
679
723
 
680
- ```js
724
+ ```javascript
681
725
  [ JSON.parse, require("toml").parse, require("js-yaml").load ]
682
726
  ```
683
727
 
684
728
  #### fs
685
729
 
686
- Type: *Optional* `Object` implementing the [file system API](https://nodejs.org/api/fs.html)
730
+ Type: *Optional* `Object` implementing the [file system API][file-system-api]
687
731
 
688
- In advanced scenarios, it may be desirable to bypass the default file system API.
689
- If a custom file system implementation is provided, `markdownlint` will use that
690
- instead of invoking `require("fs")`.
732
+ [file-system-api]: https://nodejs.org/api/fs.html
691
733
 
692
- Note: The only methods called are `readFile`, `readFileSync`, `access`, and `accessSync`.
734
+ In advanced scenarios, it may be desirable to bypass the default file system
735
+ API. If a custom file system implementation is provided, `markdownlint` will use
736
+ that instead of invoking `require("fs")`.
737
+
738
+ Note: The only methods called are `readFile`, `readFileSync`, `access`, and
739
+ `accessSync`.
693
740
 
694
741
  #### callback
695
742
 
@@ -707,7 +754,7 @@ Configuration object.
707
754
 
708
755
  Invoke `markdownlint` and use the `result` object's `toString` method:
709
756
 
710
- ```js
757
+ ```javascript
711
758
  const markdownlint = require("markdownlint");
712
759
 
713
760
  const options = {
@@ -740,14 +787,14 @@ bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be
740
787
 
741
788
  Or invoke `markdownlint.sync` for a synchronous call:
742
789
 
743
- ```js
790
+ ```javascript
744
791
  const result = markdownlint.sync(options);
745
792
  console.log(result.toString());
746
793
  ```
747
794
 
748
795
  To examine the `result` object directly:
749
796
 
750
- ```js
797
+ ```javascript
751
798
  markdownlint(options, function callback(err, result) {
752
799
  if (!err) {
753
800
  console.dir(result, { "colors": true, "depth": null });
@@ -764,28 +811,28 @@ Output:
764
811
  { "lineNumber": 3,
765
812
  "ruleNames": [ "MD010", "no-hard-tabs" ],
766
813
  "ruleDescription": "Hard tabs",
767
- "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
814
+ "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md010.md",
768
815
  "errorDetail": "Column: 17",
769
816
  "errorContext": null,
770
817
  "errorRange": [ 17, 1 ] },
771
818
  { "lineNumber": 1,
772
819
  "ruleNames": [ "MD018", "no-missing-space-atx" ],
773
820
  "ruleDescription": "No space after hash on atx style heading",
774
- "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md018",
821
+ "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md018.md",
775
822
  "errorDetail": null,
776
823
  "errorContext": "#bad.md",
777
824
  "errorRange": [ 1, 2 ] },
778
825
  { "lineNumber": 3,
779
826
  "ruleNames": [ "MD018", "no-missing-space-atx" ],
780
827
  "ruleDescription": "No space after hash on atx style heading",
781
- "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md018",
828
+ "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md018.md",
782
829
  "errorDetail": null,
783
830
  "errorContext": "#This file fails\tsome rules.",
784
831
  "errorRange": [ 1, 2 ] },
785
832
  { "lineNumber": 1,
786
833
  "ruleNames": [ "MD041", "first-line-heading", "first-line-h1" ],
787
834
  "ruleDescription": "First line in a file should be a top-level heading",
788
- "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041",
835
+ "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md041.md",
789
836
  "errorDetail": null,
790
837
  "errorContext": "#bad.md",
791
838
  "errorRange": null }
@@ -793,9 +840,10 @@ Output:
793
840
  }
794
841
  ```
795
842
 
796
- Integration with the [gulp](https://gulpjs.com/) build system is straightforward:
843
+ Integration with the [gulp](https://gulpjs.com/) build system is
844
+ straightforward:
797
845
 
798
- ```js
846
+ ```javascript
799
847
  const gulp = require("gulp");
800
848
  const through2 = require("through2");
801
849
  const markdownlint = require("markdownlint");
@@ -829,7 +877,7 @@ bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be
829
877
 
830
878
  Integration with the [Grunt](https://gruntjs.com/) build system is similar:
831
879
 
832
- ```js
880
+ ```javascript
833
881
  const markdownlint = require("markdownlint");
834
882
 
835
883
  module.exports = function wrapper(grunt) {
@@ -868,13 +916,21 @@ bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be
868
916
  Use --force to continue.
869
917
  ```
870
918
 
919
+ ### Fixing
920
+
921
+ Rules that can be fixed automatically include a `fixInfo` property which is
922
+ outlined in the [documentation for custom rules](doc/CustomRules.md#authoring).
923
+ To apply those fixes more easily, the `applyFixes` method in
924
+ [markdownlint-rule-helpers](helpers/README.md#applying-recommended-fixes) may
925
+ be used.
926
+
871
927
  ## Browser
872
928
 
873
929
  `markdownlint` also works in the browser.
874
930
 
875
931
  Generate normal and minified scripts with:
876
932
 
877
- ```shell
933
+ ```bash
878
934
  npm run build-demo
879
935
  ```
880
936
 
@@ -887,7 +943,7 @@ Then reference `markdown-it` and `markdownlint`:
887
943
 
888
944
  And call it like so:
889
945
 
890
- ```js
946
+ ```javascript
891
947
  const options = {
892
948
  "strings": {
893
949
  "content": "Some Markdown to lint."
@@ -901,127 +957,192 @@ const results = window.markdownlint.sync(options).toString();
901
957
  For ideas how to integrate `markdownlint` into your workflow, refer to the
902
958
  following projects or one of the tools in the [Related section](#related):
903
959
 
904
- * [.NET Documentation](https://docs.microsoft.com/en-us/dotnet/) ([Search repository](https://github.com/dotnet/docs/search?q=markdownlint))
905
- * [ally.js](https://allyjs.io/) ([Search repository](https://github.com/medialize/ally.js/search?q=markdownlint))
906
- * [Boostnote](https://boostnote.io/) ([Search repository](https://github.com/BoostIO/Boostnote/search?q=markdownlint))
907
- * [CodiMD](https://github.com/hackmdio/codimd) ([Search repository](https://github.com/hackmdio/codimd/search?q=markdownlint))
908
- * [ESLint](https://eslint.org/) ([Search repository](https://github.com/eslint/eslint/search?q=markdownlint))
909
- * [Garden React Components](https://zendeskgarden.github.io/react-components/) ([Search repository](https://github.com/zendeskgarden/react-components/search?q=markdownlint))
910
- * [MDN Web Docs](https://developer.mozilla.org/) ([Search repository](https://github.com/mdn/content/search?q=markdownlint))
911
- * [MkDocs](https://www.mkdocs.org/) ([Search repository](https://github.com/mkdocs/mkdocs/search?q=markdownlint))
912
- * [Mocha](https://mochajs.org/) ([Search repository](https://github.com/mochajs/mocha/search?q=markdownlint))
913
- * [Pi-hole documentation](https://docs.pi-hole.net) ([Search repository](https://github.com/pi-hole/docs/search?q=markdownlint))
914
- * [Reactable](https://glittershark.github.io/reactable/) ([Search repository](https://github.com/glittershark/reactable/search?q=markdownlint))
915
- * [Sinon.JS](https://sinonjs.org/) ([Search repository](https://github.com/sinonjs/sinon/search?q=markdownlint))
916
- * [TestCafe](https://devexpress.github.io/testcafe/) ([Search repository](https://github.com/DevExpress/testcafe/search?q=markdownlint))
917
- * [V8](https://v8.dev/) ([Search repository](https://github.com/v8/v8.dev/search?q=markdownlint))
918
- * [webhint](https://webhint.io/) ([Search repository](https://github.com/webhintio/hint/search?q=markdownlint))
919
- * [webpack](https://webpack.js.org/) ([Search repository](https://github.com/webpack/webpack.js.org/search?q=markdownlint))
920
- * [WordPress](https://wordpress.org/gutenberg/) ([Search repository](https://github.com/WordPress/gutenberg/search?q=markdownlint))
960
+ - [.NET Documentation][dot-net-doc] ([Search repository][dot-net-doc-search])
961
+ - [ally.js][ally-js] ([Search repository][ally-js-search])
962
+ - [Apache Airflow][airflow] ([Search repository][airflow-search])
963
+ - [Boostnote][boostnote] ([Search repository][boostnote-search])
964
+ - [CodiMD][codimd] ([Search repository][codimd-search])
965
+ - [Electron][electron] ([Search repository][electron-search])
966
+ - [ESLint][eslint] ([Search repository][eslint-search])
967
+ - [Garden React Components][garden] ([Search repository][garden-search])
968
+ - [MDN Web Docs][mdn] ([Search repository][mdn-search])
969
+ - [MkDocs][mkdocs] ([Search repository][mkdocs-search])
970
+ - [Mocha][mocha] ([Search repository][mocha-search])
971
+ - [Pi-hole documentation][pi-hole] ([Search repository][pi-hole-search])
972
+ - [Reactable][reactable] ([Search repository][reactable-search])
973
+ - [V8][v8] ([Search repository][v8-search])
974
+ - [webhint][webhint] ([Search repository][webhint-search])
975
+ - [webpack][webpack] ([Search repository][webpack-search])
976
+ - [WordPress][wordpress] ([Search repository][wordpress-search])
977
+
978
+ [ally-js]: https://allyjs.io/
979
+ [ally-js-search]: https://github.com/medialize/ally.js/search?q=markdownlint
980
+ [airflow]: https://airflow.apache.org
981
+ [airflow-search]: https://github.com/apache/airflow/search?q=markdownlint
982
+ [boostnote]: https://boostnote.io/
983
+ [boostnote-search]: https://github.com/BoostIO/Boostnote/search?q=markdownlint
984
+ [codimd]: https://github.com/hackmdio/codimd
985
+ [codimd-search]: https://github.com/hackmdio/codimd/search?q=markdownlint
986
+ [dot-net-doc]: https://docs.microsoft.com/en-us/dotnet/
987
+ [dot-net-doc-search]: https://github.com/dotnet/docs/search?q=markdownlint
988
+ [electron]: https://www.electronjs.org
989
+ [electron-search]: https://github.com/electron/electron/search?q=markdownlint
990
+ [eslint]: https://eslint.org/
991
+ [eslint-search]: https://github.com/eslint/eslint/search?q=markdownlint
992
+ [garden]: https://zendeskgarden.github.io/react-components/
993
+ [garden-search]: https://github.com/zendeskgarden/react-components/search?q=markdownlint
994
+ [mdn]: https://developer.mozilla.org/
995
+ [mdn-search]: https://github.com/mdn/content/search?q=markdownlint
996
+ [mkdocs]: https://www.mkdocs.org/
997
+ [mkdocs-search]: https://github.com/mkdocs/mkdocs/search?q=markdownlint
998
+ [mocha]: https://mochajs.org/
999
+ [mocha-search]: https://github.com/mochajs/mocha/search?q=markdownlint
1000
+ [pi-hole]: https://docs.pi-hole.net
1001
+ [pi-hole-search]: https://github.com/pi-hole/docs/search?q=markdownlint
1002
+ [reactable]: https://glittershark.github.io/reactable/
1003
+ [reactable-search]: https://github.com/glittershark/reactable/search?q=markdownlint
1004
+ [v8]: https://v8.dev/
1005
+ [v8-search]: https://github.com/v8/v8.dev/search?q=markdownlint
1006
+ [webhint]: https://webhint.io/
1007
+ [webhint-search]: https://github.com/webhintio/hint/search?q=markdownlint
1008
+ [webpack]: https://webpack.js.org/
1009
+ [webpack-search]: https://github.com/webpack/webpack.js.org/search?q=markdownlint
1010
+ [wordpress]: https://wordpress.org/gutenberg/
1011
+ [wordpress-search]: https://github.com/WordPress/gutenberg/search?q=markdownlint
921
1012
 
922
1013
  ## Contributing
923
1014
 
924
1015
  See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
925
1016
 
1017
+ ## Releasing
1018
+
1019
+ See [ReleaseProcess.md](doc/ReleaseProcess.md) for more information.
1020
+
926
1021
  ## History
927
1022
 
928
- * 0.0.1 - Initial release, includes tests MD001-MD032.
929
- * 0.0.2 - Improve documentation, tests, and code.
930
- * 0.0.3 - Add synchronous API, improve documentation and code.
931
- * 0.0.4 - Add tests MD033-MD040, update dependencies.
932
- * 0.0.5 - Add `strings` option to enable file-less scenarios, add in-browser demo.
933
- * 0.0.6 - Improve performance, simplify in-browser, update dependencies.
934
- * 0.0.7 - Add MD041, improve MD003, ignore front matter, update dependencies.
935
- * 0.0.8 - Support disabling/enabling rules inline, improve code fence, dependencies.
936
- * 0.1.0 - Add aliases, exceptions for MD033, exclusions for MD013, dependencies.
937
- * 0.1.1 - Fix bug handling HTML in tables, reference markdownlint-cli.
938
- * 0.2.0 - Add MD042/MD043, enhance MD002/MD003/MD004/MD007/MD011/MD025/MD041, dependencies.
939
- * 0.3.0 - More detailed error reporting with `resultVersion`, enhance MD010/MD012/MD036,
940
- fixes for MD027/MD029/MD030, include JSON schema, dependencies.
941
- * 0.3.1 - Fix regressions in MD032/MD038, update dependencies.
942
- * 0.4.0 - Add MD044, enhance MD013/MD032/MD041/MD042/MD043, fix for MD038, dependencies.
943
- * 0.4.1 - Fixes for MD038/front matter, improvements to MD044, update dependencies.
944
- * 0.5.0 - Add shareable configuration, `noInlineConfig` option, README links, fix MD030,
945
- improve MD009/MD041, update dependencies.
946
- * 0.6.0 - `resultVersion` defaults to 1 (breaking change), ignore HTML comments, TOML
947
- front matter, fixes for MD044, update dependencies.
948
- * 0.6.1 - Update `markdown-it` versioning, exclude demo/test from publishing.
949
- * 0.6.2 - Improve MD013/MD027/MD034/MD037/MD038/MD041/MD044, update dependencies.
950
- * 0.6.3 - Improve highlighting for MD020.
951
- * 0.6.4 - Improve MD029/MD042, update dependencies.
952
- * 0.7.0 - `resultVersion` defaults to 2 (breaking change), add MD045, improve MD029,
953
- remove trimLeft/trimRight, split rules, refactor, update dependencies.
954
- * 0.8.0 - Add support for using and authoring custom rules, improve MD004/MD007/MD013,
955
- add `engines` to `package.json`, refactor, update dependencies.
956
- * 0.8.1 - Update item loop to be iterative, improve MD014, update dependencies.
957
- * 0.9.0 - Remove support for end-of-life Node versions 0.10/0.12/4, change "header" to
958
- "heading" per spec (non-breaking), improve MD003/MD009/MD041, handle uncommon
959
- line-break characters, refactor for ES6, update dependencies.
960
- * 0.10.0 - Add support for non-JSON configuration files, pass file/string name to custom
961
- rules, update dependencies.
962
- * 0.11.0 - Improve MD005/MD024/MD029/MD038, improve custom rule example, add CONTRIBUTING.md,
963
- update dependencies.
964
- * 0.12.0 - Add `information` link for custom rules, `markdownItPlugins` for extensibility,
965
- improve MD023/MD032/MD038, update dependencies.
966
- * 0.13.0 - Improve MD013/MD022/MD025/MD029/MD031/MD032/MD037/MD041/, deprecate MD002,
967
- improve pandoc YAML support, update dependencies.
968
- * 0.14.0 - Remove support for end-of-life Node version 6, introduce `markdownlint-rule-helpers`,
969
- add MD046/MD047, improve MD033/MD034/MD039, improve custom rule validation and
970
- in-browser demo, update dependencies.
971
- * 0.14.1 - Improve MD033.
972
- * 0.14.2 - Improve MD047, add `handleRuleFailures` option.
973
- * 0.15.0 - Add `markdownlint-capture`/`markdownlint-restore` inline comments, improve
974
- MD009/MD013/MD026/MD033/MD036, update dependencies.
975
- * 0.16.0 - Add custom rule sample for linting code, improve MD026/MD031/MD033/MD038,
1023
+ - 0.0.1 - Initial release, includes tests MD001-MD032.
1024
+ - 0.0.2 - Improve documentation, tests, and code.
1025
+ - 0.0.3 - Add synchronous API, improve documentation and code.
1026
+ - 0.0.4 - Add tests MD033-MD040, update dependencies.
1027
+ - 0.0.5 - Add `strings` option to enable file-less scenarios, add in-browser
1028
+ demo.
1029
+ - 0.0.6 - Improve performance, simplify in-browser, update dependencies.
1030
+ - 0.0.7 - Add MD041, improve MD003, ignore front matter, update dependencies.
1031
+ - 0.0.8 - Support disabling/enabling rules inline, improve code fence,
1032
+ dependencies.
1033
+ - 0.1.0 - Add aliases, exceptions for MD033, exclusions for MD013, dependencies.
1034
+ - 0.1.1 - Fix bug handling HTML in tables, reference markdownlint-cli.
1035
+ - 0.2.0 - Add MD042/MD043, enhance MD002/MD003/MD004/MD007/MD011/MD025/MD041,
1036
+ dependencies.
1037
+ - 0.3.0 - More detailed error reporting with `resultVersion`, enhance
1038
+ MD010/MD012/MD036, fixes for MD027/MD029/MD030, include JSON schema,
1039
+ dependencies.
1040
+ - 0.3.1 - Fix regressions in MD032/MD038, update dependencies.
1041
+ - 0.4.0 - Add MD044, enhance MD013/MD032/MD041/MD042/MD043, fix for MD038,
1042
+ dependencies.
1043
+ - 0.4.1 - Fixes for MD038/front matter, improvements to MD044, update
1044
+ dependencies.
1045
+ - 0.5.0 - Add shareable configuration, `noInlineConfig` option, README links,
1046
+ fix MD030, improve MD009/MD041, update dependencies.
1047
+ - 0.6.0 - `resultVersion` defaults to 1 (breaking change), ignore HTML comments,
1048
+ TOML front matter, fixes for MD044, update dependencies.
1049
+ - 0.6.1 - Update `markdown-it` versioning, exclude demo/test from publishing.
1050
+ - 0.6.2 - Improve MD013/MD027/MD034/MD037/MD038/MD041/MD044, update
1051
+ dependencies.
1052
+ - 0.6.3 - Improve highlighting for MD020.
1053
+ - 0.6.4 - Improve MD029/MD042, update dependencies.
1054
+ - 0.7.0 - `resultVersion` defaults to 2 (breaking change), add MD045, improve
1055
+ MD029, remove trimLeft/trimRight, split rules, refactor, update
1056
+ dependencies.
1057
+ - 0.8.0 - Add support for using and authoring custom rules, improve
1058
+ MD004/MD007/MD013, add `engines` to `package.json`, refactor, update
1059
+ dependencies.
1060
+ - 0.8.1 - Update item loop to be iterative, improve MD014, update
1061
+ dependencies.
1062
+ - 0.9.0 - Remove support for end-of-life Node versions 0.10/0.12/4, change
1063
+ "header" to "heading" per spec (non-breaking), improve
1064
+ MD003/MD009/MD041, handle uncommon line-break characters, refactor for
1065
+ ES6, update dependencies.
1066
+ - 0.10.0 - Add support for non-JSON configuration files, pass file/string name
1067
+ to custom rules, update dependencies.
1068
+ - 0.11.0 - Improve MD005/MD024/MD029/MD038, improve custom rule example, add
1069
+ CONTRIBUTING.md, update dependencies.
1070
+ - 0.12.0 - Add `information` link for custom rules, `markdownItPlugins` for
1071
+ extensibility, improve MD023/MD032/MD038, update dependencies.
1072
+ - 0.13.0 - Improve MD013/MD022/MD025/MD029/MD031/MD032/MD037/MD041/, deprecate
1073
+ MD002, improve pandoc YAML support, update dependencies.
1074
+ - 0.14.0 - Remove support for end-of-life Node version 6, introduce
1075
+ `markdownlint-rule-helpers`, add MD046/MD047, improve
1076
+ MD033/MD034/MD039, improve custom rule validation and in-browser
1077
+ demo, update dependencies.
1078
+ - 0.14.1 - Improve MD033.
1079
+ - 0.14.2 - Improve MD047, add `handleRuleFailures` option.
1080
+ - 0.15.0 - Add `markdownlint-capture`/`markdownlint-restore` inline comments,
1081
+ improve MD009/MD013/MD026/MD033/MD036, update dependencies.
1082
+ - 0.16.0 - Add custom rule sample for linting code, improve
1083
+ MD026/MD031/MD033/MD038, update dependencies.
1084
+ - 0.17.0 - Add `resultVersion` 3 to support fix information for default and
1085
+ custom rules, add fix information for 24 rules, update newline
1086
+ handling to match latest CommonMark specification, improve
1087
+ MD014/MD037/MD039, update dependencies.
1088
+ - 0.17.1 - Fix handling of front matter by fix information.
1089
+ - 0.17.2 - Improve MD020/MD033/MD044.
1090
+ - 0.18.0 - Add MD048/code-fence-style, add fix information for MD007/ul-indent,
1091
+ add `markdownlint-disable-file`/`markdownlint-enable-file` inline
1092
+ comments, add type declaration file (.d.ts) for TypeScript
1093
+ dependents, update schema, improve MD006/MD007/MD009/MD013/MD030,
976
1094
  update dependencies.
977
- * 0.17.0 - Add `resultVersion` 3 to support fix information for default and custom rules,
978
- add fix information for 24 rules, update newline handling to match latest
979
- CommonMark specification, improve MD014/MD037/MD039, update dependencies.
980
- * 0.17.1 - Fix handling of front matter by fix information.
981
- * 0.17.2 - Improve MD020/MD033/MD044.
982
- * 0.18.0 - Add MD048/code-fence-style, add fix information for MD007/ul-indent, add
983
- `markdownlint-disable-file`/`markdownlint-enable-file` inline comments, add
984
- type declaration file (.d.ts) for TypeScript dependents, update schema, improve
985
- MD006/MD007/MD009/MD013/MD030, update dependencies.
986
- * 0.19.0 - Remove support for end-of-life Node version 8, add fix information for
987
- MD005/list-indent, improve MD007/MD013/MD014, deprecate MD006/ul-start-left, add
988
- rationale for every rule, update test runner and code coverage, add more JSDoc
989
- comments, update dependencies.
990
- * 0.20.0 - Add `markdownlint-configure-file` inline comment, reimplement MD037,
991
- improve MD005/MD007/MD013/MD018/MD029/MD031/MD034/MD038/MD039, improve HTML
992
- comment handling, update dependencies.
993
- * 0.20.1 - Fix regression in MD037.
994
- * 0.20.2 - Fix regression in MD037, improve MD038.
995
- * 0.20.3 - Fix regression in MD037, improve MD044, add automatic regression testing.
996
- * 0.20.4 - Fix regression in MD037, improve MD034/MD044, improve documentation.
997
- * 0.21.0 - Lint concurrently for better performance (async only), add Promise-based APIs,
998
- update TypeScript declaration file, hide `toString` on `LintResults`, add ability
999
- to fix in browser demo, allow custom rules in `.markdownlint.json` schema, improve
1095
+ - 0.19.0 - Remove support for end-of-life Node version 8, add fix information
1096
+ for MD005/list-indent, improve MD007/MD013/MD014, deprecate
1097
+ MD006/ul-start-left, add rationale for every rule, update test runner
1098
+ and code coverage, add more JSDoc comments, update dependencies.
1099
+ - 0.20.0 - Add `markdownlint-configure-file` inline comment, reimplement MD037,
1100
+ improve MD005/MD007/MD013/MD018/MD029/MD031/MD034/MD038/MD039,
1101
+ improve HTML comment handling, update dependencies.
1102
+ - 0.20.1 - Fix regression in MD037.
1103
+ - 0.20.2 - Fix regression in MD037, improve MD038.
1104
+ - 0.20.3 - Fix regression in MD037, improve MD044, add automatic regression
1105
+ testing.
1106
+ - 0.20.4 - Fix regression in MD037, improve MD034/MD044, improve
1107
+ documentation.
1108
+ - 0.21.0 - Lint concurrently for better performance (async only), add
1109
+ Promise-based APIs, update TypeScript declaration file, hide
1110
+ `toString` on `LintResults`, add ability to fix in browser demo,
1111
+ allow custom rules in `.markdownlint.json` schema, improve
1000
1112
  MD042/MD044, improve documentation, update dependencies.
1001
- * 0.21.1 - Improve MD011/MD031, export `getVersion` API.
1002
- * 0.22.0 - Allow `extends` in config to reference installed packages by name, add
1003
- `markdownlint-disable-next-line` inline comment, support JSON front matter, improve
1004
- MD009/MD026/MD028/MD043, update dependencies (including `markdown-it` to v12).
1005
- * 0.23.0 - Add comprehensive example `.markdownlint.jsonc`/`.markdownlint.yaml` files, add fix
1006
- information for MD004/ul-style, improve MD018/MD019/MD020/MD021/MD037/MD041, improve
1007
- HTML comment handling, update test runner and test suite, update dependencies.
1008
- * 0.23.1 - Work around lack of webpack support for dynamic calls to `require` (`.resolve`).
1009
- * 0.24.0 - Remove support for end-of-life Node version 10, add support for custom file system
1010
- module, improve MD010/MD011/MD037/MD043/MD044, improve TypeScript declaration file
1011
- and JSON schema, update dependencies.
1012
- * 0.25.0 - Add MD049/MD050 for consistent emphasis/strong style (both auto-fixable), improve
1013
- MD007/MD010/MD032/MD033/MD035/MD037/MD039, support asynchronous custom rules,
1014
- improve performance, improve CI process, reduce dependencies, update dependencies.
1015
- * 0.25.1 - Update dependencies for CVE-2022-21670.
1016
- * 0.26.0 - Add MD051/MD052/MD053 for validating link fragments & reference links/images &
1017
- link/image reference definitions (MD053 is auto-fixable), improve
1018
- MD010/MD031/MD035/MD039/MD042/MD044/MD049/MD050, add `markdownlint-disable-line`
1019
- inline comment, support `~` paths in `readConfig/Sync`, add `configParsers` option,
1020
- remove support for end-of-life Node version 12, default `resultVersion` to 3, update
1021
- browser script to use ES2015, simplify JSON schema, address remaining CodeQL issues,
1022
- improve performance, update dependencies.
1023
- * 0.26.1 - Improve MD051.
1024
- * 0.26.2 - Improve MD037/MD051/MD053.
1113
+ - 0.21.1 - Improve MD011/MD031, export `getVersion` API.
1114
+ - 0.22.0 - Allow `extends` in config to reference installed packages by name,
1115
+ add `markdownlint-disable-next-line` inline comment, support JSON
1116
+ front matter, improve MD009/MD026/MD028/MD043, update dependencies
1117
+ (including `markdown-it` to v12).
1118
+ - 0.23.0 - Add comprehensive example `.markdownlint.jsonc`/`.markdownlint.yaml`
1119
+ files, add fix information for MD004/ul-style, improve
1120
+ MD018/MD019/MD020/MD021/MD037/MD041, improve HTML comment handling,
1121
+ update test runner and test suite, update dependencies.
1122
+ - 0.23.1 - Work around lack of webpack support for dynamic calls to
1123
+ `require`(`.resolve`).
1124
+ - 0.24.0 - Remove support for end-of-life Node version 10, add support for
1125
+ custom file system module, improve MD010/MD011/MD037/MD043/MD044,
1126
+ improve TypeScript declaration file and JSON schema, update
1127
+ dependencies.
1128
+ - 0.25.0 - Add MD049/MD050 for consistent emphasis/strong style (both
1129
+ auto-fixable), improve MD007/MD010/MD032/MD033/MD035/MD037/MD039,
1130
+ support asynchronous custom rules, improve performance, improve CI
1131
+ process, reduce dependencies, update dependencies.
1132
+ - 0.25.1 - Update dependencies for CVE-2022-21670.
1133
+ - 0.26.0 - Add MD051/MD052/MD053 for validating link fragments & reference
1134
+ links/images & link/image reference definitions (MD053 auto-fixable),
1135
+ improve MD010/MD031/MD035/MD039/MD042/MD044/MD049/MD050, add
1136
+ `markdownlint-disable-line` inline comment, support `~` paths in
1137
+ `readConfig/Sync`, add `configParsers` option, remove support for
1138
+ end-of-life Node version 12, default `resultVersion` to 3, update
1139
+ browser script to use ES2015, simplify JSON schema, address remaining
1140
+ CodeQL issues, improve performance, update dependencies.
1141
+ - 0.26.1 - Improve MD051.
1142
+ - 0.26.2 - Improve MD037/MD051/MD053.
1143
+ - 0.27.0 - Improve MD011/MD013/MD022/MD031/MD032/MD033/MD034/MD040/MD043/MD051/
1144
+ MD053, generate/separate documentation, improve documentation, update
1145
+ dependencies.
1025
1146
 
1026
1147
  [npm-image]: https://img.shields.io/npm/v/markdownlint.svg
1027
1148
  [npm-url]: https://www.npmjs.com/package/markdownlint