remark-preset-prettier is a unified/remark preset that disables all remark-lint rules which are unnecessary or might conflict with Prettier formatting. Version 2.0.2 is the latest stable release, with a release cadence of patch updates as needed. It ships TypeScript types and requires Node >=14.8. Differentiators: pure ESM via top-level await (since v2), extensive list of disabled plugins (36+), and integration with ESLint or remark-cli. Alternatives require manual configuration to disable each conflicting rule.
npm install remark-preset-prettierVerified import paths — ran on the pinned version, not inferred.
Shows how to configure remark-preset-prettier in a .remarkrc.mjs file and run it with remark-cli to lint Markdown files with Prettier-friendly rules.
Migrate to ESM: use import or .mjs extension for config file. If stuck on CJS, use v1.x (<=1.0.2).
Use prettier >=2.0.0 for best compatibility.
Install remark-lint and have it in your remark plugins list.
Use .remarkrc.mjs or .remarkrc.js if package.json has type:module.
Consult the README's section on remark-retext issue.
npm install -D remark-preset-prettier
Use import remarkPresetPrettier from 'remark-preset-prettier'
Switch to import() or use v1.x. For dynamic import: const remarkPresetPrettier = await import('remark-preset-prettier');Set package.json type:module or rename file to .mjs.