Skip to content

labelReferenceValidity

Reports invalid label references with whitespace.

✅ This rule is included in the md logical preset.

CommonMark’s shorthand label reference syntax ([label][]) does not allow whitespace between the brackets. When whitespace is present, CommonMark-compliant renderers will not treat this as a link reference. While GitHub may render this correctly, relying on this behavior could result in errors when using other Markdown processors.

[eslint][ ]
[eslint][ ]
[link][ ]

If you publish your Markdown exclusively on GitHub and don’t need compatibility with other CommonMark-compliant renderers, you can safely disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.