{"id":19832,"library":"eslint-plugin-md","title":"eslint-plugin-md","description":"An ESLint plugin for linting and fixing Markdown files using remark-lint under the hood. Version 1.0.19 is the latest stable release, with no regular release cadence. Unlike eslint-plugin-markdown (which only lints JavaScript inside markdown), eslint-plugin-md lints the markdown content itself, supporting style enforcement and integration with prettier. It provides a single ESLint rule 'md/remark' that wraps remark-lint rules, and requires a custom parser 'markdown-eslint-parser'.","status":"active","version":"1.0.19","language":"javascript","source_language":"en","source_url":"https://github.com/leo-buneev/eslint-plugin-md","tags":["javascript","markdown","md","eslint-markdown","eslint","eslintplugin","eslint-plugin"],"install":[{"cmd":"npm install eslint-plugin-md","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-md","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-md","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; required as a host for the plugin.","package":"eslint","optional":false},{"reason":"Underlying linting engine; used to enforce markdown style rules.","package":"remark-lint","optional":false}],"imports":[{"note":"Must include 'plugin:' prefix in extends array. This is a common ESLint plugin convention.","wrong":"module.exports = { extends: ['md/recommended'] }","symbol":"plugin","correct":"module.exports = { extends: ['plugin:md/recommended'] }"},{"note":"The rule name is 'md/remark' (with the plugin prefix as namespace). Just 'remark' won't work.","wrong":"module.exports = { rules: { remark: ['error', {}] } }","symbol":"rules (md/remark)","correct":"module.exports = { rules: { 'md/remark': ['error', { /* remark options */ }] } }"},{"note":"Parser must be specified inside an override for markdown files only, not globally, to avoid conflicts with JS files.","wrong":"module.exports = { parser: 'markdown-eslint-parser' }","symbol":"parser","correct":"module.exports = { overrides: [{ files: ['*.md'], parser: 'markdown-eslint-parser' }] }"}],"quickstart":{"code":"// Install dependencies\nnpm install eslint eslint-plugin-md markdown-eslint-parser --save-dev\n\n// .eslintrc.js\nmodule.exports = {\n  extends: ['plugin:md/recommended'],\n  overrides: [\n    {\n      files: ['*.md'],\n      parser: 'markdown-eslint-parser',\n    },\n  ],\n};\n\n// Lint markdown files (CLI)\neslint . --ext js,md","lang":"javascript","description":"Minimal setup to lint markdown files with default remark rules using eslint-plugin-md."},"warnings":[{"fix":"Add --ext js,md to eslint command or set eslint.validate to ['markdown'] in VSCode settings.","message":"By default ESLint does not lint .md files; must use --ext js,md on CLI or configure VSCode.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use overrides with files: ['*.md'] and parser: 'markdown-eslint-parser' inside that override.","message":"Parser 'markdown-eslint-parser' must be set in an overrides section for '*.md' files only, not globally.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Configure rule as 'md/remark': ['error', { /* remark options */ }].","message":"The plugin exports a single rule 'md/remark'; custom remark options are passed as second argument to that rule.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add an override for files: ['*.md.js'] to apply different rules for JS snippets inside markdown.","message":"JS code within fenced code blocks in .md files is linted with the same base ESLint config unless overridden.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install eslint-plugin-md --save-dev and ensure extends includes 'plugin:md/recommended'.","cause":"Plugin not installed or not loaded correctly in ESLint config.","error":"ESLint couldn't find the plugin \"eslint-plugin-md\"."},{"fix":"Set rule as 'md/remark': ['error', { /* options */ }] (array with two elements).","cause":"Rule configuration passed incorrectly (maybe extra array nesting).","error":"Configuration for rule \"md/remark\" is invalid: Value \"[object Object]\" is not a valid severity."},{"fix":"Run npm install markdown-eslint-parser --save-dev.","cause":"markdown-eslint-parser not installed.","error":"Error: Cannot find module 'markdown-eslint-parser'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}