disallow-remark-duplicate-plugins
Disallow duplicate entries in top-level Remark plugins declarations.
Rule detailsโ
Duplicate Remark plugins make config intent ambiguous and can cause repeated transformers or duplicated diagnostics. This rule checks statically analyzable string plugin specifiers, including the first element of [plugin, options] tuples.
โ Incorrectโ
export default {
plugins: ["remark-gfm", ["remark-gfm", { singleTilde: false }]],
};
โ Correctโ
export default {
plugins: ["remark-gfm"],
};
Fixer behaviorโ
The fixer removes later duplicate entries while preserving the first occurrence.
When not to use itโ
Disable this rule if a config intentionally registers the same plugin more than once with different options.