markdownlint 0.31.1 → 0.32.1
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.
- package/CHANGELOG.md +15 -0
- package/CONTRIBUTING.md +2 -2
- package/README.md +19 -28
- package/demo/markdownlint-browser.js +521 -352
- package/doc/Rules.md +146 -127
- package/doc/md001.md +2 -2
- package/doc/md003.md +2 -2
- package/doc/md007.md +3 -4
- package/doc/md013.md +0 -3
- package/doc/md018.md +1 -1
- package/doc/md019.md +1 -1
- package/doc/md020.md +1 -1
- package/doc/md021.md +1 -1
- package/doc/md022.md +2 -2
- package/doc/md023.md +9 -2
- package/doc/md024.md +2 -2
- package/doc/md025.md +1 -1
- package/doc/md026.md +1 -1
- package/doc/md036.md +2 -2
- package/doc/md041.md +1 -1
- package/doc/md043.md +2 -5
- package/doc/md045.md +6 -0
- package/doc/md049.md +1 -1
- package/doc/md050.md +1 -1
- package/doc/md053.md +3 -3
- package/doc/md054.md +100 -0
- package/helpers/helpers.js +27 -7
- package/helpers/micromark.cjs +62 -15
- package/helpers/package.json +2 -1
- package/helpers/shared.js +3 -0
- package/lib/configuration.d.ts +1152 -0
- package/lib/constants.js +7 -7
- package/lib/markdownlint.d.ts +2 -4
- package/lib/markdownlint.js +9 -8
- package/lib/md001.js +2 -2
- package/lib/md003.js +2 -2
- package/lib/md005.js +21 -17
- package/lib/md007.js +62 -25
- package/lib/md013.js +1 -4
- package/lib/md018.js +1 -1
- package/lib/md019.js +1 -1
- package/lib/md020.js +1 -1
- package/lib/md021.js +1 -1
- package/lib/md022.js +4 -4
- package/lib/md023.js +2 -2
- package/lib/md024.js +2 -2
- package/lib/md025.js +1 -1
- package/lib/md026.js +1 -1
- package/lib/md030.js +33 -22
- package/lib/md032.js +1 -4
- package/lib/md033.js +1 -3
- package/lib/md034.js +31 -25
- package/lib/md036.js +2 -2
- package/lib/md037.js +2 -2
- package/lib/md038.js +7 -5
- package/lib/md041.js +1 -1
- package/lib/md043.js +3 -3
- package/lib/md045.js +33 -3
- package/lib/md049-md050.js +2 -2
- package/lib/md051.js +8 -6
- package/lib/md053.js +1 -1
- package/lib/md054.js +125 -0
- package/lib/rules.js +5 -3
- package/package.json +18 -16
- package/schema/.markdownlint.jsonc +63 -60
- package/schema/.markdownlint.yaml +62 -59
- package/schema/markdownlint-config-schema.json +840 -186
- package/style/relaxed.json +0 -1
- package/doc/md002.md +0 -37
- package/doc/md006.md +0 -46
- package/lib/md002.js +0 -22
- package/lib/md006.js +0 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.32.1
|
|
4
|
+
|
|
5
|
+
- Fix behavior of MD054
|
|
6
|
+
|
|
7
|
+
## 0.32.0
|
|
8
|
+
|
|
9
|
+
- Remove deprecated MD002/MD006
|
|
10
|
+
- Remove rule aliases for "header"
|
|
11
|
+
- Add MD054/link-image-style
|
|
12
|
+
- Use `micromark` in MD005/MD007/MD030
|
|
13
|
+
- Improve MD022/MD026/MD034/MD037/MD038/MD045/MD051
|
|
14
|
+
- Improve JSON schema and related examples
|
|
15
|
+
- Provide type declaration for Configuration object
|
|
16
|
+
- Update dependencies
|
|
17
|
+
|
|
3
18
|
## 0.31.1
|
|
4
19
|
|
|
5
20
|
- Improve MD032/MD034
|
package/CONTRIBUTING.md
CHANGED
|
@@ -73,8 +73,8 @@ In order to maintain the permissive MIT license this project uses, all
|
|
|
73
73
|
contributions must be your own and released under that license. Code you add
|
|
74
74
|
should be an original work and should not be copied from elsewhere. Taking code
|
|
75
75
|
from a different project, Stack Overflow, or the like is not allowed. The use of
|
|
76
|
-
tools such as GitHub Copilot
|
|
77
|
-
allowed.
|
|
76
|
+
tools such as GitHub Copilot, ChatGPT, LLMs (large language models), etc. that
|
|
77
|
+
incorporate code from other projects is not allowed.
|
|
78
78
|
|
|
79
79
|
Thank you!
|
|
80
80
|
|
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ and test cases came directly from that project.
|
|
|
67
67
|
[nodejs-extensions]: https://github.com/Lombiq/NodeJs-Extensions
|
|
68
68
|
[rubygems-mdl]: https://rubygems.org/gems/mdl
|
|
69
69
|
[sublimelinter]: https://packagecontrol.io/packages/SublimeLinter-contrib-markdownlint
|
|
70
|
-
[super-linter]: https://github.com/
|
|
70
|
+
[super-linter]: https://github.com/super-linter/super-linter
|
|
71
71
|
[vscode-markdownlint]: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
|
|
72
72
|
|
|
73
73
|
### References
|
|
@@ -86,12 +86,10 @@ playground for learning and exploring.
|
|
|
86
86
|
|
|
87
87
|
<!-- markdownlint-disable line-length -->
|
|
88
88
|
|
|
89
|
-
- **[MD001](doc/md001.md)** *heading-increment
|
|
90
|
-
-
|
|
91
|
-
- **[MD003](doc/md003.md)** *heading-style/header-style* - Heading style
|
|
89
|
+
- **[MD001](doc/md001.md)** *heading-increment* - Heading levels should only increment by one level at a time
|
|
90
|
+
- **[MD003](doc/md003.md)** *heading-style* - Heading style
|
|
92
91
|
- **[MD004](doc/md004.md)** *ul-style* - Unordered list style
|
|
93
92
|
- **[MD005](doc/md005.md)** *list-indent* - Inconsistent indentation for list items at the same level
|
|
94
|
-
- ~~**[MD006](doc/md006.md)** *ul-start-left* - Consider starting bulleted lists at the beginning of the line~~
|
|
95
93
|
- **[MD007](doc/md007.md)** *ul-indent* - Unordered list indentation
|
|
96
94
|
- **[MD009](doc/md009.md)** *no-trailing-spaces* - Trailing spaces
|
|
97
95
|
- **[MD010](doc/md010.md)** *no-hard-tabs* - Hard tabs
|
|
@@ -103,9 +101,9 @@ playground for learning and exploring.
|
|
|
103
101
|
- **[MD019](doc/md019.md)** *no-multiple-space-atx* - Multiple spaces after hash on atx style heading
|
|
104
102
|
- **[MD020](doc/md020.md)** *no-missing-space-closed-atx* - No space inside hashes on closed atx style heading
|
|
105
103
|
- **[MD021](doc/md021.md)** *no-multiple-space-closed-atx* - Multiple spaces inside hashes on closed atx style heading
|
|
106
|
-
- **[MD022](doc/md022.md)** *blanks-around-headings
|
|
107
|
-
- **[MD023](doc/md023.md)** *heading-start-left
|
|
108
|
-
- **[MD024](doc/md024.md)** *no-duplicate-heading
|
|
104
|
+
- **[MD022](doc/md022.md)** *blanks-around-headings* - Headings should be surrounded by blank lines
|
|
105
|
+
- **[MD023](doc/md023.md)** *heading-start-left* - Headings must start at the beginning of the line
|
|
106
|
+
- **[MD024](doc/md024.md)** *no-duplicate-heading* - Multiple headings with the same content
|
|
109
107
|
- **[MD025](doc/md025.md)** *single-title/single-h1* - Multiple top-level headings in the same document
|
|
110
108
|
- **[MD026](doc/md026.md)** *no-trailing-punctuation* - Trailing punctuation in heading
|
|
111
109
|
- **[MD027](doc/md027.md)** *no-multiple-space-blockquote* - Multiple spaces after blockquote symbol
|
|
@@ -117,35 +115,30 @@ playground for learning and exploring.
|
|
|
117
115
|
- **[MD033](doc/md033.md)** *no-inline-html* - Inline HTML
|
|
118
116
|
- **[MD034](doc/md034.md)** *no-bare-urls* - Bare URL used
|
|
119
117
|
- **[MD035](doc/md035.md)** *hr-style* - Horizontal rule style
|
|
120
|
-
- **[MD036](doc/md036.md)** *no-emphasis-as-heading
|
|
118
|
+
- **[MD036](doc/md036.md)** *no-emphasis-as-heading* - Emphasis used instead of a heading
|
|
121
119
|
- **[MD037](doc/md037.md)** *no-space-in-emphasis* - Spaces inside emphasis markers
|
|
122
120
|
- **[MD038](doc/md038.md)** *no-space-in-code* - Spaces inside code span elements
|
|
123
121
|
- **[MD039](doc/md039.md)** *no-space-in-links* - Spaces inside link text
|
|
124
122
|
- **[MD040](doc/md040.md)** *fenced-code-language* - Fenced code blocks should have a language specified
|
|
125
123
|
- **[MD041](doc/md041.md)** *first-line-heading/first-line-h1* - First line in a file should be a top-level heading
|
|
126
124
|
- **[MD042](doc/md042.md)** *no-empty-links* - No empty links
|
|
127
|
-
- **[MD043](doc/md043.md)** *required-headings
|
|
125
|
+
- **[MD043](doc/md043.md)** *required-headings* - Required heading structure
|
|
128
126
|
- **[MD044](doc/md044.md)** *proper-names* - Proper names should have the correct capitalization
|
|
129
127
|
- **[MD045](doc/md045.md)** *no-alt-text* - Images should have alternate text (alt text)
|
|
130
128
|
- **[MD046](doc/md046.md)** *code-block-style* - Code block style
|
|
131
129
|
- **[MD047](doc/md047.md)** *single-trailing-newline* - Files should end with a single newline character
|
|
132
130
|
- **[MD048](doc/md048.md)** *code-fence-style* - Code fence style
|
|
133
|
-
- **[MD049](doc/md049.md)** *emphasis-style* - Emphasis style
|
|
134
|
-
- **[MD050](doc/md050.md)** *strong-style* - Strong style
|
|
131
|
+
- **[MD049](doc/md049.md)** *emphasis-style* - Emphasis style
|
|
132
|
+
- **[MD050](doc/md050.md)** *strong-style* - Strong style
|
|
135
133
|
- **[MD051](doc/md051.md)** *link-fragments* - Link fragments should be valid
|
|
136
134
|
- **[MD052](doc/md052.md)** *reference-links-images* - Reference links and images should use a label that is defined
|
|
137
135
|
- **[MD053](doc/md053.md)** *link-image-reference-definitions* - Link and image reference definitions should be needed
|
|
136
|
+
- **[MD054](doc/md054.md)** *link-image-style* - Link and image style
|
|
138
137
|
|
|
139
138
|
<!-- markdownlint-restore -->
|
|
140
139
|
|
|
141
140
|
See [Rules.md](doc/Rules.md) for more details.
|
|
142
141
|
|
|
143
|
-
~~Struck through~~ rules are deprecated and provided for backward-compatibility.
|
|
144
|
-
|
|
145
|
-
> All rules with `heading` as part of their name are also available as `header`
|
|
146
|
-
> aliases (e.g. `heading-increment` is also available as `header-increment`).
|
|
147
|
-
> The use of `header` is deprecated and provided for backward-compatibility.
|
|
148
|
-
|
|
149
142
|
### Custom Rules
|
|
150
143
|
|
|
151
144
|
In addition to built-in rules, custom rules can be used to address
|
|
@@ -165,26 +158,24 @@ rules at once.
|
|
|
165
158
|
- **`atx_closed`** - `MD020`, `MD021`
|
|
166
159
|
- **`blank_lines`** - `MD012`, `MD022`, `MD031`, `MD032`, `MD047`
|
|
167
160
|
- **`blockquote`** - `MD027`, `MD028`
|
|
168
|
-
- **`bullet`** - `MD004`, `MD005`, `
|
|
161
|
+
- **`bullet`** - `MD004`, `MD005`, `MD007`, `MD032`
|
|
169
162
|
- **`code`** - `MD014`, `MD031`, `MD038`, `MD040`, `MD046`, `MD048`
|
|
170
163
|
- **`emphasis`** - `MD036`, `MD037`, `MD049`, `MD050`
|
|
171
164
|
- **`hard_tab`** - `MD010`
|
|
172
|
-
- **`
|
|
165
|
+
- **`headings`** - `MD001`, `MD003`, `MD018`, `MD019`, `MD020`, `MD021`,
|
|
173
166
|
`MD022`, `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`, `MD043`
|
|
174
|
-
- **`headings`** - `MD001`, `MD002`, `MD003`, `MD018`, `MD019`, `MD020`,
|
|
175
|
-
`MD021`, `MD022`, `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`,
|
|
176
|
-
`MD043`
|
|
177
167
|
- **`hr`** - `MD035`
|
|
178
168
|
- **`html`** - `MD033`
|
|
179
|
-
- **`images`** - `MD045`, `MD052`, `MD053`
|
|
180
|
-
- **`indentation`** - `MD005`, `
|
|
169
|
+
- **`images`** - `MD045`, `MD052`, `MD053`, `MD054`
|
|
170
|
+
- **`indentation`** - `MD005`, `MD007`, `MD027`
|
|
181
171
|
- **`language`** - `MD040`
|
|
182
172
|
- **`line_length`** - `MD013`
|
|
183
|
-
- **`links`** - `MD011`, `MD034`, `MD039`, `MD042`, `MD051`, `MD052`, `MD053
|
|
173
|
+
- **`links`** - `MD011`, `MD034`, `MD039`, `MD042`, `MD051`, `MD052`, `MD053`,
|
|
174
|
+
`MD054`
|
|
184
175
|
- **`ol`** - `MD029`, `MD030`, `MD032`
|
|
185
176
|
- **`spaces`** - `MD018`, `MD019`, `MD020`, `MD021`, `MD023`
|
|
186
177
|
- **`spelling`** - `MD044`
|
|
187
|
-
- **`ul`** - `MD004`, `MD005`, `
|
|
178
|
+
- **`ul`** - `MD004`, `MD005`, `MD007`, `MD030`, `MD032`
|
|
188
179
|
- **`url`** - `MD034`
|
|
189
180
|
- **`whitespace`** - `MD009`, `MD010`, `MD012`, `MD027`, `MD028`, `MD030`,
|
|
190
181
|
`MD037`, `MD038`, `MD039`
|
|
@@ -518,7 +509,7 @@ specify a custom `RegExp` or use the value `null` to disable the feature.
|
|
|
518
509
|
The default value:
|
|
519
510
|
|
|
520
511
|
```javascript
|
|
521
|
-
/((^---\s*$[\s\S]
|
|
512
|
+
/((^---\s*$[\s\S]+?^---\s*)|(^\+\+\+\s*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{\s*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m
|
|
522
513
|
```
|
|
523
514
|
|
|
524
515
|
Ignores [YAML](https://en.wikipedia.org/wiki/YAML),
|