markdownlint 0.25.1 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CONTRIBUTING.md +2 -0
  2. package/README.md +123 -83
  3. package/demo/markdownlint-browser.js +1716 -1269
  4. package/doc/Rules.md +133 -15
  5. package/helpers/helpers.js +427 -192
  6. package/helpers/package.json +4 -1
  7. package/lib/cache.js +15 -25
  8. package/lib/constants.js +1 -1
  9. package/lib/markdownlint.d.ts +21 -17
  10. package/lib/markdownlint.js +237 -146
  11. package/lib/md004.js +4 -4
  12. package/lib/md005.js +4 -4
  13. package/lib/md006.js +4 -4
  14. package/lib/md007.js +4 -4
  15. package/lib/md009.js +20 -13
  16. package/lib/md010.js +15 -2
  17. package/lib/md011.js +2 -2
  18. package/lib/md013.js +4 -5
  19. package/lib/md014.js +4 -4
  20. package/lib/md021.js +3 -1
  21. package/lib/md026.js +1 -1
  22. package/lib/md027.js +2 -2
  23. package/lib/md028.js +2 -2
  24. package/lib/md029.js +5 -4
  25. package/lib/md030.js +4 -4
  26. package/lib/md031.js +2 -2
  27. package/lib/md032.js +3 -2
  28. package/lib/md033.js +2 -3
  29. package/lib/md034.js +2 -2
  30. package/lib/md035.js +7 -2
  31. package/lib/md036.js +2 -2
  32. package/lib/md038.js +7 -4
  33. package/lib/md039.js +6 -4
  34. package/lib/md042.js +17 -10
  35. package/lib/md043.js +2 -2
  36. package/lib/md044.js +20 -9
  37. package/lib/md046.js +14 -13
  38. package/lib/md048.js +13 -14
  39. package/lib/md049-md050.js +73 -0
  40. package/lib/md051.js +84 -0
  41. package/lib/md052.js +35 -0
  42. package/lib/md053.js +52 -0
  43. package/lib/rules.js +6 -4
  44. package/package.json +19 -16
  45. package/schema/.markdownlint.jsonc +15 -2
  46. package/schema/.markdownlint.yaml +14 -1
  47. package/schema/markdownlint-config-schema.json +119 -737
  48. package/lib/md049.js +0 -45
  49. package/lib/md050.js +0 -45
package/lib/md044.js CHANGED
@@ -3,8 +3,10 @@
3
3
  "use strict";
4
4
 
5
5
  const { addErrorDetailIf, bareUrlRe, escapeForRegExp, forEachLine,
6
- overlapsAnyRange, linkRe, linkReferenceRe } = require("../helpers");
7
- const { codeBlockAndSpanRanges, lineMetadata } = require("./cache");
6
+ forEachLink, withinAnyRange, linkReferenceDefinitionRe } =
7
+ require("../helpers");
8
+ const { codeBlockAndSpanRanges, htmlElementRanges, lineMetadata } =
9
+ require("./cache");
8
10
 
9
11
  module.exports = {
10
12
  "names": [ "MD044", "proper-names" ],
@@ -15,29 +17,35 @@ module.exports = {
15
17
  names = Array.isArray(names) ? names : [];
16
18
  names.sort((a, b) => (b.length - a.length) || a.localeCompare(b));
17
19
  const codeBlocks = params.config.code_blocks;
18
- const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
20
+ const includeCodeBlocks =
21
+ (codeBlocks === undefined) ? true : !!codeBlocks;
22
+ const htmlElements = params.config.html_elements;
23
+ const includeHtmlElements =
24
+ (htmlElements === undefined) ? true : !!htmlElements;
19
25
  const exclusions = [];
20
26
  forEachLine(lineMetadata(), (line, lineIndex) => {
21
- if (linkReferenceRe.test(line)) {
27
+ if (linkReferenceDefinitionRe.test(line)) {
22
28
  exclusions.push([ lineIndex, 0, line.length ]);
23
29
  } else {
24
30
  let match = null;
25
31
  while ((match = bareUrlRe.exec(line)) !== null) {
26
32
  exclusions.push([ lineIndex, match.index, match[0].length ]);
27
33
  }
28
- while ((match = linkRe.exec(line)) !== null) {
29
- const [ , text, destination ] = match;
34
+ forEachLink(line, (index, _, text, destination) => {
30
35
  if (destination) {
31
36
  exclusions.push(
32
- [ lineIndex, match.index + text.length, destination.length ]
37
+ [ lineIndex, index + text.length, destination.length ]
33
38
  );
34
39
  }
35
- }
40
+ });
36
41
  }
37
42
  });
38
43
  if (!includeCodeBlocks) {
39
44
  exclusions.push(...codeBlockAndSpanRanges());
40
45
  }
46
+ if (!includeHtmlElements) {
47
+ exclusions.push(...htmlElementRanges());
48
+ }
41
49
  for (const name of names) {
42
50
  const escapedName = escapeForRegExp(name);
43
51
  const startNamePattern = /^\W/.test(name) ? "" : "\\b_*";
@@ -52,7 +60,10 @@ module.exports = {
52
60
  const [ , leftMatch, nameMatch ] = match;
53
61
  const index = match.index + leftMatch.length;
54
62
  const length = nameMatch.length;
55
- if (!overlapsAnyRange(exclusions, lineIndex, index, length)) {
63
+ if (
64
+ !withinAnyRange(exclusions, lineIndex, index, length) &&
65
+ !names.includes(nameMatch)
66
+ ) {
56
67
  addErrorDetailIf(
57
68
  onError,
58
69
  lineIndex + 1,
package/lib/md046.js CHANGED
@@ -15,18 +15,19 @@ module.exports = {
15
15
  "tags": [ "code" ],
16
16
  "function": function MD046(params, onError) {
17
17
  let expectedStyle = String(params.config.style || "consistent");
18
- params.tokens
19
- .filter((token) => token.type === "code_block" || token.type === "fence")
20
- .forEach((token) => {
21
- const { lineNumber, type } = token;
22
- if (expectedStyle === "consistent") {
23
- expectedStyle = tokenTypeToStyle[type];
24
- }
25
- addErrorDetailIf(
26
- onError,
27
- lineNumber,
28
- expectedStyle,
29
- tokenTypeToStyle[type]);
30
- });
18
+ const codeBlocksAndFences = params.tokens.filter(
19
+ (token) => (token.type === "code_block") || (token.type === "fence")
20
+ );
21
+ for (const token of codeBlocksAndFences) {
22
+ const { lineNumber, type } = token;
23
+ if (expectedStyle === "consistent") {
24
+ expectedStyle = tokenTypeToStyle[type];
25
+ }
26
+ addErrorDetailIf(
27
+ onError,
28
+ lineNumber,
29
+ expectedStyle,
30
+ tokenTypeToStyle[type]);
31
+ }
31
32
  }
32
33
  };
package/lib/md048.js CHANGED
@@ -11,19 +11,18 @@ module.exports = {
11
11
  "function": function MD048(params, onError) {
12
12
  const style = String(params.config.style || "consistent");
13
13
  let expectedStyle = style;
14
- params.tokens
15
- .filter((token) => token.type === "fence")
16
- .forEach((fenceToken) => {
17
- const { lineNumber, markup } = fenceToken;
18
- if (expectedStyle === "consistent") {
19
- expectedStyle = fencedCodeBlockStyleFor(markup);
20
- }
21
- addErrorDetailIf(
22
- onError,
23
- lineNumber,
24
- expectedStyle,
25
- fencedCodeBlockStyleFor(markup)
26
- );
27
- });
14
+ const fenceTokens = params.tokens.filter((token) => token.type === "fence");
15
+ for (const fenceToken of fenceTokens) {
16
+ const { lineNumber, markup } = fenceToken;
17
+ if (expectedStyle === "consistent") {
18
+ expectedStyle = fencedCodeBlockStyleFor(markup);
19
+ }
20
+ addErrorDetailIf(
21
+ onError,
22
+ lineNumber,
23
+ expectedStyle,
24
+ fencedCodeBlockStyleFor(markup)
25
+ );
26
+ }
28
27
  }
29
28
  };
@@ -0,0 +1,73 @@
1
+ // @ts-check
2
+
3
+ "use strict";
4
+
5
+ const { addError, emphasisOrStrongStyleFor, forEachInlineChild,
6
+ getNextChildToken, getRangeAndFixInfoIfFound } = require("../helpers");
7
+
8
+ const impl = (params, onError, tagPrefix, asterisk, underline, style) => {
9
+ let lastLineNumber = -1;
10
+ const instances = new Map();
11
+ forEachInlineChild(params, `${tagPrefix}_open`, (token, parent) => {
12
+ const { lineNumber, markup } = token;
13
+ const markupStyle = emphasisOrStrongStyleFor(markup);
14
+ if (style === "consistent") {
15
+ style = markupStyle;
16
+ }
17
+ if (style !== markupStyle) {
18
+ let rangeAndFixInfo = {};
19
+ const contentToken = getNextChildToken(
20
+ parent, token, "text", `${tagPrefix}_close`
21
+ );
22
+ if (contentToken) {
23
+ const { content } = contentToken;
24
+ const actual = `${markup}${content}${markup}`;
25
+ const expectedMarkup =
26
+ (style === "asterisk") ? asterisk : underline;
27
+ const expected = `${expectedMarkup}${content}${expectedMarkup}`;
28
+ if (lastLineNumber !== lineNumber) {
29
+ lastLineNumber = lineNumber;
30
+ instances.clear();
31
+ }
32
+ const instance = (instances.get(expected) || 0) + 1;
33
+ instances.set(expected, instance);
34
+ rangeAndFixInfo = getRangeAndFixInfoIfFound(
35
+ params.lines,
36
+ lineNumber - 1,
37
+ actual,
38
+ expected,
39
+ instance
40
+ );
41
+ }
42
+ addError(
43
+ onError,
44
+ lineNumber,
45
+ `Expected: ${style}; Actual: ${markupStyle}`,
46
+ null,
47
+ rangeAndFixInfo.range,
48
+ rangeAndFixInfo.fixInfo
49
+ );
50
+ }
51
+ });
52
+ };
53
+
54
+ module.exports = [
55
+ {
56
+ "names": [ "MD049", "emphasis-style" ],
57
+ "description": "Emphasis style should be consistent",
58
+ "tags": [ "emphasis" ],
59
+ "function": function MD049(params, onError) {
60
+ const style = String(params.config.style || "consistent");
61
+ return impl(params, onError, "em", "*", "_", style);
62
+ }
63
+ },
64
+ {
65
+ "names": [ "MD050", "strong-style" ],
66
+ "description": "Strong style should be consistent",
67
+ "tags": [ "emphasis" ],
68
+ "function": function MD050(params, onError) {
69
+ const style = String(params.config.style || "consistent");
70
+ return impl(params, onError, "strong", "**", "__", style);
71
+ }
72
+ }
73
+ ];
package/lib/md051.js ADDED
@@ -0,0 +1,84 @@
1
+ // @ts-check
2
+
3
+ "use strict";
4
+
5
+ const { addError, escapeForRegExp, filterTokens, forEachInlineChild,
6
+ forEachHeading, htmlElementRe } = require("../helpers");
7
+
8
+ // Regular expression for identifying HTML anchor names
9
+ const identifierRe = /(?:id|name)\s*=\s*['"]?([^'"\s>]+)/iu;
10
+
11
+ /**
12
+ * Converts a Markdown heading into an HTML fragment according to the rules
13
+ * used by GitHub.
14
+ *
15
+ * @param {Object} inline Inline token for heading.
16
+ * @returns {string} Fragment string for heading.
17
+ */
18
+ function convertHeadingToHTMLFragment(inline) {
19
+ const inlineText = inline.children.map((token) => token.content).join("");
20
+ return "#" + encodeURIComponent(
21
+ inlineText
22
+ .toLowerCase()
23
+ // RegExp source with Ruby's \p{Word} expanded into its General Categories
24
+ // eslint-disable-next-line max-len
25
+ // https://github.com/gjtorikian/html-pipeline/blob/main/lib/html/pipeline/toc_filter.rb
26
+ // https://ruby-doc.org/core-3.0.2/Regexp.html
27
+ .replace(
28
+ /[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,
29
+ ""
30
+ )
31
+ .replace(/ /gu, "-")
32
+ );
33
+ }
34
+
35
+ module.exports = {
36
+ "names": [ "MD051", "link-fragments" ],
37
+ "description": "Link fragments should be valid",
38
+ "tags": [ "links" ],
39
+ "function": function MD051(params, onError) {
40
+ const fragments = new Map();
41
+ // Process headings
42
+ forEachHeading(params, (heading, content, inline) => {
43
+ const fragment = convertHeadingToHTMLFragment(inline);
44
+ const count = fragments.get(fragment) || 0;
45
+ if (count) {
46
+ fragments.set(`${fragment}-${count}`, 0);
47
+ }
48
+ fragments.set(fragment, count + 1);
49
+ });
50
+ // Process HTML anchors
51
+ const processHtmlToken = (token) => {
52
+ let match = null;
53
+ while ((match = htmlElementRe.exec(token.content)) !== null) {
54
+ const [ tag, , element ] = match;
55
+ if (element.toLowerCase() === "a") {
56
+ const idMatch = identifierRe.exec(tag);
57
+ if (idMatch) {
58
+ fragments.set(`#${idMatch[1]}`, 0);
59
+ }
60
+ }
61
+ }
62
+ };
63
+ filterTokens(params, "html_block", processHtmlToken);
64
+ forEachInlineChild(params, "html_inline", processHtmlToken);
65
+ // Process link fragments
66
+ forEachInlineChild(params, "link_open", (token) => {
67
+ const { attrs, lineNumber, line } = token;
68
+ const href = attrs.find((attr) => attr[0] === "href");
69
+ const id = href && href[1];
70
+ if (id && (id.length > 1) && (id[0] === "#") && !fragments.has(id)) {
71
+ let context = id;
72
+ let range = null;
73
+ const match = line.match(
74
+ new RegExp(`\\[.*?\\]\\(${escapeForRegExp(context)}\\)`)
75
+ );
76
+ if (match) {
77
+ context = match[0];
78
+ range = [ match.index + 1, match[0].length ];
79
+ }
80
+ addError(onError, lineNumber, null, context, range);
81
+ }
82
+ });
83
+ }
84
+ };
package/lib/md052.js ADDED
@@ -0,0 +1,35 @@
1
+ // @ts-check
2
+
3
+ "use strict";
4
+
5
+ const { addError } = require("../helpers");
6
+ const { referenceLinkImageData } = require("./cache");
7
+
8
+ module.exports = {
9
+ "names": [ "MD052", "reference-links-images" ],
10
+ "description":
11
+ "Reference links and images should use a label that is defined",
12
+ "tags": [ "images", "links" ],
13
+ "function": function MD052(params, onError) {
14
+ const { lines } = params;
15
+ const { references, definitions } = referenceLinkImageData();
16
+ // Look for links/images that use an undefined link reference
17
+ for (const reference of references.entries()) {
18
+ const [ label, datas ] = reference;
19
+ if (!definitions.has(label)) {
20
+ for (const data of datas) {
21
+ const [ lineIndex, index, length ] = data;
22
+ // Context will be incomplete if reporting for a multi-line link
23
+ const context = lines[lineIndex].slice(index, index + length);
24
+ addError(
25
+ onError,
26
+ lineIndex + 1,
27
+ `Missing link or image reference definition: "${label}"`,
28
+ context,
29
+ [ index + 1, context.length ]
30
+ );
31
+ }
32
+ }
33
+ }
34
+ }
35
+ };
package/lib/md053.js ADDED
@@ -0,0 +1,52 @@
1
+ // @ts-check
2
+
3
+ "use strict";
4
+
5
+ const { addError, ellipsify, linkReferenceDefinitionRe } =
6
+ require("../helpers");
7
+ const { referenceLinkImageData } = require("./cache");
8
+
9
+ module.exports = {
10
+ "names": [ "MD053", "link-image-reference-definitions" ],
11
+ "description": "Link and image reference definitions should be needed",
12
+ "tags": [ "images", "links" ],
13
+ "function": function MD053(params, onError) {
14
+ const { lines } = params;
15
+ const { references, shortcuts, definitions, duplicateDefinitions } =
16
+ referenceLinkImageData();
17
+ const singleLineDefinition = (line) => (
18
+ line.replace(linkReferenceDefinitionRe, "").trim().length > 0
19
+ );
20
+ const deleteFixInfo = {
21
+ "deleteCount": -1
22
+ };
23
+ // Look for unused link references (unreferenced by any link/image)
24
+ for (const definition of definitions.entries()) {
25
+ const [ label, lineIndex ] = definition;
26
+ if (!references.has(label) && !shortcuts.has(label)) {
27
+ const line = lines[lineIndex];
28
+ addError(
29
+ onError,
30
+ lineIndex + 1,
31
+ `Unused link or image reference definition: "${label}"`,
32
+ ellipsify(line),
33
+ [ 1, line.length ],
34
+ singleLineDefinition(line) ? deleteFixInfo : 0
35
+ );
36
+ }
37
+ }
38
+ // Look for duplicate link references (defined more than once)
39
+ for (const duplicateDefinition of duplicateDefinitions) {
40
+ const [ label, lineIndex ] = duplicateDefinition;
41
+ const line = lines[lineIndex];
42
+ addError(
43
+ onError,
44
+ lineIndex + 1,
45
+ `Duplicate link or image reference definition: "${label}"`,
46
+ ellipsify(line),
47
+ [ 1, line.length ],
48
+ singleLineDefinition(line) ? deleteFixInfo : 0
49
+ );
50
+ }
51
+ }
52
+ };
package/lib/rules.js CHANGED
@@ -49,13 +49,15 @@ const rules = [
49
49
  require("./md046"),
50
50
  require("./md047"),
51
51
  require("./md048"),
52
- require("./md049"),
53
- require("./md050")
52
+ ...require("./md049-md050"),
53
+ require("./md051"),
54
+ require("./md052"),
55
+ require("./md053")
54
56
  ];
55
- rules.forEach((rule) => {
57
+ for (const rule of rules) {
56
58
  const name = rule.names[0].toLowerCase();
57
59
  // eslint-disable-next-line dot-notation
58
60
  rule["information"] =
59
61
  new URL(`${homepage}/blob/v${version}/doc/Rules.md#${name}`);
60
- });
62
+ }
61
63
  module.exports = rules;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "markdownlint",
3
- "version": "0.25.1",
3
+ "version": "0.26.0",
4
4
  "description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
5
+ "type": "commonjs",
5
6
  "main": "lib/markdownlint.js",
6
7
  "types": "lib/markdownlint.d.ts",
7
8
  "author": "David Anson (https://dlaa.me/)",
@@ -16,7 +17,7 @@
16
17
  "build-config": "npm run build-config-schema && npm run build-config-example",
17
18
  "build-config-example": "node schema/build-config-example.js",
18
19
  "build-config-schema": "node schema/build-config-schema.js",
19
- "build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && node scripts delete 'lib/{c,md,r}*.d.ts' 'helpers/*.d.ts'",
20
+ "build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --module commonjs --resolveJsonModule --target es2015 lib/markdownlint.js && node scripts delete 'lib/{c,md,r}*.d.ts' 'helpers/*.d.ts'",
20
21
  "build-demo": "node scripts copy node_modules/markdown-it/dist/markdown-it.min.js demo/markdown-it.min.js && cd demo && webpack --no-stats",
21
22
  "build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
22
23
  "ci": "npm-run-all --continue-on-error --parallel build-config lint serial-declaration-demo test-cover && git diff --exit-code",
@@ -41,37 +42,39 @@
41
42
  "test-cover": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 npm test",
42
43
  "test-declaration": "cd example/typescript && tsc && node type-check.js",
43
44
  "test-extra": "ava --timeout=5m test/markdownlint-test-extra-parse.js test/markdownlint-test-extra-type.js",
45
+ "update-snapshots": "ava --update-snapshots test/markdownlint-test-scenarios.js",
44
46
  "upgrade": "npx --yes npm-check-updates --upgrade"
45
47
  },
46
48
  "engines": {
47
- "node": ">=12"
49
+ "node": ">=14"
48
50
  },
49
51
  "dependencies": {
50
- "markdown-it": "12.3.2"
52
+ "markdown-it": "13.0.1"
51
53
  },
52
54
  "devDependencies": {
53
- "ava": "3.15.0",
54
- "c8": "7.10.0",
55
- "eslint": "8.5.0",
56
- "eslint-plugin-jsdoc": "37.4.0",
55
+ "ava": "4.3.0",
56
+ "c8": "7.11.3",
57
+ "eslint": "8.18.0",
58
+ "eslint-plugin-es": "4.1.0",
59
+ "eslint-plugin-jsdoc": "39.3.3",
57
60
  "eslint-plugin-node": "11.1.0",
58
- "eslint-plugin-unicorn": "39.0.0",
59
- "globby": "12.0.2",
61
+ "eslint-plugin-unicorn": "42.0.0",
62
+ "globby": "13.1.2",
60
63
  "js-yaml": "4.1.0",
61
64
  "markdown-it-for-inline": "0.1.1",
62
65
  "markdown-it-sub": "1.0.0",
63
66
  "markdown-it-sup": "1.0.0",
64
- "markdown-it-texmath": "0.9.7",
67
+ "markdown-it-texmath": "1.0.0",
65
68
  "markdownlint-rule-github-internal-links": "0.1.0",
66
- "markdownlint-rule-helpers": "0.15.0",
69
+ "markdownlint-rule-helpers": "0.16.0",
67
70
  "npm-run-all": "4.1.5",
68
71
  "strip-json-comments": "4.0.0",
69
72
  "toml": "3.0.0",
70
- "ts-loader": "9.2.6",
73
+ "ts-loader": "9.3.0",
71
74
  "tv4": "1.3.0",
72
- "typescript": "4.5.4",
73
- "webpack": "5.65.0",
74
- "webpack-cli": "4.9.1"
75
+ "typescript": "4.7.4",
76
+ "webpack": "5.73.0",
77
+ "webpack-cli": "4.10.0"
75
78
  },
76
79
  "keywords": [
77
80
  "markdown",
@@ -58,6 +58,8 @@
58
58
  "MD010": {
59
59
  // Include code blocks
60
60
  "code_blocks": true,
61
+ // Fenced code languages to ignore
62
+ "ignore_code_languages": [],
61
63
  // Number of spaces for each hard tab
62
64
  "spaces_per_tab": 1
63
65
  },
@@ -231,7 +233,9 @@
231
233
  // List of proper names
232
234
  "names": [],
233
235
  // Include code blocks
234
- "code_blocks": true
236
+ "code_blocks": true,
237
+ // Include HTML elements
238
+ "html_elements": true
235
239
  },
236
240
 
237
241
  // MD045/no-alt-text - Images should have alternate text (alt text)
@@ -262,5 +266,14 @@
262
266
  "MD050": {
263
267
  // Strong style should be consistent
264
268
  "style": "consistent"
265
- }
269
+ },
270
+
271
+ // MD051/link-fragments - Link fragments should be valid
272
+ "MD051": true,
273
+
274
+ // MD052/reference-links-images - Reference links and images should use a label that is defined
275
+ "MD052": true,
276
+
277
+ // MD053/link-image-reference-definitions - Link and image reference definitions should be needed
278
+ "MD053": true
266
279
  }
@@ -52,6 +52,8 @@ MD009:
52
52
  MD010:
53
53
  # Include code blocks
54
54
  code_blocks: true
55
+ # Fenced code languages to ignore
56
+ ignore_code_languages: []
55
57
  # Number of spaces for each hard tab
56
58
  spaces_per_tab: 1
57
59
 
@@ -211,6 +213,8 @@ MD044:
211
213
  names: []
212
214
  # Include code blocks
213
215
  code_blocks: true
216
+ # Include HTML elements
217
+ html_elements: true
214
218
 
215
219
  # MD045/no-alt-text - Images should have alternate text (alt text)
216
220
  MD045: true
@@ -236,4 +240,13 @@ MD049:
236
240
  # MD050/strong-style - Strong style should be consistent
237
241
  MD050:
238
242
  # Strong style should be consistent
239
- style: "consistent"
243
+ style: "consistent"
244
+
245
+ # MD051/link-fragments - Link fragments should be valid
246
+ MD051: true
247
+
248
+ # MD052/reference-links-images - Reference links and images should use a label that is defined
249
+ MD052: true
250
+
251
+ # MD053/link-image-reference-definitions - Link and image reference definitions should be needed
252
+ MD053: true