no-conflicting-theme-config-metadata-keys
Disallow themeConfig.metadata entries from declaring both name and property.
Targeted pattern scopeโ
This rule targets docusaurus.config.* files and inspects themeConfig.metadata object entries.
What this rule reportsโ
This rule reports metadata entries that declare both name and property keys at the same time.
Why this rule existsโ
Docusaurus metadata entries should describe either a name-based tag or a property-based tag. Declaring both makes the entry ambiguous and harder to review.
โ Incorrectโ
export default {
themeConfig: {
metadata: [
{
name: "keywords",
property: "og:keywords",
content: "docs",
},
],
},
};
โ Correctโ
export default {
themeConfig: {
metadata: [{ name: "keywords", content: "docs" }],
},
};
Behavior and migration notesโ
This rule reports and provides suggestions to remove either name or property, letting authors preserve the intended metadata style.
When not to use itโ
Do not use this rule if your metadata objects are intentionally authored with both keys for later custom transformation.
Rule catalog ID: R064