open-md-checker
raw JSON → 1.2.3 verified Fri May 01 auth: no javascript
Open-md-checker is an open-source, extensible markdown linting tool available as a global npm module (v1.2.3). It checks markdown files for formatting issues using configurable rules from the remark-lint ecosystem. Key differentiators include support for custom rule files, integration with .gitignore, configuration via package.json or environment variables, and optional Docker usage. It offers a flexible Config interface with patterns and options for ignoring files. The tool is stable but has limited recent updates compared to alternatives like markdownlint.
Common errors
error Error: Config file not found ↓
cause The MD_LINT_CONFIG_PATH points to a non-existent or invalid file.
fix
Export the correct path: export MD_LINT_CONFIG_PATH=./valid-config.json
error Error: Cannot find module 'remark-lint-final-newline' ↓
cause Custom rules require module installed; missing in node_modules or dependencies.
fix
Install the required lint rule: npm install remark-lint-final-newline
Warnings
gotcha Configuration must be placed under 'open-md-checker' key in package.json; reading from a plain config file requires MD_LINT_CONFIG_PATH environment variable. ↓
fix Use the correct structure: { 'open-md-checker': { patterns: ['**/*.md'], options: {} } }
gotcha Custom rules via 'requires' field must be in a CommonJS module (module.exports = [...]); relative paths are resolved from cwd. ↓
fix Use absolute paths or ensure the file exports an array of remark-lint rules.
deprecated The package is stable but not actively developed; newer alternatives like markdownlint-cli2 exist. ↓
fix Consider migrating to markdownlint-cli2 for more features and active maintenance.
Install
npm install open-md-checker yarn add open-md-checker pnpm add open-md-checker Imports
- CLI wrong
open-md-checkercorrectnpx open-md-checker - Config
import type { Config } from 'open-md-checker' - default configuration wrong
import defaults from 'open-md-checker'correctconst config = require('open-md-checker/defaults');
Quickstart
# Install globally
npm install -g open-md-checker
# Create a markdown file with issues
echo '## Title' > test.md
# Run the linter
open-md-checker
# Or use configuration via environment
MD_LINT_CONFIG_PATH=./open-md-checker.json open-md-checker