lint-md is a core library for linting Chinese markdown files using AST-based rules. Version 0.2.0 is currently the latest and only version on npm. It provides lint, fix, and getDescription APIs, supporting over 17 rules covering spacing around Chinese/English, number formatting, empty content checks, and more. Rules can be configured with severity levels (ignore/warning/error) and options. Differentiator: focuses specifically on Chinese writing conventions, unlike generic markdown linting tools.
npm install lint-mdNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates lint, fix, and getDescription APIs with a simple markdown example.
Pass a rules object with rule names mapped to 0, 1, or 2.
Use [2, { length: 100, exclude: [] }] instead of { 2: {...} }.Pass string 'en_US' or 'zh_CN'.
Read file content first with fs.readFileSync().
Run 'npm install lint-md' and ensure import is from 'lint-md' (no subpath).
Use 'import { lint } from "lint-md"' instead of 'import lint from "lint-md"'.Use 'import { fix } from "lint-md"' if using ESM.No dependency data recorded yet.