中文 markdown 格式校验 lint-md v0.1.0,支持 --fix 参数

栏目: 软件资讯 · 发布时间: 5年前

内容简介:用于检查中文 markdown 编写格式规范的命令行工具,基于 AST 开发,且方便集成 ci;同时提供 API 方法调用。Cli tool to lint your markdown file for Chinese. 安装 npm i -g lint-md 使用 Usage: <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
  -f, --fix                      fix the errors automatically
  -h, --help                     output usage information
  • 校验 lint

lint-md README.md Document.md
  • 修复 fix

lint-md README.md Document.md --fix

API 调用

import { lint, fix, getDescription } from 'lint-md';

// get the markdown 's style errors
const errors = lint(markdown, rules);

// get the error type description
const describe = getDescription(type[, lang = 'en_US']);

// fix the markdown
const fixed = fix(markdown);
  • lint(markdown, rules):通过 API 方式来校验 markdown 文本;

  • fix(markdown):通过 API 方式来修复文本;

  • getDescription(type):获取错误类型的文本描述,包含多语言;

  • version:获得模块的版本号;

其他相关

License

MIT@hustcc.


以上所述就是小编给大家介绍的《中文 markdown 格式校验 lint-md v0.1.0,支持 --fix 参数》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

算法之美

算法之美

左飞 / 电子工业出版社 / 2016-3 / 79.00元

《算法之美——隐匿在数据结构背后的原理(C++版)》围绕算法与数据结构这个话题,循序渐进、深入浅出地介绍了现代计算机技术中常用的40 余个经典算法,以及回溯法、分治法、贪婪法和动态规划等算法设计思想。在此过程中,《算法之美——隐匿在数据结构背后的原理(C++版)》也系统地讲解了链表(包括单向链表、单向循环链表和双向循环链表)、栈、队列(包括普通队列和优先级队列)、树(包括二叉树、哈夫曼树、堆、红黑......一起来看看 《算法之美》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码