内容简介:用于检查中文 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:获得模块的版本号;
其他相关
vscode 插件:在 vscode 中使用 lint-md 工具。
语雀 lint 服务:利用语雀的 webhook 自动校验提交的文档格式并做提醒。
License
MIT@hustcc.
以上所述就是小编给大家介绍的《中文 markdown 格式校验 lint-md v0.1.0,支持 --fix 参数》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 更加灵活的参数校验,Spring-boot自定义参数校验注解
- 一坨一坨的 if/else 参数校验,终于被 Spring Boot 参数校验组件整干净了
- gin - validator 参数校验
- 【快学springboot】4.接口参数校验
- Spring校验@RequestParams和@PathVariables参数
- SpringBoot 实战 (十五) | 服务端参数校验之一
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
JavaScript设计模式与开发实践
曾探 / 人民邮电出版社 / 2015-5 / 59.00元
本书在尊重《设计模式》原意的同时,针对JavaScript语言特性全面介绍了更适合JavaScript程序员的了16个常用的设计模式,讲解了JavaScript面向对象和函数式编程方面的基础知识,介绍了面向对象的设计原则及其在设计模式中的体现,还分享了面向对象编程技巧和日常开发中的代码重构。本书将教会你如何把经典的设计模式应用到JavaScript语言中,编写出优美高效、结构化和可维护的代码。一起来看看 《JavaScript设计模式与开发实践》 这本书的介绍吧!
URL 编码/解码
URL 编码/解码
HEX CMYK 转换工具
HEX CMYK 互转工具