@alexlit/lint-kit 189.1.0 → 190.0.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 (177) hide show
  1. package/package.json +1 -1
  2. package/packages/config-eslint/package.json +4 -4
  3. package/packages/config-eslint/plugins/json.js +1 -1
  4. package/packages/config-eslint/plugins/prettier.js +1 -1
  5. package/packages/config-eslint/plugins/unicorn.js +2 -1
  6. package/packages/config-markdownlint/node_modules/ansi-regex/index.d.ts +33 -0
  7. package/packages/config-markdownlint/node_modules/ansi-regex/index.js +14 -0
  8. package/packages/config-markdownlint/node_modules/ansi-regex/license +9 -0
  9. package/packages/config-markdownlint/node_modules/ansi-regex/package.json +61 -0
  10. package/packages/config-markdownlint/node_modules/ansi-regex/readme.md +66 -0
  11. package/packages/config-markdownlint/node_modules/markdownlint/CHANGELOG.md +529 -0
  12. package/packages/config-markdownlint/node_modules/markdownlint/CONTRIBUTING.md +92 -0
  13. package/packages/config-markdownlint/node_modules/markdownlint/LICENSE +21 -0
  14. package/packages/config-markdownlint/node_modules/markdownlint/README.md +1112 -0
  15. package/packages/config-markdownlint/node_modules/markdownlint/doc/CustomRules.md +194 -0
  16. package/packages/config-markdownlint/node_modules/markdownlint/doc/Prettier.md +27 -0
  17. package/packages/config-markdownlint/node_modules/markdownlint/doc/ReleaseProcess.md +20 -0
  18. package/packages/config-markdownlint/node_modules/markdownlint/doc/Rules.md +2858 -0
  19. package/packages/config-markdownlint/node_modules/markdownlint/doc/md001.md +51 -0
  20. package/packages/config-markdownlint/node_modules/markdownlint/doc/md003.md +59 -0
  21. package/packages/config-markdownlint/node_modules/markdownlint/doc/md004.md +50 -0
  22. package/packages/config-markdownlint/node_modules/markdownlint/doc/md005.md +53 -0
  23. package/packages/config-markdownlint/node_modules/markdownlint/doc/md007.md +52 -0
  24. package/packages/config-markdownlint/node_modules/markdownlint/doc/md009.md +50 -0
  25. package/packages/config-markdownlint/node_modules/markdownlint/doc/md010.md +62 -0
  26. package/packages/config-markdownlint/node_modules/markdownlint/doc/md011.md +30 -0
  27. package/packages/config-markdownlint/node_modules/markdownlint/doc/md012.md +38 -0
  28. package/packages/config-markdownlint/node_modules/markdownlint/doc/md013.md +58 -0
  29. package/packages/config-markdownlint/node_modules/markdownlint/doc/md014.md +54 -0
  30. package/packages/config-markdownlint/node_modules/markdownlint/doc/md018.md +27 -0
  31. package/packages/config-markdownlint/node_modules/markdownlint/doc/md019.md +28 -0
  32. package/packages/config-markdownlint/node_modules/markdownlint/doc/md020.md +29 -0
  33. package/packages/config-markdownlint/node_modules/markdownlint/doc/md021.md +31 -0
  34. package/packages/config-markdownlint/node_modules/markdownlint/doc/md022.md +67 -0
  35. package/packages/config-markdownlint/node_modules/markdownlint/doc/md023.md +33 -0
  36. package/packages/config-markdownlint/node_modules/markdownlint/doc/md024.md +44 -0
  37. package/packages/config-markdownlint/node_modules/markdownlint/doc/md025.md +49 -0
  38. package/packages/config-markdownlint/node_modules/markdownlint/doc/md026.md +40 -0
  39. package/packages/config-markdownlint/node_modules/markdownlint/doc/md027.md +32 -0
  40. package/packages/config-markdownlint/node_modules/markdownlint/doc/md028.md +44 -0
  41. package/packages/config-markdownlint/node_modules/markdownlint/doc/md029.md +100 -0
  42. package/packages/config-markdownlint/node_modules/markdownlint/doc/md030.md +82 -0
  43. package/packages/config-markdownlint/node_modules/markdownlint/doc/md031.md +50 -0
  44. package/packages/config-markdownlint/node_modules/markdownlint/doc/md032.md +55 -0
  45. package/packages/config-markdownlint/node_modules/markdownlint/doc/md033.md +33 -0
  46. package/packages/config-markdownlint/node_modules/markdownlint/doc/md034.md +55 -0
  47. package/packages/config-markdownlint/node_modules/markdownlint/doc/md035.md +44 -0
  48. package/packages/config-markdownlint/node_modules/markdownlint/doc/md036.md +45 -0
  49. package/packages/config-markdownlint/node_modules/markdownlint/doc/md037.md +37 -0
  50. package/packages/config-markdownlint/node_modules/markdownlint/doc/md038.md +52 -0
  51. package/packages/config-markdownlint/node_modules/markdownlint/doc/md039.md +21 -0
  52. package/packages/config-markdownlint/node_modules/markdownlint/doc/md040.md +52 -0
  53. package/packages/config-markdownlint/node_modules/markdownlint/doc/md041.md +64 -0
  54. package/packages/config-markdownlint/node_modules/markdownlint/doc/md042.md +38 -0
  55. package/packages/config-markdownlint/node_modules/markdownlint/doc/md043.md +87 -0
  56. package/packages/config-markdownlint/node_modules/markdownlint/doc/md044.md +45 -0
  57. package/packages/config-markdownlint/node_modules/markdownlint/doc/md045.md +48 -0
  58. package/packages/config-markdownlint/node_modules/markdownlint/doc/md046.md +40 -0
  59. package/packages/config-markdownlint/node_modules/markdownlint/doc/md047.md +34 -0
  60. package/packages/config-markdownlint/node_modules/markdownlint/doc/md048.md +42 -0
  61. package/packages/config-markdownlint/node_modules/markdownlint/doc/md049.md +36 -0
  62. package/packages/config-markdownlint/node_modules/markdownlint/doc/md050.md +35 -0
  63. package/packages/config-markdownlint/node_modules/markdownlint/doc/md051.md +117 -0
  64. package/packages/config-markdownlint/node_modules/markdownlint/doc/md052.md +52 -0
  65. package/packages/config-markdownlint/node_modules/markdownlint/doc/md053.md +38 -0
  66. package/packages/config-markdownlint/node_modules/markdownlint/doc/md054.md +100 -0
  67. package/packages/config-markdownlint/node_modules/markdownlint/doc/md055.md +55 -0
  68. package/packages/config-markdownlint/node_modules/markdownlint/doc/md056.md +37 -0
  69. package/packages/config-markdownlint/node_modules/markdownlint/doc/md058.md +48 -0
  70. package/packages/config-markdownlint/node_modules/markdownlint/doc/md059.md +33 -0
  71. package/packages/config-markdownlint/node_modules/markdownlint/doc/md060.md +130 -0
  72. package/packages/config-markdownlint/node_modules/markdownlint/helpers/LICENSE +21 -0
  73. package/packages/config-markdownlint/node_modules/markdownlint/helpers/README.md +29 -0
  74. package/packages/config-markdownlint/node_modules/markdownlint/helpers/helpers.cjs +695 -0
  75. package/packages/config-markdownlint/node_modules/markdownlint/helpers/micromark-helpers.cjs +332 -0
  76. package/packages/config-markdownlint/node_modules/markdownlint/helpers/package.json +26 -0
  77. package/packages/config-markdownlint/node_modules/markdownlint/helpers/shared.cjs +16 -0
  78. package/packages/config-markdownlint/node_modules/markdownlint/lib/cache.mjs +80 -0
  79. package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration-strict.d.ts +2417 -0
  80. package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration.d.ts +8 -0
  81. package/packages/config-markdownlint/node_modules/markdownlint/lib/constants.mjs +14 -0
  82. package/packages/config-markdownlint/node_modules/markdownlint/lib/defer-require.cjs +18 -0
  83. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-async.d.mts +1 -0
  84. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-async.mjs +3 -0
  85. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-promise.d.mts +1 -0
  86. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-promise.mjs +3 -0
  87. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-sync.d.mts +1 -0
  88. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-sync.mjs +3 -0
  89. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports.d.mts +30 -0
  90. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports.mjs +33 -0
  91. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownit.cjs +171 -0
  92. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.d.mts +615 -0
  93. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.mjs +1592 -0
  94. package/packages/config-markdownlint/node_modules/markdownlint/lib/md001.mjs +32 -0
  95. package/packages/config-markdownlint/node_modules/markdownlint/lib/md003.mjs +47 -0
  96. package/packages/config-markdownlint/node_modules/markdownlint/lib/md004.mjs +72 -0
  97. package/packages/config-markdownlint/node_modules/markdownlint/lib/md005.mjs +69 -0
  98. package/packages/config-markdownlint/node_modules/markdownlint/lib/md007.mjs +84 -0
  99. package/packages/config-markdownlint/node_modules/markdownlint/lib/md009.mjs +96 -0
  100. package/packages/config-markdownlint/node_modules/markdownlint/lib/md010.mjs +78 -0
  101. package/packages/config-markdownlint/node_modules/markdownlint/lib/md011.mjs +56 -0
  102. package/packages/config-markdownlint/node_modules/markdownlint/lib/md012.mjs +40 -0
  103. package/packages/config-markdownlint/node_modules/markdownlint/lib/md013.mjs +91 -0
  104. package/packages/config-markdownlint/node_modules/markdownlint/lib/md014.mjs +47 -0
  105. package/packages/config-markdownlint/node_modules/markdownlint/lib/md018.mjs +43 -0
  106. package/packages/config-markdownlint/node_modules/markdownlint/lib/md019-md021.mjs +77 -0
  107. package/packages/config-markdownlint/node_modules/markdownlint/lib/md020.mjs +68 -0
  108. package/packages/config-markdownlint/node_modules/markdownlint/lib/md022.mjs +103 -0
  109. package/packages/config-markdownlint/node_modules/markdownlint/lib/md023.mjs +37 -0
  110. package/packages/config-markdownlint/node_modules/markdownlint/lib/md024.mjs +45 -0
  111. package/packages/config-markdownlint/node_modules/markdownlint/lib/md025.mjs +45 -0
  112. package/packages/config-markdownlint/node_modules/markdownlint/lib/md026.mjs +46 -0
  113. package/packages/config-markdownlint/node_modules/markdownlint/lib/md027.mjs +50 -0
  114. package/packages/config-markdownlint/node_modules/markdownlint/lib/md028.mjs +39 -0
  115. package/packages/config-markdownlint/node_modules/markdownlint/lib/md029.mjs +84 -0
  116. package/packages/config-markdownlint/node_modules/markdownlint/lib/md030.mjs +57 -0
  117. package/packages/config-markdownlint/node_modules/markdownlint/lib/md031.mjs +61 -0
  118. package/packages/config-markdownlint/node_modules/markdownlint/lib/md032.mjs +78 -0
  119. package/packages/config-markdownlint/node_modules/markdownlint/lib/md033.mjs +46 -0
  120. package/packages/config-markdownlint/node_modules/markdownlint/lib/md034.mjs +92 -0
  121. package/packages/config-markdownlint/node_modules/markdownlint/lib/md035.mjs +23 -0
  122. package/packages/config-markdownlint/node_modules/markdownlint/lib/md036.mjs +55 -0
  123. package/packages/config-markdownlint/node_modules/markdownlint/lib/md037.mjs +94 -0
  124. package/packages/config-markdownlint/node_modules/markdownlint/lib/md038.mjs +73 -0
  125. package/packages/config-markdownlint/node_modules/markdownlint/lib/md039.mjs +59 -0
  126. package/packages/config-markdownlint/node_modules/markdownlint/lib/md040.mjs +32 -0
  127. package/packages/config-markdownlint/node_modules/markdownlint/lib/md041.mjs +71 -0
  128. package/packages/config-markdownlint/node_modules/markdownlint/lib/md042.mjs +58 -0
  129. package/packages/config-markdownlint/node_modules/markdownlint/lib/md043.mjs +72 -0
  130. package/packages/config-markdownlint/node_modules/markdownlint/lib/md044.mjs +110 -0
  131. package/packages/config-markdownlint/node_modules/markdownlint/lib/md045.mjs +61 -0
  132. package/packages/config-markdownlint/node_modules/markdownlint/lib/md046.mjs +31 -0
  133. package/packages/config-markdownlint/node_modules/markdownlint/lib/md047.mjs +28 -0
  134. package/packages/config-markdownlint/node_modules/markdownlint/lib/md048.mjs +47 -0
  135. package/packages/config-markdownlint/node_modules/markdownlint/lib/md049-md050.mjs +115 -0
  136. package/packages/config-markdownlint/node_modules/markdownlint/lib/md051.mjs +173 -0
  137. package/packages/config-markdownlint/node_modules/markdownlint/lib/md052.mjs +40 -0
  138. package/packages/config-markdownlint/node_modules/markdownlint/lib/md053.mjs +60 -0
  139. package/packages/config-markdownlint/node_modules/markdownlint/lib/md054.mjs +122 -0
  140. package/packages/config-markdownlint/node_modules/markdownlint/lib/md055.mjs +72 -0
  141. package/packages/config-markdownlint/node_modules/markdownlint/lib/md056.mjs +50 -0
  142. package/packages/config-markdownlint/node_modules/markdownlint/lib/md058.mjs +57 -0
  143. package/packages/config-markdownlint/node_modules/markdownlint/lib/md059.mjs +71 -0
  144. package/packages/config-markdownlint/node_modules/markdownlint/lib/md060.mjs +209 -0
  145. package/packages/config-markdownlint/node_modules/markdownlint/lib/micromark-parse.mjs +337 -0
  146. package/packages/config-markdownlint/node_modules/markdownlint/lib/micromark-types.d.mts +11 -0
  147. package/packages/config-markdownlint/node_modules/markdownlint/lib/node-imports-browser.mjs +22 -0
  148. package/packages/config-markdownlint/node_modules/markdownlint/lib/node-imports-node.mjs +11 -0
  149. package/packages/config-markdownlint/node_modules/markdownlint/lib/parse-configuration.mjs +47 -0
  150. package/packages/config-markdownlint/node_modules/markdownlint/lib/resolve-module.cjs +52 -0
  151. package/packages/config-markdownlint/node_modules/markdownlint/lib/resolve-module.d.cts +34 -0
  152. package/packages/config-markdownlint/node_modules/markdownlint/lib/rules.mjs +122 -0
  153. package/packages/config-markdownlint/node_modules/markdownlint/lib/types.d.mts +13 -0
  154. package/packages/config-markdownlint/node_modules/markdownlint/package.json +120 -0
  155. package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.jsonc +349 -0
  156. package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.yaml +310 -0
  157. package/packages/config-markdownlint/node_modules/markdownlint/schema/ValidatingConfiguration.md +26 -0
  158. package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema-strict.json +5138 -0
  159. package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema.json +5143 -0
  160. package/packages/config-markdownlint/node_modules/markdownlint/style/all.json +5 -0
  161. package/packages/config-markdownlint/node_modules/markdownlint/style/cirosantilli.json +22 -0
  162. package/packages/config-markdownlint/node_modules/markdownlint/style/prettier.json +27 -0
  163. package/packages/config-markdownlint/node_modules/markdownlint/style/relaxed.json +12 -0
  164. package/packages/config-markdownlint/node_modules/string-width/index.d.ts +39 -0
  165. package/packages/config-markdownlint/node_modules/string-width/index.js +203 -0
  166. package/packages/config-markdownlint/node_modules/string-width/license +9 -0
  167. package/packages/config-markdownlint/node_modules/string-width/package.json +65 -0
  168. package/packages/config-markdownlint/node_modules/string-width/readme.md +66 -0
  169. package/packages/config-markdownlint/node_modules/strip-ansi/index.d.ts +15 -0
  170. package/packages/config-markdownlint/node_modules/strip-ansi/index.js +19 -0
  171. package/packages/config-markdownlint/node_modules/strip-ansi/license +9 -0
  172. package/packages/config-markdownlint/node_modules/strip-ansi/package.json +59 -0
  173. package/packages/config-markdownlint/node_modules/strip-ansi/readme.md +37 -0
  174. package/packages/config-markdownlint/package.json +2 -2
  175. package/packages/config-stylelint/package.json +2 -2
  176. package/packages/config-stylelint/plugins/scss.js +1 -1
  177. package/packages/config-stylelint/plugins/selector-no-empty.js +1 -1
@@ -0,0 +1,44 @@
1
+ # `MD035` - Horizontal rule style
2
+
3
+ Tags: `hr`
4
+
5
+ Aliases: `hr-style`
6
+
7
+ Parameters:
8
+
9
+ - `style`: Horizontal rule style (`string`, default `consistent`)
10
+
11
+ This rule is triggered when inconsistent styles of horizontal rules (also known
12
+ as "thematic breaks") are used in a document:
13
+
14
+ ```markdown
15
+ ---
16
+
17
+ - - -
18
+
19
+ ***
20
+
21
+ * * *
22
+
23
+ ****
24
+ ```
25
+
26
+ To fix this, use the same horizontal rule syntax everywhere:
27
+
28
+ ```markdown
29
+ ---
30
+
31
+ ---
32
+
33
+ ---
34
+ ```
35
+
36
+ The `style` parameter's default value `consistent` ensures all horizontal rules
37
+ in a document match the first horizontal rule in that document. To enforce a
38
+ specific pattern of characters, set the `style` parameter to that string (e.g.,
39
+ `"* * *"`).
40
+
41
+ Note: In order to be recognized as a horizontal rule, a line must contain three
42
+ or more matching `-`, `_`, or `*` characters with optional space between.
43
+
44
+ Rationale: Consistent formatting makes it easier to understand a document.
@@ -0,0 +1,45 @@
1
+ # `MD036` - Emphasis used instead of a heading
2
+
3
+ Tags: `emphasis`, `headings`
4
+
5
+ Aliases: `no-emphasis-as-heading`
6
+
7
+ Parameters:
8
+
9
+ - `punctuation`: Punctuation characters (`string`, default `.,;:!?。,;:!?`)
10
+
11
+ This check looks for instances where emphasized (i.e. bold or italic) text is
12
+ used to separate sections, where a heading should be used instead:
13
+
14
+ ```markdown
15
+ **My document**
16
+
17
+ Lorem ipsum dolor sit amet...
18
+
19
+ _Another section_
20
+
21
+ Consectetur adipiscing elit, sed do eiusmod.
22
+ ```
23
+
24
+ To fix this, use Markdown headings instead of emphasized text to denote
25
+ sections:
26
+
27
+ ```markdown
28
+ # My document
29
+
30
+ Lorem ipsum dolor sit amet...
31
+
32
+ ## Another section
33
+
34
+ Consectetur adipiscing elit, sed do eiusmod.
35
+ ```
36
+
37
+ Note: This rule looks for single-line paragraphs that consist entirely
38
+ of emphasized text. It won't fire on emphasis used within regular text,
39
+ multi-line emphasized paragraphs, or paragraphs ending in punctuation
40
+ (normal or full-width). Similarly to rule MD026, you can configure what
41
+ characters are recognized as punctuation.
42
+
43
+ Rationale: Using emphasis instead of a heading prevents tools from inferring
44
+ the structure of a document. More information:
45
+ <https://cirosantilli.com/markdown-style-guide#emphasis-vs-headers>.
@@ -0,0 +1,37 @@
1
+ # `MD037` - Spaces inside emphasis markers
2
+
3
+ Tags: `emphasis`, `whitespace`
4
+
5
+ Aliases: `no-space-in-emphasis`
6
+
7
+ Fixable: Some violations can be fixed by tooling
8
+
9
+ This rule is triggered when emphasis markers (bold, italic) are used, but they
10
+ have spaces between the markers and the text:
11
+
12
+ ```markdown
13
+ Here is some ** bold ** text.
14
+
15
+ Here is some * italic * text.
16
+
17
+ Here is some more __ bold __ text.
18
+
19
+ Here is some more _ italic _ text.
20
+ ```
21
+
22
+ To fix this, remove the spaces around the emphasis markers:
23
+
24
+ ```markdown
25
+ Here is some **bold** text.
26
+
27
+ Here is some *italic* text.
28
+
29
+ Here is some more __bold__ text.
30
+
31
+ Here is some more _italic_ text.
32
+ ```
33
+
34
+ Rationale: Emphasis is only parsed as such when the asterisks/underscores
35
+ aren't surrounded by spaces. This rule attempts to detect where
36
+ they were surrounded by spaces, but it appears that emphasized text was
37
+ intended by the author.
@@ -0,0 +1,52 @@
1
+ # `MD038` - Spaces inside code span elements
2
+
3
+ Tags: `code`, `whitespace`
4
+
5
+ Aliases: `no-space-in-code`
6
+
7
+ Fixable: Some violations can be fixed by tooling
8
+
9
+ This rule is triggered for code spans containing content with unnecessary space
10
+ next to the beginning or ending backticks:
11
+
12
+ ```markdown
13
+ `some text `
14
+
15
+ ` some text`
16
+
17
+ ` some text `
18
+ ```
19
+
20
+ To fix this, remove the extra space characters from the beginning and ending:
21
+
22
+ ```markdown
23
+ `some text`
24
+ ```
25
+
26
+ Note: A single leading *and* trailing space is allowed by the specification and
27
+ trimmed by the parser to support code spans that begin or end with a backtick:
28
+
29
+ ```markdown
30
+ `` `backticks` ``
31
+
32
+ `` backtick` ``
33
+ ```
34
+
35
+ Note: When single-space padding is present in the input, it will be preserved
36
+ (even if unnecessary):
37
+
38
+ ```markdown
39
+ ` code `
40
+ ```
41
+
42
+ Note: Code spans containing only spaces are allowed by the specification and are
43
+ also preserved:
44
+
45
+ ```markdown
46
+ ` `
47
+
48
+ ` `
49
+ ```
50
+
51
+ Rationale: Violations of this rule are usually unintentional and can lead to
52
+ improperly-rendered content.
@@ -0,0 +1,21 @@
1
+ # `MD039` - Spaces inside link text
2
+
3
+ Tags: `links`, `whitespace`
4
+
5
+ Aliases: `no-space-in-links`
6
+
7
+ Fixable: Some violations can be fixed by tooling
8
+
9
+ This rule is triggered on links that have spaces surrounding the link text:
10
+
11
+ ```markdown
12
+ [ a link ](https://www.example.com/)
13
+ ```
14
+
15
+ To fix this, remove the spaces surrounding the link text:
16
+
17
+ ```markdown
18
+ [a link](https://www.example.com/)
19
+ ```
20
+
21
+ Rationale: Consistent formatting makes it easier to understand a document.
@@ -0,0 +1,52 @@
1
+ # `MD040` - Fenced code blocks should have a language specified
2
+
3
+ Tags: `code`, `language`
4
+
5
+ Aliases: `fenced-code-language`
6
+
7
+ Parameters:
8
+
9
+ - `allowed_languages`: List of languages (`string[]`, default `[]`)
10
+ - `language_only`: Require language only (`boolean`, default `false`)
11
+
12
+ This rule is triggered when fenced code blocks are used, but a language isn't
13
+ specified:
14
+
15
+ ````markdown
16
+ ```
17
+ #!/bin/bash
18
+ echo Hello world
19
+ ```
20
+ ````
21
+
22
+ To fix this, add a language specifier to the code block:
23
+
24
+ ````markdown
25
+ ```bash
26
+ #!/bin/bash
27
+ echo Hello world
28
+ ```
29
+ ````
30
+
31
+ To display a code block without syntax highlighting, use:
32
+
33
+ ````markdown
34
+ ```text
35
+ Plain text in a code block
36
+ ```
37
+ ````
38
+
39
+ You can configure the `allowed_languages` parameter to specify a list of
40
+ languages code blocks could use. Languages are case sensitive. The default value
41
+ is `[]` which means any language specifier is valid.
42
+
43
+ You can prevent extra data from being present in the info string of fenced code
44
+ blocks. To do so, set the `language_only` parameter to `true`.
45
+
46
+ <!-- markdownlint-disable-next-line no-space-in-code -->
47
+ Info strings with leading/trailing whitespace (ex: `js `) or other content (ex:
48
+ `ruby startline=3`) will trigger this rule.
49
+
50
+ Rationale: Specifying a language improves content rendering by using the
51
+ correct syntax highlighting for code. More information:
52
+ <https://cirosantilli.com/markdown-style-guide#option-code-fenced>.
@@ -0,0 +1,64 @@
1
+ # `MD041` - First line in a file should be a top-level heading
2
+
3
+ Tags: `headings`
4
+
5
+ Aliases: `first-line-h1`, `first-line-heading`
6
+
7
+ Parameters:
8
+
9
+ - `allow_preamble`: Allow content before first heading (`boolean`, default
10
+ `false`)
11
+ - `front_matter_title`: RegExp for matching title in front matter (`string`,
12
+ default `^\s*title\s*[:=]`)
13
+ - `level`: Heading level (`integer`, default `1`)
14
+
15
+ This rule is intended to ensure documents have a title and is triggered when
16
+ the first line in a document is not a top-level ([HTML][HTML] `h1`) heading:
17
+
18
+ ```markdown
19
+ This is a document without a heading
20
+ ```
21
+
22
+ To fix this, add a top-level heading to the beginning of the document:
23
+
24
+ ```markdown
25
+ # Document Heading
26
+
27
+ This is a document with a top-level heading
28
+ ```
29
+
30
+ Because it is common for projects on GitHub to use an image for the heading of
31
+ `README.md` and that pattern is not well-supported by Markdown, HTML headings
32
+ are also permitted by this rule. For example:
33
+
34
+ ```markdown
35
+ <h1 align="center"><img src="https://placekitten.com/300/150"/></h1>
36
+
37
+ This is a document with a top-level HTML heading
38
+ ```
39
+
40
+ In some cases, a document's title heading may be preceded by text like a table
41
+ of contents. This is not ideal for accessibility, but can be allowed by setting
42
+ the `allow_preamble` parameter to `true`.
43
+
44
+ ```markdown
45
+ This is a document with preamble text
46
+
47
+ # Document Heading
48
+ ```
49
+
50
+ If [YAML][YAML] front matter is present and contains a `title` property
51
+ (commonly used with blog posts), this rule will not report a violation. To use a
52
+ different property name in the front matter, specify the text of a [regular
53
+ expression][RegExp] via the `front_matter_title` parameter. To disable the use
54
+ of front matter by this rule, specify `""` for `front_matter_title`.
55
+
56
+ The `level` parameter can be used to change the top-level heading (ex: to `h2`)
57
+ in cases where an `h1` is added externally.
58
+
59
+ Rationale: The top-level heading often acts as the title of a document. More
60
+ information: <https://cirosantilli.com/markdown-style-guide#top-level-header>.
61
+
62
+ [HTML]: https://wikipedia.org/wiki/HTML
63
+ [RegExp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
64
+ [YAML]: https://wikipedia.org/wiki/YAML
@@ -0,0 +1,38 @@
1
+ # `MD042` - No empty links
2
+
3
+ Tags: `links`
4
+
5
+ Aliases: `no-empty-links`
6
+
7
+ This rule is triggered when an empty link is encountered:
8
+
9
+ ```markdown
10
+ [an empty link]()
11
+ ```
12
+
13
+ To fix the violation, provide a destination for the link:
14
+
15
+ ```markdown
16
+ [a valid link](https://example.com/)
17
+ ```
18
+
19
+ Empty fragments will trigger this rule:
20
+
21
+ ```markdown
22
+ [an empty fragment](#)
23
+
24
+ [an empty link definition][empty]
25
+
26
+ [empty]: #
27
+ ```
28
+
29
+ But non-empty fragments will not:
30
+
31
+ ```markdown
32
+ [a valid fragment](#fragment)
33
+ ```
34
+
35
+ Empty link definitions
36
+
37
+ Rationale: Empty links do not lead anywhere and therefore don't function as
38
+ links.
@@ -0,0 +1,87 @@
1
+ # `MD043` - Required heading structure
2
+
3
+ Tags: `headings`
4
+
5
+ Aliases: `required-headings`
6
+
7
+ Parameters:
8
+
9
+ - `headings`: List of headings (`string[]`, default `[]`)
10
+ - `match_case`: Match case of headings (`boolean`, default `false`)
11
+
12
+ This rule is triggered when the headings in a file do not match the array of
13
+ headings passed to the rule. It can be used to enforce a standard heading
14
+ structure for a set of files.
15
+
16
+ To require exactly the following structure:
17
+
18
+ ```markdown
19
+ # Heading
20
+ ## Item
21
+ ### Detail
22
+ ```
23
+
24
+ Set the `headings` parameter to:
25
+
26
+ ```json
27
+ [
28
+ "# Heading",
29
+ "## Item",
30
+ "### Detail"
31
+ ]
32
+ ```
33
+
34
+ To allow optional headings as with the following structure:
35
+
36
+ ```markdown
37
+ # Heading
38
+ ## Item
39
+ ### Detail (optional)
40
+ ## Foot
41
+ ### Notes (optional)
42
+ ```
43
+
44
+ Use the special value `"*"` meaning "zero or more unspecified headings" or the
45
+ special value `"+"` meaning "one or more unspecified headings" and set the
46
+ `headings` parameter to:
47
+
48
+ ```json
49
+ [
50
+ "# Heading",
51
+ "## Item",
52
+ "*",
53
+ "## Foot",
54
+ "*"
55
+ ]
56
+ ```
57
+
58
+ To allow a single required heading to vary as with a project name:
59
+
60
+ ```markdown
61
+ # Project Name
62
+ ## Description
63
+ ## Examples
64
+ ```
65
+
66
+ Use the special value `"?"` meaning "exactly one unspecified heading":
67
+
68
+ ```json
69
+ [
70
+ "?",
71
+ "## Description",
72
+ "## Examples"
73
+ ]
74
+ ```
75
+
76
+ When an error is detected, this rule outputs the line number of the first
77
+ problematic heading (otherwise, it outputs the last line number of the file).
78
+
79
+ Note that while the `headings` parameter uses the "## Text" ATX heading style
80
+ for simplicity, a file may use any supported heading style.
81
+
82
+ By default, the case of headings in the document is not required to match that
83
+ of `headings`. To require that case match exactly, set the `match_case`
84
+ parameter to `true`.
85
+
86
+ Rationale: Projects may wish to enforce a consistent document structure across
87
+ a set of similar content.
@@ -0,0 +1,45 @@
1
+ # `MD044` - Proper names should have the correct capitalization
2
+
3
+ Tags: `spelling`
4
+
5
+ Aliases: `proper-names`
6
+
7
+ Parameters:
8
+
9
+ - `code_blocks`: Include code blocks (`boolean`, default `true`)
10
+ - `html_elements`: Include HTML elements (`boolean`, default `true`)
11
+ - `names`: List of proper names (`string[]`, default `[]`)
12
+
13
+ Fixable: Some violations can be fixed by tooling
14
+
15
+ This rule is triggered when any of the strings in the `names` array do not have
16
+ the specified capitalization. It can be used to enforce a standard letter case
17
+ for the names of projects and products.
18
+
19
+ For example, the language "JavaScript" is usually written with both the 'J' and
20
+ 'S' capitalized - though sometimes the 's' or 'j' appear in lower-case. To
21
+ enforce the proper capitalization, specify the desired letter case in the
22
+ `names` array:
23
+
24
+ ```json
25
+ [
26
+ "JavaScript"
27
+ ]
28
+ ```
29
+
30
+ Sometimes a proper name is capitalized differently in certain contexts. In such
31
+ cases, add both forms to the `names` array:
32
+
33
+ ```json
34
+ [
35
+ "GitHub",
36
+ "github.com"
37
+ ]
38
+ ```
39
+
40
+ Set the `code_blocks` parameter to `false` to disable this rule for code blocks
41
+ and spans. Set the `html_elements` parameter to `false` to disable this rule
42
+ for HTML elements and attributes (such as when using a proper name as part of
43
+ a path for `a`/`href` or `img`/`src`).
44
+
45
+ Rationale: Incorrect capitalization of proper names is usually a mistake.
@@ -0,0 +1,48 @@
1
+ # `MD045` - Images should have alternate text (alt text)
2
+
3
+ Tags: `accessibility`, `images`
4
+
5
+ Aliases: `no-alt-text`
6
+
7
+ This rule reports a violation when an image is missing alternate text (alt text)
8
+ information.
9
+
10
+ Alternate text is commonly specified inline as:
11
+
12
+ ```markdown
13
+ ![Alternate text](image.jpg)
14
+ ```
15
+
16
+ Or with reference syntax as:
17
+
18
+ ```markdown
19
+ ![Alternate text][ref]
20
+
21
+ ...
22
+
23
+ [ref]: image.jpg "Optional title"
24
+ ```
25
+
26
+ Or with HTML as:
27
+
28
+ ```html
29
+ <img src="image.jpg" alt="Alternate text" />
30
+ ```
31
+
32
+ Note: If the [HTML `aria-hidden` attribute][aria-hidden] is used to hide the
33
+ image from assistive technology, this rule does not report a violation:
34
+
35
+ ```html
36
+ <img src="image.jpg" aria-hidden="true" />
37
+ ```
38
+
39
+ Guidance for writing alternate text is available from the [W3C][w3c],
40
+ [Wikipedia][wikipedia], and [other locations][phase2technology].
41
+
42
+ Rationale: Alternate text is important for accessibility and describes the
43
+ content of an image for people who may not be able to see it.
44
+
45
+ [aria-hidden]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden
46
+ [phase2technology]: https://www.phase2technology.com/blog/no-more-excuses
47
+ [w3c]: https://www.w3.org/WAI/alt/
48
+ [wikipedia]: https://wikipedia.org/wiki/Alt_attribute
@@ -0,0 +1,40 @@
1
+ # `MD046` - Code block style
2
+
3
+ Tags: `code`
4
+
5
+ Aliases: `code-block-style`
6
+
7
+ Parameters:
8
+
9
+ - `style`: Block style (`string`, default `consistent`, values `consistent` /
10
+ `fenced` / `indented`)
11
+
12
+ This rule is triggered when unwanted or different code block styles are used in
13
+ the same document.
14
+
15
+ In the default configuration this rule reports a violation for the following
16
+ document:
17
+
18
+ <!-- markdownlint-disable code-block-style -->
19
+
20
+ Some text.
21
+
22
+ # Indented code
23
+
24
+ More text.
25
+
26
+ ```ruby
27
+ # Fenced code
28
+ ```
29
+
30
+ More text.
31
+
32
+ <!-- markdownlint-restore -->
33
+
34
+ To fix violations of this rule, use a consistent style (either indenting or code
35
+ fences).
36
+
37
+ The configured code block style can be specific (`fenced`, `indented`) or can
38
+ require all code blocks match the first code block (`consistent`).
39
+
40
+ Rationale: Consistent formatting makes it easier to understand a document.
@@ -0,0 +1,34 @@
1
+ # `MD047` - Files should end with a single newline character
2
+
3
+ Tags: `blank_lines`
4
+
5
+ Aliases: `single-trailing-newline`
6
+
7
+ Fixable: Some violations can be fixed by tooling
8
+
9
+ This rule is triggered when there is not a single newline character at the end
10
+ of a file.
11
+
12
+ An example that triggers the rule:
13
+
14
+ ```markdown
15
+ # Heading
16
+
17
+ This file ends without a newline.[EOF]
18
+ ```
19
+
20
+ To fix the violation, add a newline character to the end of the file:
21
+
22
+ ```markdown
23
+ # Heading
24
+
25
+ This file ends with a newline.
26
+ [EOF]
27
+ ```
28
+
29
+ Rationale: Some programs have trouble with files that do not end with a newline.
30
+
31
+ More information: [What's the point in adding a new line to the end of a
32
+ file?][stack-exchange]
33
+
34
+ [stack-exchange]: https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file
@@ -0,0 +1,42 @@
1
+ # `MD048` - Code fence style
2
+
3
+ Tags: `code`
4
+
5
+ Aliases: `code-fence-style`
6
+
7
+ Parameters:
8
+
9
+ - `style`: Code fence style (`string`, default `consistent`, values `backtick`
10
+ / `consistent` / `tilde`)
11
+
12
+ This rule is triggered when the symbols used in the document for fenced code
13
+ blocks do not match the configured code fence style:
14
+
15
+ ````markdown
16
+ ```ruby
17
+ # Fenced code
18
+ ```
19
+
20
+ ~~~ruby
21
+ # Fenced code
22
+ ~~~
23
+ ````
24
+
25
+ To fix this issue, use the configured code fence style throughout the
26
+ document:
27
+
28
+ ````markdown
29
+ ```ruby
30
+ # Fenced code
31
+ ```
32
+
33
+ ```ruby
34
+ # Fenced code
35
+ ```
36
+ ````
37
+
38
+ The configured code fence style can be a specific symbol to use (`backtick`,
39
+ `tilde`) or it can require all code fences match the first code fence
40
+ (`consistent`).
41
+
42
+ Rationale: Consistent formatting makes it easier to understand a document.
@@ -0,0 +1,36 @@
1
+ # `MD049` - Emphasis style
2
+
3
+ Tags: `emphasis`
4
+
5
+ Aliases: `emphasis-style`
6
+
7
+ Parameters:
8
+
9
+ - `style`: Emphasis style (`string`, default `consistent`, values `asterisk` /
10
+ `consistent` / `underscore`)
11
+
12
+ Fixable: Some violations can be fixed by tooling
13
+
14
+ This rule is triggered when the symbols used in the document for emphasis do not
15
+ match the configured emphasis style:
16
+
17
+ ```markdown
18
+ *Text*
19
+ _Text_
20
+ ```
21
+
22
+ To fix this issue, use the configured emphasis style throughout the document:
23
+
24
+ ```markdown
25
+ *Text*
26
+ *Text*
27
+ ```
28
+
29
+ The configured emphasis style can be a specific symbol to use (`asterisk`,
30
+ `underscore`) or can require all emphasis matches the first emphasis
31
+ (`consistent`).
32
+
33
+ Note: Emphasis within a word is restricted to `asterisk` in order to avoid
34
+ unwanted emphasis for words containing internal underscores like_this_one.
35
+
36
+ Rationale: Consistent formatting makes it easier to understand a document.