Skip to main content

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.