disallow-remark-relative-plugin-paths
Disallow relative path entries in top-level Remark plugins declarations.
Rule detailsโ
Shared Remark configs should depend on package-backed plugin specifiers. Relative plugin paths make configs harder to publish and reuse because the target file must exist at the same relative path in every consumer. This rule checks direct string entries and the first element of [plugin, options] tuples.
โ Incorrectโ
export default {
plugins: [["./local-remark-plugin.mjs", {}]],
};
โ Correctโ
export default {
plugins: ["remark-gfm"],
};
When not to use itโ
Disable this rule for private application configs that intentionally load local project-only Remark plugins.