@alexlit/lint-kit 127.5.3 → 127.6.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.
Files changed (304) hide show
  1. package/.npmpackagejsonlintrc.json +0 -0
  2. package/.npmrc +5 -0
  3. package/LICENSE +0 -0
  4. package/README.md +1 -1
  5. package/commitlint.config.js +0 -0
  6. package/lint-staged.config.js +0 -0
  7. package/package.json +11 -9
  8. package/packages/config-commitlint/LICENSE +0 -0
  9. package/packages/config-commitlint/index.js +0 -0
  10. package/packages/config-commitlint/node_modules/.bin/commitlint +17 -0
  11. package/packages/config-commitlint/node_modules/.bin/conventional-changelog +17 -0
  12. package/packages/config-commitlint/node_modules/.bin/conventional-commits-parser +17 -0
  13. package/packages/config-commitlint/node_modules/.bin/tsc +17 -0
  14. package/packages/config-commitlint/node_modules/.bin/tsserver +17 -0
  15. package/packages/config-commitlint/package.json +0 -0
  16. package/packages/config-eslint/LICENSE +0 -0
  17. package/packages/config-eslint/_legacy/LICENSE +0 -0
  18. package/packages/config-eslint/_legacy/dictionaries/index.js +0 -0
  19. package/packages/config-eslint/_legacy/dictionaries/programming/bash.js +0 -0
  20. package/packages/config-eslint/_legacy/dictionaries/programming/django.js +0 -0
  21. package/packages/config-eslint/_legacy/dictionaries/programming/elixir.js +0 -0
  22. package/packages/config-eslint/_legacy/dictionaries/programming/go.js +0 -0
  23. package/packages/config-eslint/_legacy/dictionaries/programming/java.js +0 -0
  24. package/packages/config-eslint/_legacy/dictionaries/programming/latex.js +0 -0
  25. package/packages/config-eslint/_legacy/dictionaries/programming/lua.js +0 -0
  26. package/packages/config-eslint/_legacy/dictionaries/programming/php.js +0 -0
  27. package/packages/config-eslint/_legacy/dictionaries/programming/python.js +0 -0
  28. package/packages/config-eslint/_legacy/dictionaries/programming/ruby.js +0 -0
  29. package/packages/config-eslint/_legacy/dictionaries/programming/rust.js +0 -0
  30. package/packages/config-eslint/_legacy/dictionaries/programming/scala.js +0 -0
  31. package/packages/config-eslint/_legacy/dictionaries/specialized/html-symbol-entities.js +0 -0
  32. package/packages/config-eslint/_legacy/dictionaries/specialized/lorem-ipsum.js +0 -0
  33. package/packages/config-eslint/_legacy/index.js +0 -0
  34. package/packages/config-eslint/_legacy/legacy.js +0 -0
  35. package/packages/config-eslint/_legacy/package.json +0 -0
  36. package/packages/config-eslint/_legacy/plugins/array-func.js +0 -0
  37. package/packages/config-eslint/_legacy/plugins/compat.js +0 -0
  38. package/packages/config-eslint/_legacy/plugins/decorator-position.js +0 -0
  39. package/packages/config-eslint/_legacy/plugins/eslint-comments.js +0 -0
  40. package/packages/config-eslint/_legacy/plugins/etc.js +0 -0
  41. package/packages/config-eslint/_legacy/plugins/ext.js +0 -0
  42. package/packages/config-eslint/_legacy/plugins/filenames.js +0 -0
  43. package/packages/config-eslint/_legacy/plugins/import.js +0 -0
  44. package/packages/config-eslint/_legacy/plugins/jsdoc.js +0 -0
  45. package/packages/config-eslint/_legacy/plugins/jsx-a11y.js +0 -0
  46. package/packages/config-eslint/_legacy/plugins/lit-a11y.js +0 -0
  47. package/packages/config-eslint/_legacy/plugins/lit.js +0 -0
  48. package/packages/config-eslint/_legacy/plugins/more.js +0 -0
  49. package/packages/config-eslint/_legacy/plugins/no-constructor-bind.js +0 -0
  50. package/packages/config-eslint/_legacy/plugins/no-explicit-type-exports.js +0 -0
  51. package/packages/config-eslint/_legacy/plugins/no-loops.js +0 -0
  52. package/packages/config-eslint/_legacy/plugins/no-secrets.js +0 -0
  53. package/packages/config-eslint/_legacy/plugins/no-use-extend-native.js +0 -0
  54. package/packages/config-eslint/_legacy/plugins/node.js +0 -0
  55. package/packages/config-eslint/_legacy/plugins/prettier.js +0 -0
  56. package/packages/config-eslint/_legacy/plugins/promise.js +0 -0
  57. package/packages/config-eslint/_legacy/plugins/regexp.js +0 -0
  58. package/packages/config-eslint/_legacy/plugins/security.js +0 -0
  59. package/packages/config-eslint/_legacy/plugins/simple-import-sort.js +0 -0
  60. package/packages/config-eslint/_legacy/plugins/sonar.js +0 -0
  61. package/packages/config-eslint/_legacy/plugins/sort-class-members.js +0 -0
  62. package/packages/config-eslint/_legacy/plugins/sort-destructure-keys.js +0 -0
  63. package/packages/config-eslint/_legacy/plugins/sort-keys-fix.js +0 -0
  64. package/packages/config-eslint/_legacy/plugins/spellcheck.js +0 -0
  65. package/packages/config-eslint/_legacy/plugins/sql.js +0 -0
  66. package/packages/config-eslint/_legacy/plugins/tanstack-query.js +0 -0
  67. package/packages/config-eslint/_legacy/plugins/testing-library.js +0 -0
  68. package/packages/config-eslint/_legacy/plugins/typescript-sort-keys.js +0 -0
  69. package/packages/config-eslint/_legacy/plugins/unicorn.js +0 -0
  70. package/packages/config-eslint/_legacy/plugins/unused-imports.js +0 -0
  71. package/packages/config-eslint/_legacy/plugins/vitest.js +0 -0
  72. package/packages/config-eslint/_legacy/plugins/vue-i18n.js +0 -0
  73. package/packages/config-eslint/_legacy/plugins/vue.js +0 -0
  74. package/packages/config-eslint/_legacy/plugins/vuejs-accessibility.js +0 -0
  75. package/packages/config-eslint/_legacy/plugins/wc.js +0 -0
  76. package/packages/config-eslint/_legacy/plugins/write-good-comments.js +0 -0
  77. package/packages/config-eslint/_legacy/utils/create-config.js +0 -0
  78. package/packages/config-eslint/index.js +0 -0
  79. package/packages/config-eslint/node_modules/.bin/acorn +17 -0
  80. package/packages/config-eslint/node_modules/.bin/browserslist +17 -0
  81. package/packages/config-eslint/node_modules/.bin/eslint +17 -0
  82. package/packages/config-eslint/node_modules/.bin/eslint-config-prettier +17 -0
  83. package/packages/config-eslint/node_modules/.bin/jiti +17 -0
  84. package/packages/config-eslint/node_modules/.bin/prettier +17 -0
  85. package/packages/config-eslint/node_modules/.bin/tsc +17 -0
  86. package/packages/config-eslint/node_modules/.bin/tsserver +17 -0
  87. package/packages/config-eslint/package.json +3 -3
  88. package/packages/config-eslint/plugins/sonar.js +4 -0
  89. package/packages/config-hooks/LICENSE +0 -0
  90. package/packages/config-hooks/lint-staged.js +0 -0
  91. package/packages/config-hooks/node_modules/.bin/husky +17 -0
  92. package/packages/config-hooks/node_modules/.bin/lint-staged +17 -0
  93. package/packages/config-hooks/package.json +0 -0
  94. package/packages/config-htmllint/LICENSE +0 -0
  95. package/packages/config-htmllint/index.js +0 -0
  96. package/packages/config-htmllint/node_modules/.bin/linthtml +17 -0
  97. package/packages/config-htmllint/node_modules/.bin/tsc +17 -0
  98. package/packages/config-htmllint/node_modules/.bin/tsserver +17 -0
  99. package/packages/config-htmllint/package.json +0 -0
  100. package/packages/config-markdownlint/LICENSE +0 -0
  101. package/packages/config-markdownlint/index.json +0 -0
  102. package/packages/config-markdownlint/node_modules/.bin/markdownlint +17 -0
  103. package/packages/config-markdownlint/package.json +0 -0
  104. package/packages/config-npmlint/LICENSE +0 -0
  105. package/packages/config-npmlint/index.json +0 -0
  106. package/packages/config-npmlint/node_modules/.bin/lockfile-lint +17 -0
  107. package/packages/config-npmlint/node_modules/.bin/npmPkgJsonLint +17 -0
  108. package/packages/config-npmlint/node_modules/.bin/tsc +17 -0
  109. package/packages/config-npmlint/node_modules/.bin/tsserver +17 -0
  110. package/packages/config-npmlint/package.json +0 -0
  111. package/packages/config-prettier/LICENSE +0 -0
  112. package/packages/config-prettier/index.js +0 -0
  113. package/packages/config-prettier/node_modules/.bin/prettier +17 -0
  114. package/packages/config-prettier/package.json +0 -0
  115. package/packages/config-prettier/plugins/jsdoc.js +0 -0
  116. package/packages/config-prettier/plugins/packagejson.js +0 -0
  117. package/packages/config-prettier/plugins/php.js +0 -0
  118. package/packages/config-prettier/plugins/pug.js +0 -0
  119. package/packages/config-prettier/plugins/ruby.js +0 -0
  120. package/packages/config-prettier/plugins/sh.js +0 -0
  121. package/packages/config-prettier/plugins/solidity.js +0 -0
  122. package/packages/config-prettier/plugins/sort-json.js +0 -0
  123. package/packages/config-prettier/plugins/sql.js +0 -0
  124. package/packages/config-prettier/plugins/svelte.js +0 -0
  125. package/packages/config-prettier/plugins/tailwindcss.js +0 -0
  126. package/packages/config-prettier/plugins/xml.js +0 -0
  127. package/packages/config-stylelint/LICENSE +0 -0
  128. package/packages/config-stylelint/index.js +2 -1
  129. package/packages/config-stylelint/node_modules/.bin/browserslist +17 -0
  130. package/packages/config-stylelint/node_modules/.bin/prettier +17 -0
  131. package/packages/config-stylelint/node_modules/.bin/stylelint +17 -0
  132. package/packages/config-stylelint/node_modules/.bin/tsc +17 -0
  133. package/packages/config-stylelint/node_modules/.bin/tsserver +17 -0
  134. package/packages/config-stylelint/package.json +0 -0
  135. package/packages/config-stylelint/plugins/a11y.js +0 -0
  136. package/packages/config-stylelint/plugins/at-rule-no-children.js +0 -0
  137. package/packages/config-stylelint/plugins/color-format.js +0 -0
  138. package/packages/config-stylelint/plugins/declaration-block-no-ignored-properties.js +0 -0
  139. package/packages/config-stylelint/plugins/gamut.js +0 -0
  140. package/packages/config-stylelint/plugins/high-performance-animation.js +0 -0
  141. package/packages/config-stylelint/plugins/logical-css.js +0 -0
  142. package/packages/config-stylelint/plugins/no-indistinguishable-colors.js +0 -0
  143. package/packages/config-stylelint/plugins/no-nested-media.js +0 -0
  144. package/packages/config-stylelint/plugins/no-unresolved-module.js +0 -0
  145. package/packages/config-stylelint/plugins/no-unsupported-browser-features.js +0 -0
  146. package/packages/config-stylelint/plugins/order.js +0 -0
  147. package/packages/config-stylelint/plugins/prettier.js +0 -0
  148. package/packages/config-stylelint/plugins/scss.js +0 -0
  149. package/packages/config-stylelint/plugins/selector-no-empty.js +0 -0
  150. package/packages/config-stylelint/plugins/use-nesting.js +0 -0
  151. package/prettier.config.js +0 -0
  152. package/scripts/check.editorconfig.sh +0 -0
  153. package/scripts/i.sh +1 -1
  154. package/scripts/lint.eslint.sh +0 -0
  155. package/scripts/lint.htmllint.sh +0 -0
  156. package/scripts/lint.markdownlint.sh +0 -0
  157. package/scripts/lint.npmlint.sh +1 -1
  158. package/scripts/lint.sh +5 -5
  159. package/scripts/lint.stylelint.sh +0 -0
  160. package/scripts/ou.sh +8 -0
  161. package/scripts/preinstall.sh +1 -0
  162. package/scripts/release.sh +3 -3
  163. package/scripts/semver.sh +0 -0
  164. package/scripts/up.sh +12 -27
  165. package/stylelint.config.js +0 -0
  166. package/packages/config-markdownlint/node_modules/markdownlint/CHANGELOG.md +0 -457
  167. package/packages/config-markdownlint/node_modules/markdownlint/CONTRIBUTING.md +0 -93
  168. package/packages/config-markdownlint/node_modules/markdownlint/LICENSE +0 -21
  169. package/packages/config-markdownlint/node_modules/markdownlint/README.md +0 -1047
  170. package/packages/config-markdownlint/node_modules/markdownlint/demo/markdownlint-browser.js +0 -7094
  171. package/packages/config-markdownlint/node_modules/markdownlint/doc/CustomRules.md +0 -388
  172. package/packages/config-markdownlint/node_modules/markdownlint/doc/Prettier.md +0 -27
  173. package/packages/config-markdownlint/node_modules/markdownlint/doc/ReleaseProcess.md +0 -20
  174. package/packages/config-markdownlint/node_modules/markdownlint/doc/Rules.md +0 -2528
  175. package/packages/config-markdownlint/node_modules/markdownlint/doc/md001.md +0 -37
  176. package/packages/config-markdownlint/node_modules/markdownlint/doc/md003.md +0 -59
  177. package/packages/config-markdownlint/node_modules/markdownlint/doc/md004.md +0 -49
  178. package/packages/config-markdownlint/node_modules/markdownlint/doc/md005.md +0 -53
  179. package/packages/config-markdownlint/node_modules/markdownlint/doc/md007.md +0 -52
  180. package/packages/config-markdownlint/node_modules/markdownlint/doc/md009.md +0 -51
  181. package/packages/config-markdownlint/node_modules/markdownlint/doc/md010.md +0 -56
  182. package/packages/config-markdownlint/node_modules/markdownlint/doc/md011.md +0 -30
  183. package/packages/config-markdownlint/node_modules/markdownlint/doc/md012.md +0 -38
  184. package/packages/config-markdownlint/node_modules/markdownlint/doc/md013.md +0 -58
  185. package/packages/config-markdownlint/node_modules/markdownlint/doc/md014.md +0 -54
  186. package/packages/config-markdownlint/node_modules/markdownlint/doc/md018.md +0 -27
  187. package/packages/config-markdownlint/node_modules/markdownlint/doc/md019.md +0 -28
  188. package/packages/config-markdownlint/node_modules/markdownlint/doc/md020.md +0 -29
  189. package/packages/config-markdownlint/node_modules/markdownlint/doc/md021.md +0 -31
  190. package/packages/config-markdownlint/node_modules/markdownlint/doc/md022.md +0 -52
  191. package/packages/config-markdownlint/node_modules/markdownlint/doc/md023.md +0 -33
  192. package/packages/config-markdownlint/node_modules/markdownlint/doc/md024.md +0 -44
  193. package/packages/config-markdownlint/node_modules/markdownlint/doc/md025.md +0 -49
  194. package/packages/config-markdownlint/node_modules/markdownlint/doc/md026.md +0 -40
  195. package/packages/config-markdownlint/node_modules/markdownlint/doc/md027.md +0 -24
  196. package/packages/config-markdownlint/node_modules/markdownlint/doc/md028.md +0 -40
  197. package/packages/config-markdownlint/node_modules/markdownlint/doc/md029.md +0 -98
  198. package/packages/config-markdownlint/node_modules/markdownlint/doc/md030.md +0 -82
  199. package/packages/config-markdownlint/node_modules/markdownlint/doc/md031.md +0 -50
  200. package/packages/config-markdownlint/node_modules/markdownlint/doc/md032.md +0 -55
  201. package/packages/config-markdownlint/node_modules/markdownlint/doc/md033.md +0 -27
  202. package/packages/config-markdownlint/node_modules/markdownlint/doc/md034.md +0 -55
  203. package/packages/config-markdownlint/node_modules/markdownlint/doc/md035.md +0 -42
  204. package/packages/config-markdownlint/node_modules/markdownlint/doc/md036.md +0 -45
  205. package/packages/config-markdownlint/node_modules/markdownlint/doc/md037.md +0 -37
  206. package/packages/config-markdownlint/node_modules/markdownlint/doc/md038.md +0 -40
  207. package/packages/config-markdownlint/node_modules/markdownlint/doc/md039.md +0 -21
  208. package/packages/config-markdownlint/node_modules/markdownlint/doc/md040.md +0 -52
  209. package/packages/config-markdownlint/node_modules/markdownlint/doc/md041.md +0 -49
  210. package/packages/config-markdownlint/node_modules/markdownlint/doc/md042.md +0 -32
  211. package/packages/config-markdownlint/node_modules/markdownlint/doc/md043.md +0 -69
  212. package/packages/config-markdownlint/node_modules/markdownlint/doc/md044.md +0 -45
  213. package/packages/config-markdownlint/node_modules/markdownlint/doc/md045.md +0 -40
  214. package/packages/config-markdownlint/node_modules/markdownlint/doc/md046.md +0 -40
  215. package/packages/config-markdownlint/node_modules/markdownlint/doc/md047.md +0 -34
  216. package/packages/config-markdownlint/node_modules/markdownlint/doc/md048.md +0 -41
  217. package/packages/config-markdownlint/node_modules/markdownlint/doc/md049.md +0 -35
  218. package/packages/config-markdownlint/node_modules/markdownlint/doc/md050.md +0 -35
  219. package/packages/config-markdownlint/node_modules/markdownlint/doc/md051.md +0 -87
  220. package/packages/config-markdownlint/node_modules/markdownlint/doc/md052.md +0 -40
  221. package/packages/config-markdownlint/node_modules/markdownlint/doc/md053.md +0 -38
  222. package/packages/config-markdownlint/node_modules/markdownlint/doc/md054.md +0 -100
  223. package/packages/config-markdownlint/node_modules/markdownlint/doc/md055.md +0 -54
  224. package/packages/config-markdownlint/node_modules/markdownlint/doc/md056.md +0 -37
  225. package/packages/config-markdownlint/node_modules/markdownlint/doc/md058.md +0 -48
  226. package/packages/config-markdownlint/node_modules/markdownlint/helpers/LICENSE +0 -21
  227. package/packages/config-markdownlint/node_modules/markdownlint/helpers/README.md +0 -46
  228. package/packages/config-markdownlint/node_modules/markdownlint/helpers/helpers.js +0 -793
  229. package/packages/config-markdownlint/node_modules/markdownlint/helpers/micromark.cjs +0 -544
  230. package/packages/config-markdownlint/node_modules/markdownlint/helpers/package.json +0 -26
  231. package/packages/config-markdownlint/node_modules/markdownlint/helpers/shared.js +0 -10
  232. package/packages/config-markdownlint/node_modules/markdownlint/lib/cache.js +0 -70
  233. package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration-strict.d.ts +0 -1185
  234. package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration.d.ts +0 -8
  235. package/packages/config-markdownlint/node_modules/markdownlint/lib/constants.js +0 -15
  236. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.d.ts +0 -488
  237. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.js +0 -1572
  238. package/packages/config-markdownlint/node_modules/markdownlint/lib/md001.js +0 -31
  239. package/packages/config-markdownlint/node_modules/markdownlint/lib/md003.js +0 -50
  240. package/packages/config-markdownlint/node_modules/markdownlint/lib/md004.js +0 -86
  241. package/packages/config-markdownlint/node_modules/markdownlint/lib/md005.js +0 -72
  242. package/packages/config-markdownlint/node_modules/markdownlint/lib/md007.js +0 -88
  243. package/packages/config-markdownlint/node_modules/markdownlint/lib/md009.js +0 -95
  244. package/packages/config-markdownlint/node_modules/markdownlint/lib/md010.js +0 -78
  245. package/packages/config-markdownlint/node_modules/markdownlint/lib/md011.js +0 -57
  246. package/packages/config-markdownlint/node_modules/markdownlint/lib/md012.js +0 -43
  247. package/packages/config-markdownlint/node_modules/markdownlint/lib/md013.js +0 -105
  248. package/packages/config-markdownlint/node_modules/markdownlint/lib/md014.js +0 -54
  249. package/packages/config-markdownlint/node_modules/markdownlint/lib/md018.js +0 -46
  250. package/packages/config-markdownlint/node_modules/markdownlint/lib/md019-md021.js +0 -80
  251. package/packages/config-markdownlint/node_modules/markdownlint/lib/md020.js +0 -71
  252. package/packages/config-markdownlint/node_modules/markdownlint/lib/md022.js +0 -106
  253. package/packages/config-markdownlint/node_modules/markdownlint/lib/md023.js +0 -40
  254. package/packages/config-markdownlint/node_modules/markdownlint/lib/md024.js +0 -48
  255. package/packages/config-markdownlint/node_modules/markdownlint/lib/md025.js +0 -40
  256. package/packages/config-markdownlint/node_modules/markdownlint/lib/md026.js +0 -49
  257. package/packages/config-markdownlint/node_modules/markdownlint/lib/md027.js +0 -37
  258. package/packages/config-markdownlint/node_modules/markdownlint/lib/md028.js +0 -42
  259. package/packages/config-markdownlint/node_modules/markdownlint/lib/md029.js +0 -76
  260. package/packages/config-markdownlint/node_modules/markdownlint/lib/md030.js +0 -60
  261. package/packages/config-markdownlint/node_modules/markdownlint/lib/md031.js +0 -63
  262. package/packages/config-markdownlint/node_modules/markdownlint/lib/md032.js +0 -66
  263. package/packages/config-markdownlint/node_modules/markdownlint/lib/md033.js +0 -41
  264. package/packages/config-markdownlint/node_modules/markdownlint/lib/md034.js +0 -100
  265. package/packages/config-markdownlint/node_modules/markdownlint/lib/md035.js +0 -26
  266. package/packages/config-markdownlint/node_modules/markdownlint/lib/md036.js +0 -51
  267. package/packages/config-markdownlint/node_modules/markdownlint/lib/md037.js +0 -94
  268. package/packages/config-markdownlint/node_modules/markdownlint/lib/md038.js +0 -100
  269. package/packages/config-markdownlint/node_modules/markdownlint/lib/md039.js +0 -83
  270. package/packages/config-markdownlint/node_modules/markdownlint/lib/md040.js +0 -37
  271. package/packages/config-markdownlint/node_modules/markdownlint/lib/md041.js +0 -37
  272. package/packages/config-markdownlint/node_modules/markdownlint/lib/md042.js +0 -63
  273. package/packages/config-markdownlint/node_modules/markdownlint/lib/md043.js +0 -73
  274. package/packages/config-markdownlint/node_modules/markdownlint/lib/md044.js +0 -110
  275. package/packages/config-markdownlint/node_modules/markdownlint/lib/md045.js +0 -62
  276. package/packages/config-markdownlint/node_modules/markdownlint/lib/md046.js +0 -34
  277. package/packages/config-markdownlint/node_modules/markdownlint/lib/md047.js +0 -31
  278. package/packages/config-markdownlint/node_modules/markdownlint/lib/md048.js +0 -39
  279. package/packages/config-markdownlint/node_modules/markdownlint/lib/md049-md050.js +0 -103
  280. package/packages/config-markdownlint/node_modules/markdownlint/lib/md051.js +0 -170
  281. package/packages/config-markdownlint/node_modules/markdownlint/lib/md052.js +0 -42
  282. package/packages/config-markdownlint/node_modules/markdownlint/lib/md053.js +0 -62
  283. package/packages/config-markdownlint/node_modules/markdownlint/lib/md054.js +0 -125
  284. package/packages/config-markdownlint/node_modules/markdownlint/lib/md055.js +0 -79
  285. package/packages/config-markdownlint/node_modules/markdownlint/lib/md056.js +0 -56
  286. package/packages/config-markdownlint/node_modules/markdownlint/lib/md058.js +0 -43
  287. package/packages/config-markdownlint/node_modules/markdownlint/lib/rules.js +0 -74
  288. package/packages/config-markdownlint/node_modules/markdownlint/package.json +0 -105
  289. package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.jsonc +0 -307
  290. package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.yaml +0 -275
  291. package/packages/config-markdownlint/node_modules/markdownlint/schema/ValidatingConfiguration.md +0 -26
  292. package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema-strict.json +0 -1819
  293. package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema.json +0 -1824
  294. package/packages/config-markdownlint/node_modules/markdownlint/style/all.json +0 -5
  295. package/packages/config-markdownlint/node_modules/markdownlint/style/cirosantilli.json +0 -22
  296. package/packages/config-markdownlint/node_modules/markdownlint/style/prettier.json +0 -27
  297. package/packages/config-markdownlint/node_modules/markdownlint/style/relaxed.json +0 -12
  298. package/packages/config-markdownlint/node_modules/markdownlint-micromark/LICENSE +0 -21
  299. package/packages/config-markdownlint/node_modules/markdownlint-micromark/README.md +0 -10
  300. package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark-browser.js +0 -2
  301. package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark-html-browser.js +0 -2
  302. package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark.cjs +0 -1
  303. package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark.d.cts +0 -1751
  304. package/packages/config-markdownlint/node_modules/markdownlint-micromark/package.json +0 -46
@@ -1,2528 +0,0 @@
1
- # Rules
2
-
3
- This document contains a description of all rules, what they are checking for,
4
- as well as examples of documents that break the rule and corrected
5
- versions of the examples.
6
-
7
- <a name="md001"></a>
8
-
9
- ## `MD001` - Heading levels should only increment by one level at a time
10
-
11
- Tags: `headings`
12
-
13
- Aliases: `heading-increment`
14
-
15
- This rule is triggered when you skip heading levels in a Markdown document, for
16
- example:
17
-
18
- ```markdown
19
- # Heading 1
20
-
21
- ### Heading 3
22
-
23
- We skipped out a 2nd level heading in this document
24
- ```
25
-
26
- When using multiple heading levels, nested headings should increase by only one
27
- level at a time:
28
-
29
- ```markdown
30
- # Heading 1
31
-
32
- ## Heading 2
33
-
34
- ### Heading 3
35
-
36
- #### Heading 4
37
-
38
- ## Another Heading 2
39
-
40
- ### Another Heading 3
41
- ```
42
-
43
- Rationale: Headings represent the structure of a document and can be confusing
44
- when skipped - especially for accessibility scenarios. More information:
45
- <https://www.w3.org/WAI/tutorials/page-structure/headings/>.
46
-
47
- <a name="md003"></a>
48
-
49
- ## `MD003` - Heading style
50
-
51
- Tags: `headings`
52
-
53
- Aliases: `heading-style`
54
-
55
- Parameters:
56
-
57
- - `style`: Heading style (`string`, default `consistent`, values `atx` /
58
- `atx_closed` / `consistent` / `setext` / `setext_with_atx` /
59
- `setext_with_atx_closed`)
60
-
61
- This rule is triggered when different heading styles are used in the same
62
- document:
63
-
64
- ```markdown
65
- # ATX style H1
66
-
67
- ## Closed ATX style H2 ##
68
-
69
- Setext style H1
70
- ===============
71
- ```
72
-
73
- To fix the issue, use consistent heading styles throughout the document:
74
-
75
- ```markdown
76
- # ATX style H1
77
-
78
- ## ATX style H2
79
- ```
80
-
81
- The `setext_with_atx` and `setext_with_atx_closed` settings allow ATX-style
82
- headings of level 3 or more in documents with setext-style headings (which only
83
- support level 1 and 2 headings):
84
-
85
- ```markdown
86
- Setext style H1
87
- ===============
88
-
89
- Setext style H2
90
- ---------------
91
-
92
- ### ATX style H3
93
- ```
94
-
95
- Note: The configured heading style can be a specific style to require (`atx`,
96
- `atx_closed`, `setext`, `setext_with_atx`, `setext_with_atx_closed`), or may
97
- just require that usage is consistent within the document via `consistent`.
98
-
99
- Note: The placement of a horizontal rule directly below a line of text can
100
- trigger this rule by turning that text into a level 2 setext-style heading:
101
-
102
- ```markdown
103
- A line of text followed by a horizontal rule becomes a heading
104
- ---
105
- ```
106
-
107
- Rationale: Consistent formatting makes it easier to understand a document.
108
-
109
- <a name="md004"></a>
110
-
111
- ## `MD004` - Unordered list style
112
-
113
- Tags: `bullet`, `ul`
114
-
115
- Aliases: `ul-style`
116
-
117
- Parameters:
118
-
119
- - `style`: List style (`string`, default `consistent`, values `asterisk` /
120
- `consistent` / `dash` / `plus` / `sublist`)
121
-
122
- Fixable: Some violations can be fixed by tooling
123
-
124
- This rule is triggered when the symbols used in the document for unordered
125
- list items do not match the configured unordered list style:
126
-
127
- ```markdown
128
- * Item 1
129
- + Item 2
130
- - Item 3
131
- ```
132
-
133
- To fix this issue, use the configured style for list items throughout the
134
- document:
135
-
136
- ```markdown
137
- * Item 1
138
- * Item 2
139
- * Item 3
140
- ```
141
-
142
- The configured list style can be a specific symbol to use (asterisk, plus,
143
- dash), to ensure that all list styling is consistent, or to ensure that each
144
- sublist has a consistent symbol that differs from its parent list.
145
-
146
- For example, the following is valid for the `sublist` style because the
147
- outer-most indent uses asterisk, the middle indent uses plus, and the inner-most
148
- indent uses dash:
149
-
150
- ```markdown
151
- * Item 1
152
- + Item 2
153
- - Item 3
154
- + Item 4
155
- * Item 4
156
- + Item 5
157
- ```
158
-
159
- Rationale: Consistent formatting makes it easier to understand a document.
160
-
161
- <a name="md005"></a>
162
-
163
- ## `MD005` - Inconsistent indentation for list items at the same level
164
-
165
- Tags: `bullet`, `indentation`, `ul`
166
-
167
- Aliases: `list-indent`
168
-
169
- Fixable: Some violations can be fixed by tooling
170
-
171
- This rule is triggered when list items are parsed as being at the same level,
172
- but don't have the same indentation:
173
-
174
- ```markdown
175
- * Item 1
176
- * Nested Item 1
177
- * Nested Item 2
178
- * A misaligned item
179
- ```
180
-
181
- Usually, this rule will be triggered because of a typo. Correct the indentation
182
- for the list to fix it:
183
-
184
- ```markdown
185
- * Item 1
186
- * Nested Item 1
187
- * Nested Item 2
188
- * Nested Item 3
189
- ```
190
-
191
- Sequentially-ordered list markers are usually left-aligned such that all items
192
- have the same starting column:
193
-
194
- ```markdown
195
- ...
196
- 8. Item
197
- 9. Item
198
- 10. Item
199
- 11. Item
200
- ...
201
- ```
202
-
203
- This rule also supports right-alignment of list markers such that all items have
204
- the same ending column:
205
-
206
- ```markdown
207
- ...
208
- 8. Item
209
- 9. Item
210
- 10. Item
211
- 11. Item
212
- ...
213
- ```
214
-
215
- Rationale: Violations of this rule can lead to improperly rendered content.
216
-
217
- <a name="md007"></a>
218
-
219
- ## `MD007` - Unordered list indentation
220
-
221
- Tags: `bullet`, `indentation`, `ul`
222
-
223
- Aliases: `ul-indent`
224
-
225
- Parameters:
226
-
227
- - `indent`: Spaces for indent (`integer`, default `2`)
228
- - `start_indent`: Spaces for first level indent (when start_indented is set)
229
- (`integer`, default `2`)
230
- - `start_indented`: Whether to indent the first level of the list (`boolean`,
231
- default `false`)
232
-
233
- Fixable: Some violations can be fixed by tooling
234
-
235
- This rule is triggered when list items are not indented by the configured
236
- number of spaces (default: 2).
237
-
238
- Example:
239
-
240
- ```markdown
241
- * List item
242
- * Nested list item indented by 3 spaces
243
- ```
244
-
245
- Corrected Example:
246
-
247
- ```markdown
248
- * List item
249
- * Nested list item indented by 2 spaces
250
- ```
251
-
252
- Note: This rule applies to a sublist only if its parent lists are all also
253
- unordered (otherwise, extra indentation of ordered lists interferes with the
254
- rule).
255
-
256
- The `start_indented` parameter allows the first level of lists to be indented by
257
- the configured number of spaces rather than starting at zero. The `start_indent`
258
- parameter allows the first level of lists to be indented by a different number
259
- of spaces than the rest (ignored when `start_indented` is not set).
260
-
261
- Rationale: Indenting by 2 spaces allows the content of a nested list to be in
262
- line with the start of the content of the parent list when a single space is
263
- used after the list marker. Indenting by 4 spaces is consistent with code blocks
264
- and simpler for editors to implement. Additionally, this can be a compatibility
265
- issue for other Markdown parsers, which require 4-space indents. More
266
- information: [Markdown Style Guide][markdown-style-guide].
267
-
268
- Note: See [Prettier.md](Prettier.md) for compatibility information.
269
-
270
- [markdown-style-guide]: https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists
271
-
272
- <a name="md009"></a>
273
-
274
- ## `MD009` - Trailing spaces
275
-
276
- Tags: `whitespace`
277
-
278
- Aliases: `no-trailing-spaces`
279
-
280
- Parameters:
281
-
282
- - `br_spaces`: Spaces for line break (`integer`, default `2`)
283
- - `list_item_empty_lines`: Allow spaces for empty lines in list items
284
- (`boolean`, default `false`)
285
- - `strict`: Include unnecessary breaks (`boolean`, default `false`)
286
-
287
- Fixable: Some violations can be fixed by tooling
288
-
289
- This rule is triggered on any lines that end with unexpected whitespace. To fix
290
- this, remove the trailing space from the end of the line.
291
-
292
- Note: Trailing space is allowed in indented and fenced code blocks because some
293
- languages require it.
294
-
295
- The `br_spaces` parameter allows an exception to this rule for a specific number
296
- of trailing spaces, typically used to insert an explicit line break. The default
297
- value allows 2 spaces to indicate a hard break (\<br> element).
298
-
299
- Note: You must set `br_spaces` to a value >= 2 for this parameter to take
300
- effect. Setting `br_spaces` to 1 behaves the same as 0, disallowing any trailing
301
- spaces.
302
-
303
- By default, this rule will not trigger when the allowed number of spaces is
304
- used, even when it doesn't create a hard break (for example, at the end of a
305
- paragraph). To report such instances as well, set the `strict` parameter to
306
- `true`.
307
-
308
- ```markdown
309
- Text text text
310
- text[2 spaces]
311
- ```
312
-
313
- Using spaces to indent blank lines inside a list item is usually not necessary,
314
- but some parsers require it. Set the `list_item_empty_lines` parameter to `true`
315
- to allow this (even when `strict` is `true`):
316
-
317
- ```markdown
318
- - list item text
319
- [2 spaces]
320
- list item text
321
- ```
322
-
323
- Rationale: Except when being used to create a line break, trailing whitespace
324
- has no purpose and does not affect the rendering of content.
325
-
326
- <a name="md010"></a>
327
-
328
- ## `MD010` - Hard tabs
329
-
330
- Tags: `hard_tab`, `whitespace`
331
-
332
- Aliases: `no-hard-tabs`
333
-
334
- Parameters:
335
-
336
- - `code_blocks`: Include code blocks (`boolean`, default `true`)
337
- - `ignore_code_languages`: Fenced code languages to ignore (`string[]`, default
338
- `[]`)
339
- - `spaces_per_tab`: Number of spaces for each hard tab (`integer`, default `1`)
340
-
341
- Fixable: Some violations can be fixed by tooling
342
-
343
- This rule is triggered by any lines that contain hard tab characters instead
344
- of using spaces for indentation. To fix this, replace any hard tab characters
345
- with spaces instead.
346
-
347
- Example:
348
-
349
- <!-- markdownlint-disable no-hard-tabs -->
350
-
351
- ```markdown
352
- Some text
353
-
354
- * hard tab character used to indent the list item
355
- ```
356
-
357
- <!-- markdownlint-restore -->
358
-
359
- Corrected example:
360
-
361
- ```markdown
362
- Some text
363
-
364
- * Spaces used to indent the list item instead
365
- ```
366
-
367
- You have the option to exclude this rule for code blocks and spans. To do so,
368
- set the `code_blocks` parameter to `false`. Code blocks and spans are included
369
- by default since handling of tabs by Markdown tools can be inconsistent (e.g.,
370
- using 4 vs. 8 spaces).
371
-
372
- When code blocks are scanned (e.g., by default or if `code_blocks` is `true`),
373
- the `ignore_code_languages` parameter can be set to a list of languages that
374
- should be ignored (i.e., hard tabs will be allowed, though not required). This
375
- makes it easier for documents to include code for languages that require hard
376
- tabs.
377
-
378
- By default, violations of this rule are fixed by replacing the tab with 1 space
379
- character. To use a different number of spaces, set the `spaces_per_tab`
380
- parameter to the desired value.
381
-
382
- Rationale: Hard tabs are often rendered inconsistently by different editors and
383
- can be harder to work with than spaces.
384
-
385
- <a name="md011"></a>
386
-
387
- ## `MD011` - Reversed link syntax
388
-
389
- Tags: `links`
390
-
391
- Aliases: `no-reversed-links`
392
-
393
- Fixable: Some violations can be fixed by tooling
394
-
395
- This rule is triggered when text that appears to be a link is encountered, but
396
- where the syntax appears to have been reversed (the `[]` and `()` are
397
- reversed):
398
-
399
- ```markdown
400
- (Incorrect link syntax)[https://www.example.com/]
401
- ```
402
-
403
- To fix this, swap the `[]` and `()` around:
404
-
405
- ```markdown
406
- [Correct link syntax](https://www.example.com/)
407
- ```
408
-
409
- Note: [Markdown Extra](https://en.wikipedia.org/wiki/Markdown_Extra)-style
410
- footnotes do not trigger this rule:
411
-
412
- ```markdown
413
- For (example)[^1]
414
- ```
415
-
416
- Rationale: Reversed links are not rendered as usable links.
417
-
418
- <a name="md012"></a>
419
-
420
- ## `MD012` - Multiple consecutive blank lines
421
-
422
- Tags: `blank_lines`, `whitespace`
423
-
424
- Aliases: `no-multiple-blanks`
425
-
426
- Parameters:
427
-
428
- - `maximum`: Consecutive blank lines (`integer`, default `1`)
429
-
430
- Fixable: Some violations can be fixed by tooling
431
-
432
- This rule is triggered when there are multiple consecutive blank lines in the
433
- document:
434
-
435
- ```markdown
436
- Some text here
437
-
438
-
439
- Some more text here
440
- ```
441
-
442
- To fix this, delete the offending lines:
443
-
444
- ```markdown
445
- Some text here
446
-
447
- Some more text here
448
- ```
449
-
450
- Note: this rule will not be triggered if there are multiple consecutive blank
451
- lines inside code blocks.
452
-
453
- Note: The `maximum` parameter can be used to configure the maximum number of
454
- consecutive blank lines.
455
-
456
- Rationale: Except in a code block, blank lines serve no purpose and do not
457
- affect the rendering of content.
458
-
459
- <a name="md013"></a>
460
-
461
- ## `MD013` - Line length
462
-
463
- Tags: `line_length`
464
-
465
- Aliases: `line-length`
466
-
467
- Parameters:
468
-
469
- - `code_block_line_length`: Number of characters for code blocks (`integer`,
470
- default `80`)
471
- - `code_blocks`: Include code blocks (`boolean`, default `true`)
472
- - `heading_line_length`: Number of characters for headings (`integer`, default
473
- `80`)
474
- - `headings`: Include headings (`boolean`, default `true`)
475
- - `line_length`: Number of characters (`integer`, default `80`)
476
- - `stern`: Stern length checking (`boolean`, default `false`)
477
- - `strict`: Strict length checking (`boolean`, default `false`)
478
- - `tables`: Include tables (`boolean`, default `true`)
479
-
480
- This rule is triggered when there are lines that are longer than the
481
- configured `line_length` (default: 80 characters). To fix this, split the line
482
- up into multiple lines. To set a different maximum length for headings, use
483
- `heading_line_length`. To set a different maximum length for code blocks, use
484
- `code_block_line_length`
485
-
486
- This rule has an exception when there is no whitespace beyond the configured
487
- line length. This allows you to include items such as long URLs without being
488
- forced to break them in the middle. To disable this exception, set the `strict`
489
- parameter to `true` and an issue will be reported when any line is too long. To
490
- warn for lines that are too long and could be fixed but allow long lines
491
- without spaces, set the `stern` parameter to `true`.
492
-
493
- For example (assuming normal behavior):
494
-
495
- ```markdown
496
- IF THIS LINE IS THE MAXIMUM LENGTH
497
- This line is okay because there are-no-spaces-beyond-that-length
498
- This line is a violation because there are spaces beyond that length
499
- This-line-is-okay-because-there-are-no-spaces-anywhere-within
500
- ```
501
-
502
- In `strict` mode, the last three lines above are all violations. In `stern`
503
- mode, the middle two lines above are both violations, but the last is okay.
504
-
505
- You have the option to exclude this rule for code blocks, tables, or headings.
506
- To do so, set the `code_blocks`, `tables`, or `headings` parameter(s) to false.
507
-
508
- Code blocks are included in this rule by default since it is often a
509
- requirement for document readability, and tentatively compatible with code
510
- rules. Still, some languages do not lend themselves to short lines.
511
-
512
- Lines with link/image reference definitions and standalone lines (i.e., not part
513
- of a paragraph) with only a link/image (possibly using (strong) emphasis) are
514
- always exempted from this rule (even in `strict` mode) because there is often no
515
- way to split such lines without breaking the URL.
516
-
517
- Rationale: Extremely long lines can be difficult to work with in some editors.
518
- More information: <https://cirosantilli.com/markdown-style-guide#line-wrapping>.
519
-
520
- <a name="md014"></a>
521
-
522
- ## `MD014` - Dollar signs used before commands without showing output
523
-
524
- Tags: `code`
525
-
526
- Aliases: `commands-show-output`
527
-
528
- Fixable: Some violations can be fixed by tooling
529
-
530
- This rule is triggered when there are code blocks showing shell commands to be
531
- typed, and *all* of the shell commands are preceded by dollar signs ($):
532
-
533
- <!-- markdownlint-disable commands-show-output -->
534
-
535
- ```markdown
536
- $ ls
537
- $ cat foo
538
- $ less bar
539
- ```
540
-
541
- <!-- markdownlint-restore -->
542
-
543
- The dollar signs are unnecessary in this situation, and should not be
544
- included:
545
-
546
- ```markdown
547
- ls
548
- cat foo
549
- less bar
550
- ```
551
-
552
- Showing output for commands preceded by dollar signs does not trigger this rule:
553
-
554
- ```markdown
555
- $ ls
556
- foo bar
557
- $ cat foo
558
- Hello world
559
- $ cat bar
560
- baz
561
- ```
562
-
563
- Because some commands do not produce output, it is not a violation if *some*
564
- commands do not have output:
565
-
566
- ```markdown
567
- $ mkdir test
568
- mkdir: created directory 'test'
569
- $ ls test
570
- ```
571
-
572
- Rationale: It is easier to copy/paste and less noisy if the dollar signs
573
- are omitted when they are not needed. See
574
- <https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code>
575
- for more information.
576
-
577
- <a name="md018"></a>
578
-
579
- ## `MD018` - No space after hash on atx style heading
580
-
581
- Tags: `atx`, `headings`, `spaces`
582
-
583
- Aliases: `no-missing-space-atx`
584
-
585
- Fixable: Some violations can be fixed by tooling
586
-
587
- This rule is triggered when spaces are missing after the hash characters
588
- in an atx style heading:
589
-
590
- ```markdown
591
- #Heading 1
592
-
593
- ##Heading 2
594
- ```
595
-
596
- To fix this, separate the heading text from the hash character by a single
597
- space:
598
-
599
- ```markdown
600
- # Heading 1
601
-
602
- ## Heading 2
603
- ```
604
-
605
- Rationale: Violations of this rule can lead to improperly rendered content.
606
-
607
- <a name="md019"></a>
608
-
609
- ## `MD019` - Multiple spaces after hash on atx style heading
610
-
611
- Tags: `atx`, `headings`, `spaces`
612
-
613
- Aliases: `no-multiple-space-atx`
614
-
615
- Fixable: Some violations can be fixed by tooling
616
-
617
- This rule is triggered when more than one space is used to separate the
618
- heading text from the hash characters in an atx style heading:
619
-
620
- ```markdown
621
- # Heading 1
622
-
623
- ## Heading 2
624
- ```
625
-
626
- To fix this, separate the heading text from the hash character by a single
627
- space:
628
-
629
- ```markdown
630
- # Heading 1
631
-
632
- ## Heading 2
633
- ```
634
-
635
- Rationale: Extra space has no purpose and does not affect the rendering of
636
- content.
637
-
638
- <a name="md020"></a>
639
-
640
- ## `MD020` - No space inside hashes on closed atx style heading
641
-
642
- Tags: `atx_closed`, `headings`, `spaces`
643
-
644
- Aliases: `no-missing-space-closed-atx`
645
-
646
- Fixable: Some violations can be fixed by tooling
647
-
648
- This rule is triggered when spaces are missing inside the hash characters
649
- in a closed atx style heading:
650
-
651
- ```markdown
652
- #Heading 1#
653
-
654
- ##Heading 2##
655
- ```
656
-
657
- To fix this, separate the heading text from the hash character by a single
658
- space:
659
-
660
- ```markdown
661
- # Heading 1 #
662
-
663
- ## Heading 2 ##
664
- ```
665
-
666
- Note: this rule will fire if either side of the heading is missing spaces.
667
-
668
- Rationale: Violations of this rule can lead to improperly rendered content.
669
-
670
- <a name="md021"></a>
671
-
672
- ## `MD021` - Multiple spaces inside hashes on closed atx style heading
673
-
674
- Tags: `atx_closed`, `headings`, `spaces`
675
-
676
- Aliases: `no-multiple-space-closed-atx`
677
-
678
- Fixable: Some violations can be fixed by tooling
679
-
680
- This rule is triggered when more than one space is used to separate the
681
- heading text from the hash characters in a closed atx style heading:
682
-
683
- ```markdown
684
- # Heading 1 #
685
-
686
- ## Heading 2 ##
687
- ```
688
-
689
- To fix this, separate the heading text from the hash character by a single
690
- space:
691
-
692
- ```markdown
693
- # Heading 1 #
694
-
695
- ## Heading 2 ##
696
- ```
697
-
698
- Note: this rule will fire if either side of the heading contains multiple
699
- spaces.
700
-
701
- Rationale: Extra space has no purpose and does not affect the rendering of
702
- content.
703
-
704
- <a name="md022"></a>
705
-
706
- ## `MD022` - Headings should be surrounded by blank lines
707
-
708
- Tags: `blank_lines`, `headings`
709
-
710
- Aliases: `blanks-around-headings`
711
-
712
- Parameters:
713
-
714
- - `lines_above`: Blank lines above heading (`integer|integer[]`, default `1`)
715
- - `lines_below`: Blank lines below heading (`integer|integer[]`, default `1`)
716
-
717
- Fixable: Some violations can be fixed by tooling
718
-
719
- This rule is triggered when headings (any style) are either not preceded or not
720
- followed by at least one blank line:
721
-
722
- ```markdown
723
- # Heading 1
724
- Some text
725
-
726
- Some more text
727
- ## Heading 2
728
- ```
729
-
730
- To fix this, ensure that all headings have a blank line both before and after
731
- (except where the heading is at the beginning or end of the document):
732
-
733
- ```markdown
734
- # Heading 1
735
-
736
- Some text
737
-
738
- Some more text
739
-
740
- ## Heading 2
741
- ```
742
-
743
- The `lines_above` and `lines_below` parameters can be used to specify a
744
- different number of blank lines (including `0`) above or below each heading.
745
- If the value `-1` is used for either parameter, any number of blank lines is
746
- allowed. To customize the number of lines above or below each heading level
747
- individually, specify a `number[]` where values correspond to heading levels
748
- 1-6 (in order).
749
-
750
- Notes: If `lines_above` or `lines_below` are configured to require more than one
751
- blank line, [MD012/no-multiple-blanks](md012.md) should also be customized. This
752
- rule checks for *at least* as many blank lines as specified; any extra blank
753
- lines are ignored.
754
-
755
- Rationale: Aside from aesthetic reasons, some parsers, including `kramdown`,
756
- will not parse headings that don't have a blank line before, and will parse them
757
- as regular text.
758
-
759
- <a name="md023"></a>
760
-
761
- ## `MD023` - Headings must start at the beginning of the line
762
-
763
- Tags: `headings`, `spaces`
764
-
765
- Aliases: `heading-start-left`
766
-
767
- Fixable: Some violations can be fixed by tooling
768
-
769
- This rule is triggered when a heading is indented by one or more spaces:
770
-
771
- ```markdown
772
- Some text
773
-
774
- # Indented heading
775
- ```
776
-
777
- To fix this, ensure that all headings start at the beginning of the line:
778
-
779
- ```markdown
780
- Some text
781
-
782
- # Heading
783
- ```
784
-
785
- Note that scenarios like block quotes "indent" the start of the line, so the
786
- following is also correct:
787
-
788
- ```markdown
789
- > # Heading in Block Quote
790
- ```
791
-
792
- Rationale: Headings that don't start at the beginning of the line will not be
793
- parsed as headings, and will instead appear as regular text.
794
-
795
- <a name="md024"></a>
796
-
797
- ## `MD024` - Multiple headings with the same content
798
-
799
- Tags: `headings`
800
-
801
- Aliases: `no-duplicate-heading`
802
-
803
- Parameters:
804
-
805
- - `siblings_only`: Only check sibling headings (`boolean`, default `false`)
806
-
807
- This rule is triggered if there are multiple headings in the document that have
808
- the same text:
809
-
810
- ```markdown
811
- # Some text
812
-
813
- ## Some text
814
- ```
815
-
816
- To fix this, ensure that the content of each heading is different:
817
-
818
- ```markdown
819
- # Some text
820
-
821
- ## Some more text
822
- ```
823
-
824
- If the parameter `siblings_only` is set to `true`, duplication is allowed for
825
- headings with different parents (as is common in changelogs):
826
-
827
- ```markdown
828
- # Change log
829
-
830
- ## 1.0.0
831
-
832
- ### Features
833
-
834
- ## 2.0.0
835
-
836
- ### Features
837
- ```
838
-
839
- Rationale: Some Markdown parsers generate anchors for headings based on the
840
- heading name; headings with the same content can cause problems with that.
841
-
842
- <a name="md025"></a>
843
-
844
- ## `MD025` - Multiple top-level headings in the same document
845
-
846
- Tags: `headings`
847
-
848
- Aliases: `single-h1`, `single-title`
849
-
850
- Parameters:
851
-
852
- - `front_matter_title`: RegExp for matching title in front matter (`string`,
853
- default `^\s*title\s*[:=]`)
854
- - `level`: Heading level (`integer`, default `1`)
855
-
856
- This rule is triggered when a top-level heading is in use (the first line of
857
- the file is an h1 heading), and more than one h1 heading is in use in the
858
- document:
859
-
860
- ```markdown
861
- # Top level heading
862
-
863
- # Another top-level heading
864
- ```
865
-
866
- To fix, structure your document so there is a single h1 heading that is
867
- the title for the document. Subsequent headings must be
868
- lower-level headings (h2, h3, etc.):
869
-
870
- ```markdown
871
- # Title
872
-
873
- ## Heading
874
-
875
- ## Another heading
876
- ```
877
-
878
- Note: The `level` parameter can be used to change the top-level (ex: to h2) in
879
- cases where an h1 is added externally.
880
-
881
- If [YAML](https://en.wikipedia.org/wiki/YAML) front matter is present and
882
- contains a `title` property (commonly used with blog posts), this rule treats
883
- that as a top level heading and will report a violation for any subsequent
884
- top-level headings. To use a different property name in the front matter,
885
- specify the text of a regular expression via the `front_matter_title` parameter.
886
- To disable the use of front matter by this rule, specify `""` for
887
- `front_matter_title`.
888
-
889
- Rationale: A top-level heading is an h1 on the first line of the file, and
890
- serves as the title for the document. If this convention is in use, then there
891
- can not be more than one title for the document, and the entire document should
892
- be contained within this heading.
893
-
894
- <a name="md026"></a>
895
-
896
- ## `MD026` - Trailing punctuation in heading
897
-
898
- Tags: `headings`
899
-
900
- Aliases: `no-trailing-punctuation`
901
-
902
- Parameters:
903
-
904
- - `punctuation`: Punctuation characters (`string`, default `.,;:!。,;:!`)
905
-
906
- Fixable: Some violations can be fixed by tooling
907
-
908
- This rule is triggered on any heading that has one of the specified normal or
909
- full-width punctuation characters as the last character in the line:
910
-
911
- ```markdown
912
- # This is a heading.
913
- ```
914
-
915
- To fix this, remove the trailing punctuation:
916
-
917
- ```markdown
918
- # This is a heading
919
- ```
920
-
921
- Note: The `punctuation` parameter can be used to specify what characters count
922
- as punctuation at the end of a heading. For example, you can change it to
923
- `".,;:"` to allow headings that end with an exclamation point. `?` is
924
- allowed by default because of how common it is in headings of FAQ-style
925
- documents. Setting the `punctuation` parameter to `""` allows all characters -
926
- and is equivalent to disabling the rule.
927
-
928
- Note: The trailing semicolon of [HTML entity references][html-entity-references]
929
- like `&copy;`, `&#169;`, and `&#x000A9;` is ignored by this rule.
930
-
931
- Rationale: Headings are not meant to be full sentences. More information:
932
- [Punctuation at the end of headers][end-punctuation].
933
-
934
- [end-punctuation]: https://cirosantilli.com/markdown-style-guide#punctuation-at-the-end-of-headers
935
- [html-entity-references]: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
936
-
937
- <a name="md027"></a>
938
-
939
- ## `MD027` - Multiple spaces after blockquote symbol
940
-
941
- Tags: `blockquote`, `indentation`, `whitespace`
942
-
943
- Aliases: `no-multiple-space-blockquote`
944
-
945
- Fixable: Some violations can be fixed by tooling
946
-
947
- This rule is triggered when blockquotes have more than one space after the
948
- blockquote (`>`) symbol:
949
-
950
- ```markdown
951
- > This is a blockquote with bad indentation
952
- > there should only be one.
953
- ```
954
-
955
- To fix, remove any extraneous space:
956
-
957
- ```markdown
958
- > This is a blockquote with correct
959
- > indentation.
960
- ```
961
-
962
- Rationale: Consistent formatting makes it easier to understand a document.
963
-
964
- <a name="md028"></a>
965
-
966
- ## `MD028` - Blank line inside blockquote
967
-
968
- Tags: `blockquote`, `whitespace`
969
-
970
- Aliases: `no-blanks-blockquote`
971
-
972
- This rule is triggered when two blockquote blocks are separated by nothing
973
- except for a blank line:
974
-
975
- ```markdown
976
- > This is a blockquote
977
- > which is immediately followed by
978
-
979
- > this blockquote. Unfortunately
980
- > In some parsers, these are treated as the same blockquote.
981
- ```
982
-
983
- To fix this, ensure that any blockquotes that are right next to each other
984
- have some text in between:
985
-
986
- ```markdown
987
- > This is a blockquote.
988
-
989
- And Jimmy also said:
990
-
991
- > This too is a blockquote.
992
- ```
993
-
994
- Alternatively, if they are supposed to be the same quote, then add the
995
- blockquote symbol at the beginning of the blank line:
996
-
997
- ```markdown
998
- > This is a blockquote.
999
- >
1000
- > This is the same blockquote.
1001
- ```
1002
-
1003
- Rationale: Some Markdown parsers will treat two blockquotes separated by one
1004
- or more blank lines as the same blockquote, while others will treat them as
1005
- separate blockquotes.
1006
-
1007
- <a name="md029"></a>
1008
-
1009
- ## `MD029` - Ordered list item prefix
1010
-
1011
- Tags: `ol`
1012
-
1013
- Aliases: `ol-prefix`
1014
-
1015
- Parameters:
1016
-
1017
- - `style`: List style (`string`, default `one_or_ordered`, values `one` /
1018
- `one_or_ordered` / `ordered` / `zero`)
1019
-
1020
- This rule is triggered for ordered lists that do not either start with '1.' or
1021
- do not have a prefix that increases in numerical order (depending on the
1022
- configured style). The less-common pattern of using '0.' as a first prefix or
1023
- for all prefixes is also supported.
1024
-
1025
- Example valid list if the style is configured as 'one':
1026
-
1027
- ```markdown
1028
- 1. Do this.
1029
- 1. Do that.
1030
- 1. Done.
1031
- ```
1032
-
1033
- Examples of valid lists if the style is configured as 'ordered':
1034
-
1035
- ```markdown
1036
- 1. Do this.
1037
- 2. Do that.
1038
- 3. Done.
1039
- ```
1040
-
1041
- ```markdown
1042
- 0. Do this.
1043
- 1. Do that.
1044
- 2. Done.
1045
- ```
1046
-
1047
- All three examples are valid when the style is configured as 'one_or_ordered'.
1048
-
1049
- Example valid list if the style is configured as 'zero':
1050
-
1051
- ```markdown
1052
- 0. Do this.
1053
- 0. Do that.
1054
- 0. Done.
1055
- ```
1056
-
1057
- Example invalid list for all styles:
1058
-
1059
- ```markdown
1060
- 1. Do this.
1061
- 3. Done.
1062
- ```
1063
-
1064
- This rule supports 0-prefixing ordered list items for uniform indentation:
1065
-
1066
- ```markdown
1067
- ...
1068
- 08. Item
1069
- 09. Item
1070
- 10. Item
1071
- 11. Item
1072
- ...
1073
- ```
1074
-
1075
- Note: This rule will report violations for cases like the following where an
1076
- improperly-indented code block (or similar) appears between two list items and
1077
- "breaks" the list in two:
1078
-
1079
- <!-- markdownlint-disable code-fence-style -->
1080
-
1081
- ~~~markdown
1082
- 1. First list
1083
-
1084
- ```text
1085
- Code block
1086
- ```
1087
-
1088
- 1. Second list
1089
- ~~~
1090
-
1091
- The fix is to indent the code block so it becomes part of the preceding list
1092
- item as intended:
1093
-
1094
- ~~~markdown
1095
- 1. First list
1096
-
1097
- ```text
1098
- Code block
1099
- ```
1100
-
1101
- 2. Still first list
1102
- ~~~
1103
-
1104
- <!-- markdownlint-restore -->
1105
-
1106
- Rationale: Consistent formatting makes it easier to understand a document.
1107
-
1108
- <a name="md030"></a>
1109
-
1110
- ## `MD030` - Spaces after list markers
1111
-
1112
- Tags: `ol`, `ul`, `whitespace`
1113
-
1114
- Aliases: `list-marker-space`
1115
-
1116
- Parameters:
1117
-
1118
- - `ol_multi`: Spaces for multi-line ordered list items (`integer`, default `1`)
1119
- - `ol_single`: Spaces for single-line ordered list items (`integer`, default
1120
- `1`)
1121
- - `ul_multi`: Spaces for multi-line unordered list items (`integer`, default
1122
- `1`)
1123
- - `ul_single`: Spaces for single-line unordered list items (`integer`, default
1124
- `1`)
1125
-
1126
- Fixable: Some violations can be fixed by tooling
1127
-
1128
- This rule checks for the number of spaces between a list marker (e.g. '`-`',
1129
- '`*`', '`+`' or '`1.`') and the text of the list item.
1130
-
1131
- The number of spaces checked for depends on the document style in use, but the
1132
- default is 1 space after any list marker:
1133
-
1134
- ```markdown
1135
- * Foo
1136
- * Bar
1137
- * Baz
1138
-
1139
- 1. Foo
1140
- 1. Bar
1141
- 1. Baz
1142
-
1143
- 1. Foo
1144
- * Bar
1145
- 1. Baz
1146
- ```
1147
-
1148
- A document style may change the number of spaces after unordered list items
1149
- and ordered list items independently, as well as based on whether the content
1150
- of every item in the list consists of a single paragraph or multiple
1151
- paragraphs (including sub-lists and code blocks).
1152
-
1153
- For example, the style guide at
1154
- <https://cirosantilli.com/markdown-style-guide#spaces-after-list-marker>
1155
- specifies that 1 space after the list marker should be used if every item in
1156
- the list fits within a single paragraph, but to use 2 or 3 spaces (for ordered
1157
- and unordered lists respectively) if there are multiple paragraphs of content
1158
- inside the list:
1159
-
1160
- ```markdown
1161
- * Foo
1162
- * Bar
1163
- * Baz
1164
- ```
1165
-
1166
- vs.
1167
-
1168
- ```markdown
1169
- * Foo
1170
-
1171
- Second paragraph
1172
-
1173
- * Bar
1174
- ```
1175
-
1176
- or
1177
-
1178
- ```markdown
1179
- 1. Foo
1180
-
1181
- Second paragraph
1182
-
1183
- 1. Bar
1184
- ```
1185
-
1186
- To fix this, ensure the correct number of spaces are used after the list marker
1187
- for your selected document style.
1188
-
1189
- Rationale: Violations of this rule can lead to improperly rendered content.
1190
-
1191
- Note: See [Prettier.md](Prettier.md) for compatibility information.
1192
-
1193
- <a name="md031"></a>
1194
-
1195
- ## `MD031` - Fenced code blocks should be surrounded by blank lines
1196
-
1197
- Tags: `blank_lines`, `code`
1198
-
1199
- Aliases: `blanks-around-fences`
1200
-
1201
- Parameters:
1202
-
1203
- - `list_items`: Include list items (`boolean`, default `true`)
1204
-
1205
- Fixable: Some violations can be fixed by tooling
1206
-
1207
- This rule is triggered when fenced code blocks are either not preceded or not
1208
- followed by a blank line:
1209
-
1210
- ````markdown
1211
- Some text
1212
- ```
1213
- Code block
1214
- ```
1215
-
1216
- ```
1217
- Another code block
1218
- ```
1219
- Some more text
1220
- ````
1221
-
1222
- To fix this, ensure that all fenced code blocks have a blank line both before
1223
- and after (except where the block is at the beginning or end of the document):
1224
-
1225
- ````markdown
1226
- Some text
1227
-
1228
- ```
1229
- Code block
1230
- ```
1231
-
1232
- ```
1233
- Another code block
1234
- ```
1235
-
1236
- Some more text
1237
- ````
1238
-
1239
- Set the `list_items` parameter to `false` to disable this rule for list items.
1240
- Disabling this behavior for lists can be useful if it is necessary to create a
1241
- [tight](https://spec.commonmark.org/0.29/#tight) list containing a code fence.
1242
-
1243
- Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will
1244
- not parse fenced code blocks that don't have blank lines before and after them.
1245
-
1246
- <a name="md032"></a>
1247
-
1248
- ## `MD032` - Lists should be surrounded by blank lines
1249
-
1250
- Tags: `blank_lines`, `bullet`, `ol`, `ul`
1251
-
1252
- Aliases: `blanks-around-lists`
1253
-
1254
- Fixable: Some violations can be fixed by tooling
1255
-
1256
- This rule is triggered when lists (of any kind) are either not preceded or not
1257
- followed by a blank line:
1258
-
1259
- ```markdown
1260
- Some text
1261
- * List item
1262
- * List item
1263
-
1264
- 1. List item
1265
- 2. List item
1266
- ***
1267
- ```
1268
-
1269
- In the first case above, text immediately precedes the unordered list. In the
1270
- second case above, a thematic break immediately follows the ordered list. To fix
1271
- violations of this rule, ensure that all lists have a blank line both before and
1272
- after (except when the list is at the very beginning or end of the document):
1273
-
1274
- ```markdown
1275
- Some text
1276
-
1277
- * List item
1278
- * List item
1279
-
1280
- 1. List item
1281
- 2. List item
1282
-
1283
- ***
1284
- ```
1285
-
1286
- Note that the following case is **not** a violation of this rule:
1287
-
1288
- ```markdown
1289
- 1. List item
1290
- More item 1
1291
- 2. List item
1292
- More item 2
1293
- ```
1294
-
1295
- Although it is not indented, the text "More item 2" is referred to as a
1296
- [lazy continuation line][lazy-continuation] and considered part of the second
1297
- list item.
1298
-
1299
- Rationale: In addition to aesthetic reasons, some parsers, including kramdown,
1300
- will not parse lists that don't have blank lines before and after them.
1301
-
1302
- [lazy-continuation]: https://spec.commonmark.org/0.30/#lazy-continuation-line
1303
-
1304
- <a name="md033"></a>
1305
-
1306
- ## `MD033` - Inline HTML
1307
-
1308
- Tags: `html`
1309
-
1310
- Aliases: `no-inline-html`
1311
-
1312
- Parameters:
1313
-
1314
- - `allowed_elements`: Allowed elements (`string[]`, default `[]`)
1315
-
1316
- This rule is triggered whenever raw HTML is used in a Markdown document:
1317
-
1318
- ```markdown
1319
- <h1>Inline HTML heading</h1>
1320
- ```
1321
-
1322
- To fix this, use 'pure' Markdown instead of including raw HTML:
1323
-
1324
- ```markdown
1325
- # Markdown heading
1326
- ```
1327
-
1328
- Note: To allow specific HTML elements, use the `allowed_elements` parameter.
1329
-
1330
- Rationale: Raw HTML is allowed in Markdown, but this rule is included for
1331
- those who want their documents to only include "pure" Markdown, or for those
1332
- who are rendering Markdown documents into something other than HTML.
1333
-
1334
- <a name="md034"></a>
1335
-
1336
- ## `MD034` - Bare URL used
1337
-
1338
- Tags: `links`, `url`
1339
-
1340
- Aliases: `no-bare-urls`
1341
-
1342
- Fixable: Some violations can be fixed by tooling
1343
-
1344
- This rule is triggered whenever a URL or email address appears without
1345
- surrounding angle brackets:
1346
-
1347
- ```markdown
1348
- For more info, visit https://www.example.com/ or email user@example.com.
1349
- ```
1350
-
1351
- To fix this, add angle brackets around the URL or email address:
1352
-
1353
- ```markdown
1354
- For more info, visit <https://www.example.com/> or email <user@example.com>.
1355
- ```
1356
-
1357
- If a URL or email address contains non-ASCII characters, it may be not be
1358
- handled as intended even when angle brackets are present. In such cases,
1359
- [percent-encoding](https://en.m.wikipedia.org/wiki/Percent-encoding) can be used
1360
- to comply with the required syntax for URL and email.
1361
-
1362
- Note: To include a bare URL or email without it being converted into a link,
1363
- wrap it in a code span:
1364
-
1365
- ```markdown
1366
- Not a clickable link: `https://www.example.com`
1367
- ```
1368
-
1369
- Note: The following scenario does not trigger this rule because it could be a
1370
- shortcut link:
1371
-
1372
- ```markdown
1373
- [https://www.example.com]
1374
- ```
1375
-
1376
- Note: The following syntax triggers this rule because the nested link could be
1377
- a shortcut link (which takes precedence):
1378
-
1379
- ```markdown
1380
- [text [shortcut] text](https://example.com)
1381
- ```
1382
-
1383
- To avoid this, escape both inner brackets:
1384
-
1385
- ```markdown
1386
- [link \[text\] link](https://example.com)
1387
- ```
1388
-
1389
- Rationale: Without angle brackets, a bare URL or email isn't converted into a
1390
- link by some Markdown parsers.
1391
-
1392
- <a name="md035"></a>
1393
-
1394
- ## `MD035` - Horizontal rule style
1395
-
1396
- Tags: `hr`
1397
-
1398
- Aliases: `hr-style`
1399
-
1400
- Parameters:
1401
-
1402
- - `style`: Horizontal rule style (`string`, default `consistent`)
1403
-
1404
- This rule is triggered when inconsistent styles of horizontal rules are used
1405
- in the document:
1406
-
1407
- ```markdown
1408
- ---
1409
-
1410
- - - -
1411
-
1412
- ***
1413
-
1414
- * * *
1415
-
1416
- ****
1417
- ```
1418
-
1419
- To fix this, ensure any horizontal rules used in the document are consistent,
1420
- or match the given style if the rule is so configured:
1421
-
1422
- ```markdown
1423
- ---
1424
-
1425
- ---
1426
- ```
1427
-
1428
- Note: by default, this rule is configured to just require that all horizontal
1429
- rules in the document are the same and will trigger if any of the horizontal
1430
- rules are different than the first one encountered in the document. If you
1431
- want to configure the rule to match a specific style, the parameter given to
1432
- the 'style' option is a string containing the exact horizontal rule text that
1433
- is allowed.
1434
-
1435
- Rationale: Consistent formatting makes it easier to understand a document.
1436
-
1437
- <a name="md036"></a>
1438
-
1439
- ## `MD036` - Emphasis used instead of a heading
1440
-
1441
- Tags: `emphasis`, `headings`
1442
-
1443
- Aliases: `no-emphasis-as-heading`
1444
-
1445
- Parameters:
1446
-
1447
- - `punctuation`: Punctuation characters (`string`, default `.,;:!?。,;:!?`)
1448
-
1449
- This check looks for instances where emphasized (i.e. bold or italic) text is
1450
- used to separate sections, where a heading should be used instead:
1451
-
1452
- ```markdown
1453
- **My document**
1454
-
1455
- Lorem ipsum dolor sit amet...
1456
-
1457
- _Another section_
1458
-
1459
- Consectetur adipiscing elit, sed do eiusmod.
1460
- ```
1461
-
1462
- To fix this, use Markdown headings instead of emphasized text to denote
1463
- sections:
1464
-
1465
- ```markdown
1466
- # My document
1467
-
1468
- Lorem ipsum dolor sit amet...
1469
-
1470
- ## Another section
1471
-
1472
- Consectetur adipiscing elit, sed do eiusmod.
1473
- ```
1474
-
1475
- Note: This rule looks for single-line paragraphs that consist entirely
1476
- of emphasized text. It won't fire on emphasis used within regular text,
1477
- multi-line emphasized paragraphs, or paragraphs ending in punctuation
1478
- (normal or full-width). Similarly to rule MD026, you can configure what
1479
- characters are recognized as punctuation.
1480
-
1481
- Rationale: Using emphasis instead of a heading prevents tools from inferring
1482
- the structure of a document. More information:
1483
- <https://cirosantilli.com/markdown-style-guide#emphasis-vs-headers>.
1484
-
1485
- <a name="md037"></a>
1486
-
1487
- ## `MD037` - Spaces inside emphasis markers
1488
-
1489
- Tags: `emphasis`, `whitespace`
1490
-
1491
- Aliases: `no-space-in-emphasis`
1492
-
1493
- Fixable: Some violations can be fixed by tooling
1494
-
1495
- This rule is triggered when emphasis markers (bold, italic) are used, but they
1496
- have spaces between the markers and the text:
1497
-
1498
- ```markdown
1499
- Here is some ** bold ** text.
1500
-
1501
- Here is some * italic * text.
1502
-
1503
- Here is some more __ bold __ text.
1504
-
1505
- Here is some more _ italic _ text.
1506
- ```
1507
-
1508
- To fix this, remove the spaces around the emphasis markers:
1509
-
1510
- ```markdown
1511
- Here is some **bold** text.
1512
-
1513
- Here is some *italic* text.
1514
-
1515
- Here is some more __bold__ text.
1516
-
1517
- Here is some more _italic_ text.
1518
- ```
1519
-
1520
- Rationale: Emphasis is only parsed as such when the asterisks/underscores
1521
- aren't surrounded by spaces. This rule attempts to detect where
1522
- they were surrounded by spaces, but it appears that emphasized text was
1523
- intended by the author.
1524
-
1525
- <a name="md038"></a>
1526
-
1527
- ## `MD038` - Spaces inside code span elements
1528
-
1529
- Tags: `code`, `whitespace`
1530
-
1531
- Aliases: `no-space-in-code`
1532
-
1533
- Fixable: Some violations can be fixed by tooling
1534
-
1535
- This rule is triggered for code span elements that have spaces adjacent to the
1536
- backticks:
1537
-
1538
- ```markdown
1539
- `some text `
1540
-
1541
- ` some text`
1542
- ```
1543
-
1544
- To fix this, remove any spaces adjacent to the backticks:
1545
-
1546
- ```markdown
1547
- `some text`
1548
- ```
1549
-
1550
- Note: A single leading and trailing space is allowed by the specification and
1551
- automatically trimmed (in order to allow for code spans that embed backticks):
1552
-
1553
- ```markdown
1554
- `` `backticks` ``
1555
- ```
1556
-
1557
- Note: A single leading or trailing space is allowed if used to separate code
1558
- span markers from an embedded backtick (though the space is not trimmed):
1559
-
1560
- ```markdown
1561
- `` ` embedded backtick``
1562
- ```
1563
-
1564
- Rationale: Violations of this rule are usually unintentional and may lead to
1565
- improperly-rendered content. If spaces beside backticks are intentional, this
1566
- rule can be disabled for that line or file.
1567
-
1568
- <a name="md039"></a>
1569
-
1570
- ## `MD039` - Spaces inside link text
1571
-
1572
- Tags: `links`, `whitespace`
1573
-
1574
- Aliases: `no-space-in-links`
1575
-
1576
- Fixable: Some violations can be fixed by tooling
1577
-
1578
- This rule is triggered on links that have spaces surrounding the link text:
1579
-
1580
- ```markdown
1581
- [ a link ](https://www.example.com/)
1582
- ```
1583
-
1584
- To fix this, remove the spaces surrounding the link text:
1585
-
1586
- ```markdown
1587
- [a link](https://www.example.com/)
1588
- ```
1589
-
1590
- Rationale: Consistent formatting makes it easier to understand a document.
1591
-
1592
- <a name="md040"></a>
1593
-
1594
- ## `MD040` - Fenced code blocks should have a language specified
1595
-
1596
- Tags: `code`, `language`
1597
-
1598
- Aliases: `fenced-code-language`
1599
-
1600
- Parameters:
1601
-
1602
- - `allowed_languages`: List of languages (`string[]`, default `[]`)
1603
- - `language_only`: Require language only (`boolean`, default `false`)
1604
-
1605
- This rule is triggered when fenced code blocks are used, but a language isn't
1606
- specified:
1607
-
1608
- ````markdown
1609
- ```
1610
- #!/bin/bash
1611
- echo Hello world
1612
- ```
1613
- ````
1614
-
1615
- To fix this, add a language specifier to the code block:
1616
-
1617
- ````markdown
1618
- ```bash
1619
- #!/bin/bash
1620
- echo Hello world
1621
- ```
1622
- ````
1623
-
1624
- To display a code block without syntax highlighting, use:
1625
-
1626
- ````markdown
1627
- ```text
1628
- Plain text in a code block
1629
- ```
1630
- ````
1631
-
1632
- You can configure the `allowed_languages` parameter to specify a list of
1633
- languages code blocks could use. Languages are case sensitive. The default value
1634
- is `[]` which means any language specifier is valid.
1635
-
1636
- You can prevent extra data from being present in the info string of fenced code
1637
- blocks. To do so, set the `language_only` parameter to `true`.
1638
-
1639
- <!-- markdownlint-disable-next-line no-space-in-code -->
1640
- Info strings with leading/trailing whitespace (ex: `js `) or other content (ex:
1641
- `ruby startline=3`) will trigger this rule.
1642
-
1643
- Rationale: Specifying a language improves content rendering by using the
1644
- correct syntax highlighting for code. More information:
1645
- <https://cirosantilli.com/markdown-style-guide#option-code-fenced>.
1646
-
1647
- <a name="md041"></a>
1648
-
1649
- ## `MD041` - First line in a file should be a top-level heading
1650
-
1651
- Tags: `headings`
1652
-
1653
- Aliases: `first-line-h1`, `first-line-heading`
1654
-
1655
- Parameters:
1656
-
1657
- - `front_matter_title`: RegExp for matching title in front matter (`string`,
1658
- default `^\s*title\s*[:=]`)
1659
- - `level`: Heading level (`integer`, default `1`)
1660
-
1661
- This rule is intended to ensure documents have a title and is triggered when
1662
- the first line in the file isn't a top-level (h1) heading:
1663
-
1664
- ```markdown
1665
- This is a file without a heading
1666
- ```
1667
-
1668
- To fix this, add a top-level heading to the beginning of the file:
1669
-
1670
- ```markdown
1671
- # File with heading
1672
-
1673
- This is a file with a top-level heading
1674
- ```
1675
-
1676
- Because it is common for projects on GitHub to use an image for the heading of
1677
- `README.md` and that is not well-supported by Markdown, HTML headings are also
1678
- permitted by this rule. For example:
1679
-
1680
- ```markdown
1681
- <h1 align="center"><img src="https://placekitten.com/300/150"/></h1>
1682
-
1683
- This is a file with a top-level HTML heading
1684
- ```
1685
-
1686
- Note: The `level` parameter can be used to change the top-level (ex: to h2) in
1687
- cases where an h1 is added externally.
1688
-
1689
- If [YAML](https://en.wikipedia.org/wiki/YAML) front matter is present and
1690
- contains a `title` property (commonly used with blog posts), this rule will not
1691
- report a violation. To use a different property name in the front matter,
1692
- specify the text of a regular expression via the `front_matter_title` parameter.
1693
- To disable the use of front matter by this rule, specify `""` for
1694
- `front_matter_title`.
1695
-
1696
- Rationale: The top-level heading often acts as the title of a document. More
1697
- information: <https://cirosantilli.com/markdown-style-guide#top-level-header>.
1698
-
1699
- <a name="md042"></a>
1700
-
1701
- ## `MD042` - No empty links
1702
-
1703
- Tags: `links`
1704
-
1705
- Aliases: `no-empty-links`
1706
-
1707
- This rule is triggered when an empty link is encountered:
1708
-
1709
- ```markdown
1710
- [an empty link]()
1711
- ```
1712
-
1713
- To fix the violation, provide a destination for the link:
1714
-
1715
- ```markdown
1716
- [a valid link](https://example.com/)
1717
- ```
1718
-
1719
- Empty fragments will trigger this rule:
1720
-
1721
- ```markdown
1722
- [an empty fragment](#)
1723
- ```
1724
-
1725
- But non-empty fragments will not:
1726
-
1727
- ```markdown
1728
- [a valid fragment](#fragment)
1729
- ```
1730
-
1731
- Rationale: Empty links do not lead anywhere and therefore don't function as
1732
- links.
1733
-
1734
- <a name="md043"></a>
1735
-
1736
- ## `MD043` - Required heading structure
1737
-
1738
- Tags: `headings`
1739
-
1740
- Aliases: `required-headings`
1741
-
1742
- Parameters:
1743
-
1744
- - `headings`: List of headings (`string[]`, default `[]`)
1745
- - `match_case`: Match case of headings (`boolean`, default `false`)
1746
-
1747
- This rule is triggered when the headings in a file do not match the array of
1748
- headings passed to the rule. It can be used to enforce a standard heading
1749
- structure for a set of files.
1750
-
1751
- To require exactly the following structure:
1752
-
1753
- ```markdown
1754
- # Head
1755
- ## Item
1756
- ### Detail
1757
- ```
1758
-
1759
- Set the `headings` parameter to:
1760
-
1761
- ```json
1762
- [
1763
- "# Head",
1764
- "## Item",
1765
- "### Detail"
1766
- ]
1767
- ```
1768
-
1769
- To allow optional headings as with the following structure:
1770
-
1771
- ```markdown
1772
- # Head
1773
- ## Item
1774
- ### Detail (optional)
1775
- ## Foot
1776
- ### Notes (optional)
1777
- ```
1778
-
1779
- Use the special value `"*"` meaning "zero or more unspecified headings" or the
1780
- special value `"+"` meaning "one or more unspecified headings" and set the
1781
- `headings` parameter to:
1782
-
1783
- ```json
1784
- [
1785
- "# Head",
1786
- "## Item",
1787
- "*",
1788
- "## Foot",
1789
- "*"
1790
- ]
1791
- ```
1792
-
1793
- When an error is detected, this rule outputs the line number of the first
1794
- problematic heading (otherwise, it outputs the last line number of the file).
1795
-
1796
- Note that while the `headings` parameter uses the "## Text" ATX heading style
1797
- for simplicity, a file may use any supported heading style.
1798
-
1799
- By default, the case of headings in the document is not required to match that
1800
- of `headings`. To require that case match exactly, set the `match_case`
1801
- parameter to `true`.
1802
-
1803
- Rationale: Projects may wish to enforce a consistent document structure across
1804
- a set of similar content.
1805
-
1806
- <a name="md044"></a>
1807
-
1808
- ## `MD044` - Proper names should have the correct capitalization
1809
-
1810
- Tags: `spelling`
1811
-
1812
- Aliases: `proper-names`
1813
-
1814
- Parameters:
1815
-
1816
- - `code_blocks`: Include code blocks (`boolean`, default `true`)
1817
- - `html_elements`: Include HTML elements (`boolean`, default `true`)
1818
- - `names`: List of proper names (`string[]`, default `[]`)
1819
-
1820
- Fixable: Some violations can be fixed by tooling
1821
-
1822
- This rule is triggered when any of the strings in the `names` array do not have
1823
- the specified capitalization. It can be used to enforce a standard letter case
1824
- for the names of projects and products.
1825
-
1826
- For example, the language "JavaScript" is usually written with both the 'J' and
1827
- 'S' capitalized - though sometimes the 's' or 'j' appear in lower-case. To
1828
- enforce the proper capitalization, specify the desired letter case in the
1829
- `names` array:
1830
-
1831
- ```json
1832
- [
1833
- "JavaScript"
1834
- ]
1835
- ```
1836
-
1837
- Sometimes a proper name is capitalized differently in certain contexts. In such
1838
- cases, add both forms to the `names` array:
1839
-
1840
- ```json
1841
- [
1842
- "GitHub",
1843
- "github.com"
1844
- ]
1845
- ```
1846
-
1847
- Set the `code_blocks` parameter to `false` to disable this rule for code blocks
1848
- and spans. Set the `html_elements` parameter to `false` to disable this rule
1849
- for HTML elements and attributes (such as when using a proper name as part of
1850
- a path for `a`/`href` or `img`/`src`).
1851
-
1852
- Rationale: Incorrect capitalization of proper names is usually a mistake.
1853
-
1854
- <a name="md045"></a>
1855
-
1856
- ## `MD045` - Images should have alternate text (alt text)
1857
-
1858
- Tags: `accessibility`, `images`
1859
-
1860
- Aliases: `no-alt-text`
1861
-
1862
- This rule is triggered when an image is missing alternate text (alt text)
1863
- information.
1864
-
1865
- Alternate text is commonly specified inline as:
1866
-
1867
- ```markdown
1868
- ![Alternate text](image.jpg)
1869
- ```
1870
-
1871
- Or with reference syntax as:
1872
-
1873
- ```markdown
1874
- ![Alternate text][ref]
1875
-
1876
- ...
1877
-
1878
- [ref]: image.jpg "Optional title"
1879
- ```
1880
-
1881
- Or with HTML as:
1882
-
1883
- ```html
1884
- <img src="image.jpg" alt="Alternate text" />
1885
- ```
1886
-
1887
- Guidance for writing alternate text is available from the [W3C][w3c],
1888
- [Wikipedia][wikipedia], and [other locations][phase2technology].
1889
-
1890
- Rationale: Alternate text is important for accessibility and describes the
1891
- content of an image for people who may not be able to see it.
1892
-
1893
- [phase2technology]: https://www.phase2technology.com/blog/no-more-excuses
1894
- [w3c]: https://www.w3.org/WAI/alt/
1895
- [wikipedia]: https://en.wikipedia.org/wiki/Alt_attribute
1896
-
1897
- <a name="md046"></a>
1898
-
1899
- ## `MD046` - Code block style
1900
-
1901
- Tags: `code`
1902
-
1903
- Aliases: `code-block-style`
1904
-
1905
- Parameters:
1906
-
1907
- - `style`: Block style (`string`, default `consistent`, values `consistent` /
1908
- `fenced` / `indented`)
1909
-
1910
- This rule is triggered when unwanted or different code block styles are used in
1911
- the same document.
1912
-
1913
- In the default configuration this rule reports a violation for the following
1914
- document:
1915
-
1916
- <!-- markdownlint-disable code-block-style -->
1917
-
1918
- Some text.
1919
-
1920
- # Indented code
1921
-
1922
- More text.
1923
-
1924
- ```ruby
1925
- # Fenced code
1926
- ```
1927
-
1928
- More text.
1929
-
1930
- <!-- markdownlint-restore -->
1931
-
1932
- To fix violations of this rule, use a consistent style (either indenting or code
1933
- fences).
1934
-
1935
- The specified style can be specific (`fenced`, `indented`) or simply require
1936
- that usage be consistent within the document (`consistent`).
1937
-
1938
- Rationale: Consistent formatting makes it easier to understand a document.
1939
-
1940
- <a name="md047"></a>
1941
-
1942
- ## `MD047` - Files should end with a single newline character
1943
-
1944
- Tags: `blank_lines`
1945
-
1946
- Aliases: `single-trailing-newline`
1947
-
1948
- Fixable: Some violations can be fixed by tooling
1949
-
1950
- This rule is triggered when there is not a single newline character at the end
1951
- of a file.
1952
-
1953
- An example that triggers the rule:
1954
-
1955
- ```markdown
1956
- # Heading
1957
-
1958
- This file ends without a newline.[EOF]
1959
- ```
1960
-
1961
- To fix the violation, add a newline character to the end of the file:
1962
-
1963
- ```markdown
1964
- # Heading
1965
-
1966
- This file ends with a newline.
1967
- [EOF]
1968
- ```
1969
-
1970
- Rationale: Some programs have trouble with files that do not end with a newline.
1971
-
1972
- More information: [What's the point in adding a new line to the end of a
1973
- file?][stack-exchange]
1974
-
1975
- [stack-exchange]: https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file
1976
-
1977
- <a name="md048"></a>
1978
-
1979
- ## `MD048` - Code fence style
1980
-
1981
- Tags: `code`
1982
-
1983
- Aliases: `code-fence-style`
1984
-
1985
- Parameters:
1986
-
1987
- - `style`: Code fence style (`string`, default `consistent`, values `backtick`
1988
- / `consistent` / `tilde`)
1989
-
1990
- This rule is triggered when the symbols used in the document for fenced code
1991
- blocks do not match the configured code fence style:
1992
-
1993
- ````markdown
1994
- ```ruby
1995
- # Fenced code
1996
- ```
1997
-
1998
- ~~~ruby
1999
- # Fenced code
2000
- ~~~
2001
- ````
2002
-
2003
- To fix this issue, use the configured code fence style throughout the
2004
- document:
2005
-
2006
- ````markdown
2007
- ```ruby
2008
- # Fenced code
2009
- ```
2010
-
2011
- ```ruby
2012
- # Fenced code
2013
- ```
2014
- ````
2015
-
2016
- The configured list style can be a specific symbol to use (backtick, tilde), or
2017
- can require that usage be consistent within the document.
2018
-
2019
- Rationale: Consistent formatting makes it easier to understand a document.
2020
-
2021
- <a name="md049"></a>
2022
-
2023
- ## `MD049` - Emphasis style
2024
-
2025
- Tags: `emphasis`
2026
-
2027
- Aliases: `emphasis-style`
2028
-
2029
- Parameters:
2030
-
2031
- - `style`: Emphasis style (`string`, default `consistent`, values `asterisk` /
2032
- `consistent` / `underscore`)
2033
-
2034
- Fixable: Some violations can be fixed by tooling
2035
-
2036
- This rule is triggered when the symbols used in the document for emphasis do not
2037
- match the configured emphasis style:
2038
-
2039
- ```markdown
2040
- *Text*
2041
- _Text_
2042
- ```
2043
-
2044
- To fix this issue, use the configured emphasis style throughout the document:
2045
-
2046
- ```markdown
2047
- *Text*
2048
- *Text*
2049
- ```
2050
-
2051
- The configured emphasis style can be a specific symbol to use ("asterisk",
2052
- "underscore"), or can require that usage be consistent within the document.
2053
-
2054
- Note: Emphasis within a word is restricted to "asterisk" in order to avoid
2055
- unwanted emphasis for words containing internal underscores like_this_one.
2056
-
2057
- Rationale: Consistent formatting makes it easier to understand a document.
2058
-
2059
- <a name="md050"></a>
2060
-
2061
- ## `MD050` - Strong style
2062
-
2063
- Tags: `emphasis`
2064
-
2065
- Aliases: `strong-style`
2066
-
2067
- Parameters:
2068
-
2069
- - `style`: Strong style (`string`, default `consistent`, values `asterisk` /
2070
- `consistent` / `underscore`)
2071
-
2072
- Fixable: Some violations can be fixed by tooling
2073
-
2074
- This rule is triggered when the symbols used in the document for strong do not
2075
- match the configured strong style:
2076
-
2077
- ```markdown
2078
- **Text**
2079
- __Text__
2080
- ```
2081
-
2082
- To fix this issue, use the configured strong style throughout the document:
2083
-
2084
- ```markdown
2085
- **Text**
2086
- **Text**
2087
- ```
2088
-
2089
- The configured strong style can be a specific symbol to use ("asterisk",
2090
- "underscore"), or can require that usage be consistent within the document.
2091
-
2092
- Note: Emphasis within a word is restricted to "asterisk" in order to avoid
2093
- unwanted emphasis for words containing internal underscores like_this_one.
2094
-
2095
- Rationale: Consistent formatting makes it easier to understand a document.
2096
-
2097
- <a name="md051"></a>
2098
-
2099
- ## `MD051` - Link fragments should be valid
2100
-
2101
- Tags: `links`
2102
-
2103
- Aliases: `link-fragments`
2104
-
2105
- Fixable: Some violations can be fixed by tooling
2106
-
2107
- This rule is triggered when a link fragment does not match any of the fragments
2108
- that are automatically generated for headings in a document:
2109
-
2110
- ```markdown
2111
- # Heading Name
2112
-
2113
- [Link](#fragment)
2114
- ```
2115
-
2116
- To fix this issue, change the link fragment to reference an existing heading's
2117
- generated name (see below):
2118
-
2119
- ```markdown
2120
- # Heading Name
2121
-
2122
- [Link](#heading-name)
2123
- ```
2124
-
2125
- Link fragments may be handled case-sensitively, so this rule requires fragments
2126
- to exactly match the [GitHub heading algorithm][github-heading-algorithm].
2127
- Therefore, the following example is reported as a violation:
2128
-
2129
- ```markdown
2130
- # Heading Name
2131
-
2132
- [Link](#Heading-Name)
2133
- ```
2134
-
2135
- Alternatively, some platforms allow the syntax `{#named-anchor}` to be used
2136
- within a heading to provide a specific name (consisting of only lower-case
2137
- letters, numbers, `-`, and `_`):
2138
-
2139
- ```markdown
2140
- # Heading Name {#custom-name}
2141
-
2142
- [Link](#custom-name)
2143
- ```
2144
-
2145
- Alternatively, any HTML tag with an `id` attribute or an `a` tag with a `name`
2146
- attribute can be used to define a fragment:
2147
-
2148
- ```markdown
2149
- <a id="bookmark"></a>
2150
-
2151
- [Link](#bookmark)
2152
- ```
2153
-
2154
- An `a` tag can be useful in scenarios where a heading is not appropriate or for
2155
- control over the text of the fragment identifier.
2156
-
2157
- This rule also recognizes the custom fragment syntax used by GitHub to highlight
2158
- [specific content in a document][github-linking-to-content].
2159
-
2160
- For example, this link to line 20:
2161
-
2162
- ```markdown
2163
- [Link](#L20)
2164
- ```
2165
-
2166
- And this link to content starting within line 19 running into line 21:
2167
-
2168
- ```markdown
2169
- [Link](#L19C5-L21C11)
2170
- ```
2171
-
2172
- Rationale: [GitHub section links][github-section-links] are created
2173
- automatically for every heading when Markdown content is displayed on GitHub.
2174
- This makes it easy to link directly to different sections within a document.
2175
- However, section links change if headings are renamed or removed. This rule
2176
- helps identify broken section links within a document.
2177
-
2178
- Section links are **not** part of the CommonMark specification. This rule
2179
- enforces the [GitHub heading algorithm][github-heading-algorithm] which is:
2180
- convert heading to lowercase, remove punctuation, convert spaces to dashes,
2181
- append an incrementing integer as needed for uniqueness.
2182
-
2183
- [github-section-links]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#section-links
2184
- [github-heading-algorithm]: https://github.com/gjtorikian/html-pipeline/blob/f13a1534cb650ba17af400d1acd3a22c28004c09/lib/html/pipeline/toc_filter.rb
2185
- [github-linking-to-content]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown#linking-to-markdown
2186
-
2187
- <a name="md052"></a>
2188
-
2189
- ## `MD052` - Reference links and images should use a label that is defined
2190
-
2191
- Tags: `images`, `links`
2192
-
2193
- Aliases: `reference-links-images`
2194
-
2195
- Parameters:
2196
-
2197
- - `shortcut_syntax`: Include shortcut syntax (`boolean`, default `false`)
2198
-
2199
- Links and images in Markdown can provide the link destination or image source
2200
- at the time of use or can define it elsewhere and use a label for reference.
2201
- The reference format is convenient for keeping paragraph text clutter-free
2202
- and makes it easy to reuse the same URL in multiple places.
2203
-
2204
- There are three kinds of reference links and images:
2205
-
2206
- ```markdown
2207
- Full: [text][label]
2208
- Collapsed: [label][]
2209
- Shortcut: [label]
2210
-
2211
- Full: ![text][image]
2212
- Collapsed: ![image][]
2213
- Shortcut: ![image]
2214
-
2215
- [label]: https://example.com/label
2216
- [image]: https://example.com/image
2217
- ```
2218
-
2219
- A link or image renders correctly when the corresponding label is defined, but
2220
- displays as text with brackets when the label is not present. By default, this
2221
- rule warns of undefined labels for "full" and "collapsed" reference syntax but
2222
- not for "shortcut" syntax because it is ambiguous.
2223
-
2224
- The text `[example]` could be a shortcut link or the text "example" in brackets,
2225
- so "shortcut" syntax is ignored by default. To include "shortcut" syntax, set
2226
- the `include_shortcut` parameter to `true`. Note that doing so produces warnings
2227
- for *all* text in the document that *could* be a shortcut. If bracketed text is
2228
- intentional, brackets can be escaped with the `\` character: `\[example\]`.
2229
-
2230
- <a name="md053"></a>
2231
-
2232
- ## `MD053` - Link and image reference definitions should be needed
2233
-
2234
- Tags: `images`, `links`
2235
-
2236
- Aliases: `link-image-reference-definitions`
2237
-
2238
- Parameters:
2239
-
2240
- - `ignored_definitions`: Ignored definitions (`string[]`, default `["//"]`)
2241
-
2242
- Fixable: Some violations can be fixed by tooling
2243
-
2244
- Links and images in Markdown can provide the link destination or image source
2245
- at the time of use or can use a label to reference a definition elsewhere in
2246
- the document. The latter reference format is convenient for keeping paragraph
2247
- text clutter-free and makes it easy to reuse the same URL in multiple places.
2248
-
2249
- Because link and image reference definitions are located separately from
2250
- where they are used, there are two scenarios where a definition can be
2251
- unnecessary:
2252
-
2253
- 1. If a label is not referenced by any link or image in a document, that
2254
- definition is unused and can be deleted.
2255
- 2. If a label is defined multiple times in a document, the first definition is
2256
- used and the others can be deleted.
2257
-
2258
- This rule considers a reference definition to be used if any link or image
2259
- reference has the corresponding label. The "full", "collapsed", and "shortcut"
2260
- formats are all supported.
2261
-
2262
- If there are reference definitions that are deliberately unreferenced, they can
2263
- be ignored by setting the `ignored_definitions` parameter. The default value of
2264
- this parameter ignores the following convention for adding non-HTML comments to
2265
- Markdown:
2266
-
2267
- ```markdown
2268
- [//]: # (This behaves like a comment)
2269
- ```
2270
-
2271
- <a name="md054"></a>
2272
-
2273
- ## `MD054` - Link and image style
2274
-
2275
- Tags: `images`, `links`
2276
-
2277
- Aliases: `link-image-style`
2278
-
2279
- Parameters:
2280
-
2281
- - `autolink`: Allow autolinks (`boolean`, default `true`)
2282
- - `collapsed`: Allow collapsed reference links and images (`boolean`, default
2283
- `true`)
2284
- - `full`: Allow full reference links and images (`boolean`, default `true`)
2285
- - `inline`: Allow inline links and images (`boolean`, default `true`)
2286
- - `shortcut`: Allow shortcut reference links and images (`boolean`, default
2287
- `true`)
2288
- - `url_inline`: Allow URLs as inline links (`boolean`, default `true`)
2289
-
2290
- Fixable: Some violations can be fixed by tooling
2291
-
2292
- Links and images in Markdown can provide the link destination or image source at
2293
- the time of use or can use a label to reference a definition elsewhere in the
2294
- document. The three reference formats are convenient for keeping paragraph text
2295
- clutter-free and make it easy to reuse the same URL in multiple places.
2296
-
2297
- By default, this rule allows all link/image styles.
2298
-
2299
- Setting the `autolink` parameter to `false` disables autolinks:
2300
-
2301
- ```markdown
2302
- <https://example.com>
2303
- ```
2304
-
2305
- Setting the `inline` parameter to `false` disables inline links and images:
2306
-
2307
- ```markdown
2308
- [link](https://example.com)
2309
-
2310
- ![image](https://example.com)
2311
- ```
2312
-
2313
- Setting the `full` parameter to `false` disables full reference links and
2314
- images:
2315
-
2316
- ```markdown
2317
- [link][url]
2318
-
2319
- ![image][url]
2320
-
2321
- [url]: https://example.com
2322
- ```
2323
-
2324
- Setting the `collapsed` parameter to `false` disables collapsed reference links
2325
- and images:
2326
-
2327
- ```markdown
2328
- [url][]
2329
-
2330
- ![url][]
2331
-
2332
- [url]: https://example.com
2333
- ```
2334
-
2335
- Setting the `shortcut` parameter to `false` disables shortcut reference links
2336
- and images:
2337
-
2338
- ```markdown
2339
- [url]
2340
-
2341
- ![url]
2342
-
2343
- [url]: https://example.com
2344
- ```
2345
-
2346
- To fix violations of this rule, change the link or image to use an allowed
2347
- style. This rule can automatically fix violations when a link or image can be
2348
- converted to the `inline` style (preferred) or a link can be converted to the
2349
- `autolink` style (which does not support images and must be an absolute URL).
2350
- This rule does *not* fix scenarios that require converting a link or image to
2351
- the `full`, `collapsed`, or `shortcut` reference styles because that involves
2352
- naming the reference and determining where to insert it in the document.
2353
-
2354
- Setting the `url_inline` parameter to `false` prevents the use of inline links
2355
- with the same absolute URL text/destination and no title because such links can
2356
- be converted to autolinks:
2357
-
2358
- ```markdown
2359
- [https://example.com](https://example.com)
2360
- ```
2361
-
2362
- To fix `url_inline` violations, use the simpler autolink syntax instead:
2363
-
2364
- ```markdown
2365
- <https://example.com>
2366
- ```
2367
-
2368
- Rationale: Consistent formatting makes it easier to understand a document.
2369
- Autolinks are concise, but appear as URLs which can be long and confusing.
2370
- Inline links and images can include descriptive text, but take up more space in
2371
- Markdown form. Reference links and images can be easier to read and manipulate
2372
- in Markdown form, but require a separate link reference definition.
2373
-
2374
- <a name="md055"></a>
2375
-
2376
- ## `MD055` - Table pipe style
2377
-
2378
- Tags: `table`
2379
-
2380
- Aliases: `table-pipe-style`
2381
-
2382
- Parameters:
2383
-
2384
- - `style`: Table pipe style (`string`, default `consistent`, values
2385
- `consistent` / `leading_and_trailing` / `leading_only` /
2386
- `no_leading_or_trailing` / `trailing_only`)
2387
-
2388
- This rule is triggered when a [GitHub Flavored Markdown table][gfm-table-055]
2389
- is inconsistent about its use of leading and trailing pipe characters (`|`).
2390
-
2391
- By default (`consistent` style), the header row of the first table in a document
2392
- is used to determine the style that is enforced for all tables in that document.
2393
- A specific style can be required by setting the `style` parameter accordingly.
2394
-
2395
- This table's header row has leading and trailing pipes, but its delimiter row is
2396
- missing the trailing pipe and its first row of cells is missing the leading
2397
- pipe:
2398
-
2399
- ```markdown
2400
- | Header | Header |
2401
- | ------ | ------
2402
- Cell | Cell |
2403
- ```
2404
-
2405
- To fix these issues, make sure there is a pipe character at the beginning and
2406
- end of every row:
2407
-
2408
- ```markdown
2409
- | Header | Header |
2410
- | ------ | ------ |
2411
- | Cell | Cell |
2412
- ```
2413
-
2414
- Note that text immediately following a table (i.e., not separated by an empty
2415
- line) is treated as part of the table (per the specification) and may also
2416
- trigger this rule:
2417
-
2418
- ```markdown
2419
- | Header | Header |
2420
- | ------ | ------ |
2421
- | Cell | Cell |
2422
- This text is part of the table
2423
- ```
2424
-
2425
- Rationale: Some parsers have difficulty with tables that are missing their
2426
- leading or trailing pipe characters. The use of leading/trailing pipes can also
2427
- help provide visual clarity.
2428
-
2429
- [gfm-table-055]: https://github.github.com/gfm/#tables-extension-
2430
-
2431
- <a name="md056"></a>
2432
-
2433
- ## `MD056` - Table column count
2434
-
2435
- Tags: `table`
2436
-
2437
- Aliases: `table-column-count`
2438
-
2439
- This rule is triggered when a [GitHub Flavored Markdown table][gfm-table-056]
2440
- does not have the same number of cells in every row.
2441
-
2442
- This table's second data row has too few cells and its third data row has too
2443
- many cells:
2444
-
2445
- ```markdown
2446
- | Header | Header |
2447
- | ------ | ------ |
2448
- | Cell | Cell |
2449
- | Cell |
2450
- | Cell | Cell | Cell |
2451
- ```
2452
-
2453
- To fix these issues, ensure every row has the same number of cells:
2454
-
2455
- ```markdown
2456
- | Header | Header |
2457
- | ------ | ------ |
2458
- | Cell | Cell |
2459
- | Cell | Cell |
2460
- | Cell | Cell |
2461
- ```
2462
-
2463
- Note that a table's header row and its delimiter row must have the same number
2464
- of cells or it will not be recognized as a table (per specification).
2465
-
2466
- Rationale: Extra cells in a row are usually not shown, so their data is lost.
2467
- Missing cells in a row create holes in the table and suggest an omission.
2468
-
2469
- [gfm-table-056]: https://github.github.com/gfm/#tables-extension-
2470
-
2471
- <a name="md058"></a>
2472
-
2473
- ## `MD058` - Tables should be surrounded by blank lines
2474
-
2475
- Tags: `table`
2476
-
2477
- Aliases: `blanks-around-tables`
2478
-
2479
- Fixable: Some violations can be fixed by tooling
2480
-
2481
- This rule is triggered when tables are either not preceded or not followed by a
2482
- blank line:
2483
-
2484
- ```markdown
2485
- Some text
2486
- | Header | Header |
2487
- | ------ | ------ |
2488
- | Cell | Cell |
2489
- > Blockquote
2490
- ```
2491
-
2492
- To fix violations of this rule, ensure that all tables have a blank line both
2493
- before and after (except when the table is at the very beginning or end of the
2494
- document):
2495
-
2496
- ```markdown
2497
- Some text
2498
-
2499
- | Header | Header |
2500
- | ------ | ------ |
2501
- | Cell | Cell |
2502
-
2503
- > Blockquote
2504
- ```
2505
-
2506
- Note that text immediately following a table (i.e., not separated by an empty
2507
- line) is treated as part of the table (per the specification) and will not
2508
- trigger this rule:
2509
-
2510
- ```markdown
2511
- | Header | Header |
2512
- | ------ | ------ |
2513
- | Cell | Cell |
2514
- This text is part of the table and the next line is blank
2515
-
2516
- Some text
2517
- ```
2518
-
2519
- Rationale: In addition to aesthetic reasons, some parsers will incorrectly parse
2520
- tables that don't have blank lines before and after them.
2521
-
2522
- <!-- markdownlint-configure-file {
2523
- "no-inline-html": {
2524
- "allowed_elements": [
2525
- "a"
2526
- ]
2527
- }
2528
- } -->