{"library":"markdownlint","title":"markdownlint","description":"A Node.js style checker and lint tool for Markdown/CommonMark files. Current stable version is 0.40.0, released with a history of regular updates. It uses the micromark parser and honors the CommonMark specification, also supporting GFM syntax like autolinks and tables, as well as directives, footnotes, and math via micromark extensions. Unlike other Markdown linters, it provides a comprehensive library of rules and is designed for programmatic use in Node.js projects, with multiple CLI wrappers and editor integrations.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install markdownlint"],"cli":null},"imports":["import markdownlint from 'markdownlint'","import { lint } from 'markdownlint'","import type { LintResults } from 'markdownlint'","import { lintSync } from 'markdownlint'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { lint } from 'markdownlint';\nimport { readFileSync } from 'fs';\n\nconst options = {\n  strings: {\n    'example.md': readFileSync('example.md', 'utf8'),\n  },\n  config: {\n    default: true,\n    MD013: { line_length: 80 },\n  },\n};\n\nlint(options, (err, results) => {\n  if (err) {\n    console.error(err);\n    return;\n  }\n  for (const file in results) {\n    const errors = results[file];\n    errors.forEach((error) => {\n      console.log(`${file}:${error.lineNumber}: ${error.ruleName} - ${error.ruleDescription}`);\n    });\n  }\n});","lang":"typescript","description":"Lint a Markdown file with custom configuration and log errors.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}