Skip to content

Commit fb40a2b

Browse files
committed
Fix a rule or two, add comments
1 parent 8fa8f29 commit fb40a2b

File tree

1 file changed

+57
-5
lines changed

1 file changed

+57
-5
lines changed

.markdownlint.jsonc

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,33 @@
88
"extends": null,
99

1010
// MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time
11+
// Enforces bullet 1 of https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#titles
1112
"MD001": true,
1213

1314
// MD003/heading-style/header-style - Heading style
15+
// Pretty sure we do this implicitly
16+
// Enforces a heading style like the following
17+
//
18+
// # Title
19+
// ## Subheading
1420
"MD003": {
1521
// Heading style
1622
"style": "atx"
1723
},
1824

1925
// MD004/ul-style - Unordered list style
26+
// Enforces https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#unordered-lists
2027
"MD004": {
2128
// List style
2229
"style": "dash"
2330
},
2431

2532
// MD005/list-indent - Inconsistent indentation for list items at the same level
33+
// Seems implicitly related to https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#unordered-lists
2634
"MD005": true,
2735

2836
// MD007/ul-indent - Unordered list indentation
37+
// Pretty sure we enforce 2 spaces indnetation
2938
"MD007": {
3039
// Spaces for indent
3140
"indent": 2,
@@ -36,6 +45,7 @@
3645
},
3746

3847
// MD009/no-trailing-spaces - Trailing spaces
48+
// Seems like something good to have
3949
"MD009": {
4050
// Spaces for line break
4151
"br_spaces": 2,
@@ -46,15 +56,19 @@
4656
},
4757

4858
// MD010/no-hard-tabs - Hard tabs
59+
// Not sure if we want to enforce this, seems like it would be a good idea?
4960
"MD010": false,
5061

5162
// MD011/no-reversed-links - Reversed link syntax
63+
// Seems obvious, probably good to enforce
5264
"MD011": true,
5365

5466
// MD012/no-multiple-blanks - Multiple consecutive blank lines
67+
// Seems obvious, probably good to enforce
5568
"MD012": true,
5669

5770
// MD013/line-length - Line length
71+
// Very much unsure on this one
5872
"MD013": {
5973
// Number of characters
6074
"line_length": 80,
@@ -77,21 +91,27 @@
7791
},
7892

7993
// MD014/commands-show-output - Dollar signs used before commands without showing output
94+
// Seems obvious, probably good to enforce
8095
"MD014": true,
8196

8297
// MD018/no-missing-space-atx - No space after hash on atx style heading
98+
// Seems to be something we already do anyways
8399
"MD018": true,
84100

85101
// MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading
102+
// Seems to be something we already do anyways
86103
"MD019": true,
87104

88105
// MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading
106+
// Seems irrelvant since we are using atxc headings
89107
"MD020": false,
90108

91109
// MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading
110+
// Seems irrelvant since we are using atxc headings
92111
"MD021": false,
93112

94113
// MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
114+
// Seems to be something we already do anyways
95115
"MD022": {
96116
// Blank lines above heading
97117
"lines_above": 1,
@@ -100,43 +120,54 @@
100120
},
101121

102122
// MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line
123+
// Seems to be something we already do anyways
103124
"MD023": true,
104125

105126
// MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
127+
// Seems to be a good practice
106128
"MD024": {
107129
// Only check sibling headings
108-
"allow_different_nesting": false,
109-
// Only check sibling headings
130+
// Added this in case we start doing changelogs
110131
"siblings_only": true
111132
},
112133

113134
// MD025/single-title/single-h1 - Multiple top-level headings in the same document
135+
// Enforces bullet 2 of https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#titles
114136
"MD025": {
115137
// Heading level
116138
"level": 1,
117139
// RegExp for matching title in front matter
118-
"front_matter_title": ""
140+
"front_matter_title": "^\\s*title\\s*[:=]"
119141
},
120142

121143
// MD026/no-trailing-punctuation - Trailing punctuation in heading
144+
// Enforces bullet 3 of https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#titles
122145
"MD026": {
123146
// Punctuation characters
124147
"punctuation": ".,;:!。,;:!"
125148
},
126149

127150
// MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol
151+
// Seems like a good practice
128152
"MD027": true,
129153

130154
// MD028/no-blanks-blockquote - Blank line inside blockquote
155+
// Seems like a good practice
131156
"MD028": true,
132157

133158
// MD029/ol-prefix - Ordered list item prefix
159+
// Pretty sure we enforce this without calling it out
160+
//
161+
// 1.
162+
// 1.
163+
// 1.
134164
"MD029": {
135165
// List style
136166
"style": "one"
137167
},
138168

139169
// MD030/list-marker-space - Spaces after list markers
170+
// Seems like we already do this
140171
"MD030": {
141172
// Spaces for single-line unordered list items
142173
"ul_single": 1,
@@ -149,51 +180,63 @@
149180
},
150181

151182
// MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines
183+
// Seems like a good practice / we already do this
152184
"MD031": {
153185
// Include list items
154186
"list_items": true
155187
},
156188

157189
// MD032/blanks-around-lists - Lists should be surrounded by blank lines
190+
// Seems like a good practice / we already do this
158191
"MD032": true,
159192

160193
// MD033/no-inline-html - Inline HTML
194+
// Not sure about this one - do we need to allow any html elements?
195+
161196
"MD033": {
162197
// Allowed elements
163198
"allowed_elements": []
164199
},
165200

166201
// MD034/no-bare-urls - Bare URL used
202+
// Pretty sure we don't enforce this, but I think it would be a good idea
167203
// TODO remove all bare URLS from docs
168204
// We should not have bare urls in the docs
169205
// Once done, set this to true
170206
"MD034": false,
171207

172208
// MD035/hr-style - Horizontal rule style
209+
// Not sure if this matters
173210
"MD035": {
174211
// Horizontal rule style
175212
"style": "consistent"
176213
},
177214

178215
// MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
216+
// Seems like a good rule to have in place
179217
"MD036": {
180218
// Punctuation characters
181219
"punctuation": ".,;:!?。,;:!?"
182220
},
183221

184222
// MD037/no-space-in-emphasis - Spaces inside emphasis markers
223+
// Seems like a good rule to have in place
185224
"MD037": true,
186225

187226
// MD038/no-space-in-code - Spaces inside code span elements
227+
// Seems like a good rule to have in place
188228
"MD038": true,
189229

190230
// MD039/no-space-in-links - Spaces inside link text
231+
// Seems like a good rule to have in place
191232
"MD039": true,
192233

193234
// MD040/fenced-code-language - Fenced code blocks should have a language specified
235+
// Seems like we already do this
194236
"MD040": true,
195237

196238
// MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
239+
// Enforces https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#titles
197240
"MD041": {
198241
// Heading level
199242
"level": 1,
@@ -202,6 +245,7 @@
202245
},
203246

204247
// MD042/no-empty-links - No empty links
248+
// Seems like a good rule to have in place
205249
"MD042": true,
206250

207251
// MD043/required-headings/required-headers - Required heading structure
@@ -217,47 +261,55 @@
217261
// MD044/proper-names - Proper names should have the correct capitalization
218262
// TODO
219263
// Determine if we want to use this,
264+
// Could be use for things like JavaScript, Python, LibP2P, etc.
220265
// May cause issues
221266
"MD044": {
222267
// List of proper names
223268
"names": [],
224269
// Include code blocks
225-
"code_blocks": true,
270+
"code_blocks": false,
226271
// Include HTML elements
227-
"html_elements": true
272+
"html_elements": false
228273
},
229274

230275
// MD045/no-alt-text - Images should have alternate text (alt text)
276+
// Enforces https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#alt-text
231277
"MD045": true,
232278

233279
// MD046/code-block-style - Code block style
280+
// Seems like we already enforce this
234281
"MD046": {
235282
// Block style
236283
"style": "fenced"
237284
},
238285

239286
// MD047/single-trailing-newline - Files should end with a single newline character
287+
// Not sure if we enforce this, but seems like a good practice
240288
"MD047": true,
241289

242290
// MD048/code-fence-style - Code fence style
291+
// Seems like we already enforce this
243292
"MD048": {
244293
// Code fence style
245294
"style": "backtick"
246295
},
247296

248297
// MD049/emphasis-style - Emphasis style should be consistent
298+
// Enforces https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#italics
249299
"MD049": {
250300
// Emphasis style should be consistent
251301
"style": "underscore"
252302
},
253303

254304
// MD050/strong-style - Strong style should be consistent
305+
// Enforces https://docs.ipfs.tech/community/contribute/grammar-formatting-and-style/#bold-text
255306
"MD050": {
256307
// Strong style should be consistent
257308
"style": "asterisk"
258309
},
259310

260311
// MD051/link-fragments - Link fragments should be valid
312+
// Seems like a good rule, markdow-link-check should also catch this
261313
"MD051": true,
262314

263315
// MD052/reference-links-images - Reference links and images should use a label that is defined

0 commit comments

Comments
 (0)