no-empty-config-link-destinations
Disallow empty href or to values on Docusaurus theme-config link items.
Targeted pattern scopeโ
This rule targets docusaurus.config.* files and inspects default Docusaurus theme-config link items in navbar and footer arrays.
What this rule reportsโ
This rule reports href or to properties whose static string value is empty or whitespace-only.
Why this rule existsโ
Empty destinations are almost always mistakes and make link objects misleading or invalid.
โ Incorrectโ
export default {
themeConfig: {
navbar: {
items: [{ label: "Docs", href: "", to: "/docs/intro" }],
},
},
};
โ Correctโ
export default {
themeConfig: {
navbar: {
items: [{ label: "Docs", to: "/docs/intro" }],
},
},
};
Behavior and migration notesโ
When another destination or footer html content already makes the item meaningful, this rule autofixes by removing the empty destination property.
When not to use itโ
Do not use this rule if empty destination strings are intentionally used as placeholders for a later transform step.
Rule catalog ID: R085