no-empty-config-link-labels
Disallow empty label 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 label properties whose static string value is empty or whitespace-only.
Why this rule existsโ
Empty link labels usually come from copy/paste or unfinished configuration and make navigation harder to understand.
โ Incorrectโ
export default {
themeConfig: {
navbar: {
items: [{ label: "", to: "/docs/intro" }],
},
},
};
โ Correctโ
export default {
themeConfig: {
navbar: {
items: [{ label: "Docs", to: "/docs/intro" }],
},
},
};
Behavior and migration notesโ
When html already provides visible content, this rule autofixes by removing the empty label property.
When not to use itโ
Do not use this rule if empty labels are intentionally used as placeholders for a later transform step.
Rule catalog ID: R084