Skip to main content

prefer-remark-plugins-array

Prefer array form for top-level Remark plugins declarations.

Rule detailsโ€‹

Remark configs grow over time. Keeping plugins as an array makes plugin order explicit, avoids one-off string forms, and keeps future additions as small diffs.

โŒ Incorrectโ€‹

export default {
plugins: "remark-gfm",
};

โœ… Correctโ€‹

export default {
plugins: ["remark-gfm"],
};

Fixer behaviorโ€‹

The fixer wraps a string literal plugins value in an array.

When not to use itโ€‹

Disable this rule only for generated Remark config files where another tool owns the exact output shape.