中文 markdown 格式校验 lint-md v0.0.6,支持 API 调用

  

lint-md

用于检查中文 markdown 编写格式规范的命令行工具,基于 AST 开发,且方便集成 ci;同时提供 API 方法调用。Cli tool to lint your markdown file for Chinese.

安装

npm i -g lint-md

使用

Usage: <lint-md> <files...> [options]

lint your markdown files

Options:
  -v, --version                  output the version number
  -c, --config [configure-file]  use the configure file, default .lintmdrc
  -h, --help                     output usage information

Example:

lint-md README.md Document.md

API 调用

import { lint, version } from 'lint-md';

const errors = lint(markdown, rules);

Then will get the errors of the markdown string.

基于 API 的 vscode 插件正在开发中!

猜你喜欢

转载自www.oschina.net/news/102685/lint-md-0-0-6-released