Skip to main content

no-empty-footer-link-items

Disallow empty footer link item objects inside static footer column items arrays.

Targeted pattern scopeโ€‹

This rule targets docusaurus.config.* files and inspects footer link item objects inside themeConfig.footer.links[*].items.

What this rule reportsโ€‹

This rule reports empty footer link item objects such as {} that do not contribute any content or destination.

Why this rule existsโ€‹

Empty footer link items add noise and usually come from unfinished or copied configuration.

โŒ Incorrectโ€‹

export default {
themeConfig: {
footer: {
links: [
{
title: "Docs",
items: [{}, { label: "Overview", to: "/docs" }],
},
],
},
},
};

โœ… Correctโ€‹

export default {
themeConfig: {
footer: {
links: [
{
title: "Docs",
items: [{ label: "Overview", to: "/docs" }],
},
],
},
},
};

Behavior and migration notesโ€‹

This rule autofixes by removing empty footer link item objects from static footer arrays.

When not to use itโ€‹

Do not use this rule if your footer items intentionally use placeholder objects for later runtime population.

Rule catalog ID: R074

Further readingโ€‹