Disallow missing label references.
Markdown allows you to specify a label as a placeholder for a URL in both links and images using square brackets, such as:
[ESLint][eslint]
[eslint]: https://eslint.orgIf the label is never defined, then Markdown doesn't render a link and instead renders plain text.
This rule warns when it finds text that looks like it's a label but the label reference doesn't exist.
Examples of incorrect code for this rule:
<!-- eslint markdown/no-missing-label-refs: "error" -->
[ESLint][eslint]
[eslint][]
[eslint]The following options are available on this rule:
allowLabels: Array<string>- labels to allow when checking for missing label references. (default:[])
Examples of correct code when configured as "no-missing-label-refs": ["error", { allowLabels: ["eslint"] }]:
<!-- eslint markdown/no-missing-label-refs: ["error", { allowLabels: ["eslint"] }] -->
[ESLint][eslint]
[eslint][]
[eslint]If you aren't concerned with missing label references, you can safely disable this rule.