{"id":19828,"library":"eslint-plugin-markdownlint","title":"eslint-plugin-markdownlint","description":"ESLint plugin that integrates markdownlint (v0.9.0) as ESLint rules for linting Markdown files. It uses a custom parser to parse Markdown and applies markdownlint rules (mdXXX codes) within ESLint. The plugin supports both flat configs (ESLint >=9) and legacy .eslintrc overrides. It is actively maintained with monthly releases, but has known limitations: no support for .mdlrc config files or rule aliases (only mdXXX codes), and no plans for tag-based rule selection. It requires ESLint >=7.5.0 as a peer dependency.","status":"active","version":"0.9.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","eslint","eslint-markdown","eslintplugin","eslint-plugin","lint","linter","md","markdown"],"install":[{"cmd":"npm install eslint-plugin-markdownlint","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-markdownlint","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-markdownlint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM import is required for flat configs. CommonJS require works in legacy configs but not recommended.","wrong":"const markdownlintPlugin = require('eslint-plugin-markdownlint')","symbol":"markdownlintPlugin","correct":"import markdownlintPlugin from 'eslint-plugin-markdownlint'"},{"note":"The parser is a separate export at the /parser subpath. Do not import it from the main entry.","wrong":"import markdownlintParser from 'eslint-plugin-markdownlint'","symbol":"markdownlintParser","correct":"import markdownlintParser from 'eslint-plugin-markdownlint/parser'"},{"note":"In legacy .eslintrc, use the plugin prefix 'plugin:markdownlint/recommended', not the full npm package name.","wrong":"extends: ['eslint-plugin-markdownlint/recommended']","symbol":"plugin:markdownlint/recommended","correct":"extends: ['plugin:markdownlint/recommended']"}],"quickstart":{"code":"// Install: npm install eslint-plugin-markdownlint --save-dev\n\n// eslint.config.js (flat config, ESLint >=9)\nimport markdownlintPlugin from 'eslint-plugin-markdownlint';\nimport markdownlintParser from 'eslint-plugin-markdownlint/parser';\n\nexport default [\n  {\n    files: ['**/*.md'],\n    plugins: {\n      markdownlint: markdownlintPlugin\n    },\n    languageOptions: {\n      parser: markdownlintParser\n    },\n    rules: {\n      ...markdownlintPlugin.configs.recommended.rules\n    }\n  }\n];\n\n// Legacy .eslintrc.json\n{\n  \"overrides\": [{\n    \"files\": [\"*.md\"],\n    \"parser\": \"eslint-plugin-markdownlint/parser\",\n    \"extends\": [\"plugin:markdownlint/recommended\"]\n  }]\n}","lang":"javascript","description":"Shows how to set up eslint-plugin-markdownlint with flat config (ESLint >=9) and legacy .eslintrc."},"warnings":[{"fix":"Use `import` syntax and ensure package.json has \\\"type\\\": \\\"module\\\" or use .mjs extension.","message":"Flat config (ESLint >=9) requires ES module imports; CommonJS require will not work in eslint.config.js.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Migrate to eslint.config.js flat config.","message":"Legacy .eslintrc config format is deprecated in ESLint >=9. Future versions may drop support.","severity":"deprecated","affected_versions":">=0.5.0"},{"fix":"Use rule codes like \\\"md010\\\" instead of descriptive names.","message":"Rule aliases (e.g., 'no-hard-tabs' for md010) are not supported. Only mdXXX codes work.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Configure all markdownlint rules in ESLint's rules section.","message":"External config files (.mdlrc, .markdownlintrc) are not supported. All configuration must be done via ESLint rules.","severity":"gotcha","affected_versions":">=0.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-markdownlint --save-dev` to install the plugin and its parser.","cause":"Missing required peer dependency or incorrect installation.","error":"ESLint: Error: Failed to load parser 'eslint-plugin-markdownlint/parser' declared in 'parser' field: Module not found"},{"fix":"Ensure the package is installed and import path is correct: import from 'eslint-plugin-markdownlint/parser'.","cause":"Import path for parser is incorrect or module is not installed.","error":"Error: Cannot find module 'eslint-plugin-markdownlint/parser'"},{"fix":"Check markdownlint rule documentation for the correct option structure, e.g., \\\"md001\\\": [\\\"error\\\", { properties... }].","cause":"Rule configuration format is incorrect; markdownlint rules expect specific options.","error":"Configuration for rule 'markdownlint/md001' is invalid: Expected object with optional properties 'level', 'arguments', ..."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}