remark preset to lint Markdown for MkDocs Material

raw JSON →
0.7.0 verified Fri May 01 auth: no javascript

This preset configures remark-lint with rules that enforce the markdown style guide for MkDocs Material. Version 0.7.0 is the latest stable release. It is maintained by the community and provides a curated set of lint rules consistent with MkDocs Material's documentation style, such as heading levels, lists, and code blocks. It ships TypeScript types. Development appears intermittent with no fixed release cadence.

error Cannot find module 'remark-preset-lint-mkdocs-material'
cause Package not installed or not in node_modules.
fix
Run npm install remark-preset-lint-mkdocs-material.
error Unexpected token 'export'
cause Using CommonJS require with an ESM-only package.
fix
Use import syntax and ensure you are in an ESM context (e.g., .mjs file or "type": "module" in package.json).
error Unable to load preset 'remark-preset-lint-mkdocs-material'
cause The preset is not in the plugin list correctly.
fix
Check .remarkrc.js or .remarkrc configuration: plugin should be either string or object with options.
gotcha The preset may include rules that conflict with other remark presets if used together.
fix Use only one preset at a time, or carefully merge configurations.
gotcha The preset expects MkDocs Material flavored Markdown; may not be suitable for other documentation generators.
fix Consider using generic remark-preset-lint-recommended for other environments.
deprecated Some lint rules may be deprecated in future versions of remark-lint.
fix Stay updated with remark-lint changelog and update preset rules accordingly.
npm install remark-preset-lint-mkdocs-material
yarn add remark-preset-lint-mkdocs-material
pnpm add remark-preset-lint-mkdocs-material

Shows how to install and configure the preset in a .remarkrc.js file, and also how to use it via CLI.

// Install dependencies:
// npm install remark-cli remark-preset-lint-mkdocs-material

// .remarkrc.js
import preset from 'remark-preset-lint-mkdocs-material';
export default {
  plugins: [
    preset
  ]
};

// Or CLI usage:
// npx remark . --use remark-preset-lint-mkdocs-material