{"id":25922,"library":"markdownlint-obsidian-cli","title":"markdownlint-obsidian-cli","description":"Command-line interface for linting Obsidian Flavored Markdown (OFM) using markdownlint-obsidian rules. Version 1.0.4 wraps the markdownlint-obsidian library with a commander-based CLI. Released under MIT license, with recent fixes disabling the MD028 rule by default to avoid false positives on multi-paragraph callouts. Supports --fix, --fix-check, multiple output formatters (SARIF, JUnit), and custom config. Requires Node >=20 or Bun >=1.1.30. Key differentiator: provides CLI access to OFM-specific rules not available in generic markdownlint.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/alisonaquinas/markdownlint-obsidian","tags":["javascript","markdown","markdownlint","obsidian","linter","cli"],"install":[{"cmd":"npm install markdownlint-obsidian-cli","lang":"bash","label":"npm"},{"cmd":"yarn add markdownlint-obsidian-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add markdownlint-obsidian-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core linting library for OFM rules","package":"markdownlint-obsidian","optional":false}],"imports":[{"note":"This is a CLI tool, not a library. Do not import it as a Node.js module.","wrong":"require('markdownlint-obsidian-cli')","symbol":"cli entry point","correct":"npx markdownlint-obsidian \"**/*.md\""},{"note":"markdownlint-obsidian is the library, not the CLI. Use -cli suffix for the CLI.","wrong":"npm install -g markdownlint-obsidian","symbol":"global install","correct":"npm install -g markdownlint-obsidian-cli"},{"note":"Install as devDependency and use via npx or bunx.","wrong":"npm install -D markdownlint-obsidian","symbol":"project install","correct":"npm install -D markdownlint-obsidian-cli"}],"quickstart":{"code":"npx markdownlint-obsidian --fix \"src/**/*.md\"\n# Exit code 0 = clean, 1 = errors, 2 = tool failure","lang":"bash","description":"Lint all markdown files in 'src' directory with auto-fix enabled."},"warnings":[{"fix":"If you need MD028, enable it in your config file explicitly.","message":"MD028 rule disabled by default since v1.0.2 for markdownlint-obsidian and v1.0.8 for CLI. Blank > lines are required in OFM callouts; enabling MD028 causes false positives.","severity":"breaking","affected_versions":">=1.0.2"},{"fix":"Use --output-formatter to capture all issues, or rely on exit code only for errors.","message":"The CLI exits with code 0 even if warnings are present. Only errors cause exit code 1.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use v1.0.4 or later.","message":"v0.x releases were smoke tests and are not real releases. They may have missing dependencies or broken Docker builds.","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Upgrade Node.js to 20+ or use Bun 1.1.30+.","message":"Node.js >=20.0.0 or Bun >=1.1.30 is required. Older runtimes will fail with a syntax error.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pass --config path/to/.markdownlint.json explicitly.","message":"The CLI does not load .markdownlint.json or .markdownlint.yaml automatically. Use --config to specify a config file.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you run 'npm install -g markdownlint-obsidian-cli' or use 'npx markdownlint-obsidian-cli'.","cause":"Package not installed or not in PATH when using global install without -g flag.","error":"Error: Cannot find module 'markdownlint-obsidian-cli'"},{"fix":"Add 'MD028': false to your config or remove it; the rule is not needed for OFM.","cause":"You have enabled MD028 in config, but it is disabled by default in this CLI version.","error":"Error: Unknown rule 'MD028'"},{"fix":"Upgrade Node.js to version 20 or later, or switch to Bun >=1.1.30.","cause":"You are using an older version of Node.js.","error":"Error: Requires Node.js >=20.0.0"},{"fix":"Use quotes around the glob pattern, e.g., \"**/*.md\".","cause":"Glob pattern is not quoted or does not match any files.","error":"Error: No files matched the pattern"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}