{"_id":"lint-md-cli","_rev":"973544","name":"lint-md-cli","description":"Cli tool to lint your markdown file for Chinese.","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"atool","email":"i@hust.cc"}],"time":{"modified":"2024-09-05T13:55:51.000Z","created":"2019-07-26T09:49:19.515Z","0.1.2":"2019-12-27T11:22:31.957Z","0.1.1":"2019-08-14T05:22:42.979Z","0.1.0":"2019-07-26T09:49:19.515Z"},"users":{},"author":{"name":"hustcc"},"repository":{"type":"git","url":"git+https://github.com/hustcc/lint-md.git"},"versions":{"0.1.2":{"name":"lint-md-cli","version":"0.1.2","description":"Cli tool to lint your markdown file for Chinese.","bin":{"lint-md":"bin/index.js"},"scripts":{"test":"node ./bin/index.js tests README.md -c tests/.lintmdrc","build":"rimraf ./bin && babel src -d bin"},"keywords":["lint","markdown","lint-md","cli"],"dependencies":{"babel-polyfill":"^6.26.0","chalk":"^2.4.2","commander":"^2.19.0","glob":"^7.1.3","lint-md":"^0.2.0","lodash":"^4.17.11"},"devDependencies":{"@babel/cli":"^7.2.0","@babel/core":"^7.2.0","@babel/preset-env":"^7.2.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","babel-plugin-version":"^0.2.3","coveralls":"^3.0.2","jest":"^23.6.0","rimraf":"^2.7.0"},"author":{"name":"hustcc"},"license":"MIT","bugs":{"url":"https://github.com/hustcc/lint-md/issues"},"repository":{"type":"git","url":"git+https://github.com/hustcc/lint-md.git"},"homepage":"https://github.com/hustcc/lint-md#readme","_id":"lint-md-cli@0.1.2","_nodeVersion":"11.12.0","_npmVersion":"6.13.2","dist":{"integrity":"sha512-x3vHWKuKTQuW+Cops9Eu0CUbf5zGtZXN5OozRfJ+BkC5MexkFFUSNws+uaqCextoTIqkzU09HizpLs9dojUaLQ==","shasum":"cd90bb0b49200b201b28136c501771f085e52695","tarball":"http://registry-npm.ywwl.com/lint-md-cli/download/lint-md-cli-0.1.2.tgz","fileCount":10,"unpackedSize":20772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBel4CRA9TVsSAnZWagAA+/4P/1e9l61Ic6xdQcBkXuPM\nRfOOXkT6wKX6/AwWaoPcFUhtEIvzngh9LptBgRonJOnSqzhTaIvj7lI3Cr2X\nrguYbduwCP0xiLSG8iuD9ZYLgvUfQIpawLILmFiG10MkaktAjXC3zQtiPdDV\nugTqVpauw0m+TInd1XbSs8T+Kh8UvEEPfvg7oEVW7451/ZXFRbqPy/fee7Gp\n48PD8gUz9BzXLmCR4aAyHI3eIRCHTy0YV3wwpDMUImnr2R19mlhjb2iA3nMV\nOhQTYco+8kAbhha6KJZkYCSS8Hei5sE+j6yU6E0Yso62j235VxD4CtFIwdHo\nSHv4eCBVrPkx+FsT1c2LTe5zAAFLeuivJQ5Fs6k7UKZxR59ACDazosWnICbK\nP7xGU3DR7jhQFMIakvJ3fNQiwNaSPwqU2kI0LXDiNukEkEeGvI3d0ehIy3+P\nLSw5SZdZDBSJe5SkBy9/3cUMPuPQhlLkTDyO+AaBnqW01KsbBjD64mOrQZwW\ngpisqWkfLpjzUCzIIdjTDS58/bTeRKnkPraAfOXpBjKcepClUsJKvA0hbD6B\ntmsVJ1ZZrgci1+ESpuCe/3b420tasmzWIyAcuMVhA8m5uZVjfwD1I+kVzUsk\nLEK3LmR/FYlGOnhsZXtJC5oSbCZex4cuP+qDqIPAWZOUY0x1kznGUSAFEf8E\nynNY\r\n=NTwr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8GrUeYToSpZdlA/8Lq/2mao7PledprLp9VRS2pRFMzQIhANplh8X/H3V5eV1K2XvIPAmmL7OSarq5Z9XPYFtChLJT"}],"size":6231,"noattachment":false,"key":"/lint-md-cli/-/lint-md-cli-0.1.2.tgz"},"maintainers":[{"name":"atool","email":"i@hust.cc"}],"_npmUser":{"name":"atool","email":"i@hust.cc"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lint-md-cli_0.1.2_1577445751824_0.6116375178496534"},"_hasShrinkwrap":false,"publish_time":1577445751957,"_cnpm_publish_time":1577445751957},"0.1.1":{"name":"lint-md-cli","version":"0.1.1","description":"Cli tool to lint your markdown file for Chinese.","bin":{"lint-md":"bin/index.js"},"scripts":{"test":"node ./bin/index.js tests README.md -c tests/.lintmdrc","build":"rimraf ./bin && babel src -d bin"},"keywords":["lint","markdown","lint-md","cli"],"dependencies":{"babel-polyfill":"^6.26.0","chalk":"^2.4.2","commander":"^2.19.0","glob":"^7.1.3","lint-md":"^0.2.0","lodash":"^4.17.11"},"devDependencies":{"@babel/cli":"^7.2.0","@babel/core":"^7.2.0","@babel/preset-env":"^7.2.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","babel-plugin-version":"^0.2.3","coveralls":"^3.0.2","jest":"^23.6.0","rimraf":"^2.7.0"},"author":{"name":"hustcc"},"license":"MIT","bugs":{"url":"https://github.com/hustcc/lint-md/issues"},"repository":{"type":"git","url":"git+https://github.com/hustcc/lint-md.git"},"homepage":"https://github.com/hustcc/lint-md#readme","_id":"lint-md-cli@0.1.1","_nodeVersion":"10.10.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-CxmnjGDJTjTPEY7sLhgh8j7DHdClnuNB9bX9KTz2anVOw8g4mDZBHCN1Tot0/62sjjb2giRK/BJwWKLiVc+pKg==","shasum":"2fca225ee84de8bc64989643f086414d2715d9bf","tarball":"http://registry-npm.ywwl.com/lint-md-cli/download/lint-md-cli-0.1.1.tgz","fileCount":10,"unpackedSize":20667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU5qjCRA9TVsSAnZWagAA+usP/00W0VqGLrue7B6PcSUo\nGl+QmpLpff6iSVaIuDpKUABR2IdCuclmn35oE4alhWRPQwb2JHNyr05Zxgh0\nzxyn+lc1aXEK6PWa15JgVyHdtBQKpuhYEUhX2uHiN1xbijnPRsmwZhVcqsoc\nV2WqOupXkdzRUao/HnUvVolNOZKSRyphsSwR5PxubuJovm2fkdyW30hHJ5wF\nIdnHIdqYNCTbiqBIoItFB1Dp6t7OKWO/sLKFP/ASHUyDeoyNjslc3zlxsOt5\nn8fn6Xrify2BUIZIFE9ayQk+2kDct6VuimVZ7VhBIelevqvLl+yfiHshOVjA\nm2irL02yupi3iokMU8/ClFAO8kPCNf4cj4gkcN3xZBRz7oor7Bb5vdw8EhVN\nfxOlNQFxYVWJzmKqara8QA4RGDKtNjDw3JMiX6YEDIjAUMsN16UonOduP8U9\n3we6jbiHTlcNIzU9k5+bvzuH6ISO7ADURMJ2DlwKD/1hYQms8ynOs9TnNyWu\n33uIsBImB1Jj8fCB7HZBn03jwjcyzC4tH3HdN2cL/uoYlBDAJ0jUEqiUr7b5\n4WfiH2Ejrl126rNmSI+HKTbdUeE5uPdozQdmSJ5GIXIruhQCcMkyan96fS1w\n0nAqj+rQJiAuEwotWFHdN885uvcHh5xLNxcNPSwxTkwKBnxZkTHOQnw/0e+s\nnL1i\r\n=jPvx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDON57T6eGkrHvHft7Grz+bbmeLMREMu1BgiIzWwLcpdAIhAM6NOgzM8Hp0SR0qy4NzEhZ4kEZjS9qo7ZlFW9Jpzt8t"}],"size":6214,"noattachment":false,"key":"/lint-md-cli/-/lint-md-cli-0.1.1.tgz"},"maintainers":[{"name":"atool","email":"i@hust.cc"}],"_npmUser":{"name":"atool","email":"i@hust.cc"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lint-md-cli_0.1.1_1565760162853_0.5951821857886732"},"_hasShrinkwrap":false,"publish_time":1565760162979,"_cnpm_publish_time":1565760162979},"0.1.0":{"name":"lint-md-cli","version":"0.1.0","description":"Cli tool to lint your markdown file for Chinese.","bin":{"lint-md":"bin/index.js"},"scripts":{"test":"node ./bin/index.js tests README.md -c tests/.lintmdrc"},"keywords":["lint","markdown","lint-md","cli"],"dependencies":{"chalk":"^2.4.2","commander":"^2.19.0","glob":"^7.1.3","lodash":"^4.17.11","lint-md":"^0.2.0"},"devDependencies":{"@babel/cli":"^7.2.0","@babel/core":"^7.2.0","@babel/preset-env":"^7.2.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","babel-plugin-version":"^0.2.3","coveralls":"^3.0.2","jest":"^23.6.0"},"author":{"name":"hustcc"},"license":"MIT","bugs":{"url":"https://github.com/hustcc/lint-md/issues"},"repository":{"type":"git","url":"git+https://github.com/hustcc/lint-md.git"},"homepage":"https://github.com/hustcc/lint-md#readme","_id":"lint-md-cli@0.1.0","_nodeVersion":"10.10.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-K3DpUEF4G73NCNhMj1S+2WaTK6861ubLqakIUM5s9RJXGjPXpZSiEX1p1jsiAaSlDueIl8GbLI8nWzLvFSn7Ww==","shasum":"fddcdd0a8a0ee593989652fb48ebd55c7e803cdf","tarball":"http://registry-npm.ywwl.com/lint-md-cli/download/lint-md-cli-0.1.0.tgz","fileCount":10,"unpackedSize":10987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOsyfCRA9TVsSAnZWagAAla0QAJRdnl9ESAkggmzCNTDm\njNNl6PP4gz5b4/clgoTBIalqEinUing+zAad89pA9Zjhf4f9zC3m13UJaLjt\nBfrBDhg5cBjNva6sSxTFsCpHJvlvERDCtgCc/8DD44DiqXhA0hWD8M0zXn90\nHE+Lj/M+vw6MCkbDeOU351Lmmqg6CAg5H7k6bD+Vxt6I2vV25EKkSzWFb5A+\n/1IwcA/r2500LoVVmWKPBl+BNuMXPqK0wQyX7Cu0DtElA+bmyGUqfMsPuUwq\ndJLONxtwnrmu27O71trZpoH026ekW/fjftju+z9jADifTP+eBAGUrsLgMSx9\nJ3Fz2Xvg1ZCbK2YwrN12U3pam+p4xe3dd2Zy0vmGjZROl8r/BwS4e/x5QVwW\n5nU2vnFfzq9aOlEB6AehuIgXwzJnXA330ZrWgPl283Eol+I5hCRviFkAAnCL\nAYtqKFs7nKzDzh7A6C9qNk0RH16sdZotUeGVdadjS9ULvCTChdPHMDLximMs\nqAhF9yAZH9HRfwgSlLH/j1tHCaZaqJ1QkSuA/ltqiwGPrz3Asp+ik3LXkSpg\nqud1okbs1HtMztE4CqzO8flZQoWjm/p1z18oublhW3P0uYq8c4z0lUDHe1nA\nL/9xWzrgWd0QGYBjaF8fBQ1vWzDVh9nJdiCeLLsWImJwTUyuwvxMz7DefXW7\nNrBs\r\n=biWw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfq4432uICR6AbYK28BfFr2NnBmuS0ZnuLuSIhl26XygIhAIO9FUHuBCSNefbpZfaT0hHhzFg2fbC9Wvj3RsSy7RbA"}],"size":4361,"noattachment":false,"key":"/lint-md-cli/-/lint-md-cli-0.1.0.tgz"},"maintainers":[{"name":"atool","email":"i@hust.cc"}],"_npmUser":{"name":"atool","email":"i@hust.cc"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lint-md-cli_0.1.0_1564134559389_0.9795820916148965"},"_hasShrinkwrap":false,"publish_time":1564134559515,"_cnpm_publish_time":1564134559515}},"readme":"# lint-md-cli\n\n\n> 用于检查中文 markdown 编写格式规范的命令行工具，基于 AST 开发，且方便集成 ci；同时提供 API 方法调用。Cli tool to lint your markdown file for Chinese.\n\n[![npm](https://img.shields.io/npm/v/lint-md-cli.svg)](https://www.npmjs.com/package/lint-md-cli)\n[![npm](https://img.shields.io/npm/dm/lint-md-cli.svg)](https://www.npmjs.com/package/lint-md-cli)\n\n\n\n## 安装\n\n> **npm i -g lint-md-cli**\n\n\n\n## 使用\n\n```bash\nUsage: <lint-md> <files...> [options]\n\nlint your markdown files\n\nOptions:\n  -v, --version                  output the version number\n  -c, --config [configure-file]  use the configure file, default .lintmdrc\n  -f, --fix                      fix the errors automatically\n  -h, --help                     output usage information\n```\n\n\n - 校验 lint\n\n```bash\nlint-md README.md Document.md\n```\n\n\n - 修复 fix\n\n```bash\nlint-md README.md Document.md --fix\n```\n\n\n\n## 检查类型\n\n基于 [lint-md](https://github.com/hustcc/lint-md/tree/master/packages/lint-md)，具体支持的检查类型，请到该项目查看。\n\n\n\n## 配置\n\n默认所有的规则都是 `error` 类型，但是可以通过配置来指定规则类型。示例 `.lintmdrc` ：\n\n```json\n{\n  \"excludeFiles\": [],\n  \"rules\": {\n    \"no-empty-code\": 1,\n    \"no-long-code\": [2, {\n      \"length\": 100,\n      \"exclude\": [\"dot\"]\n    }]\n  }\n}\n```\n\n - 通过 rules 来配置规则。参考 [lint-md](https://github.com/hustcc/lint-md/tree/master/packages/lint-md) 文档说明。\n - 通过 excludeFiles 来忽略文件和目录，glob 语法。\n\n\n\n## ci 集成\n\n -  Travis\n\n> 在 `.travis.yml` 文件中配置以下内容。\n\n```yml\nlanguage: node_js\nnode_js:\n  - \"10\"\nbefore_install:\n  - npm i -g lint-md-cli\nscript: lint-md README.md\n```\n\n -  lint-stage\n\n> 在 `package.json` 中增加以下配置。\n\n```json\n\"lint-staged\": {\n  \"src/**/*.{md,markdown}\": [\n    \"lint-md\"\n  ]\n}\n```\n\n\n\n## 基于 Docker\n\n假设当前目录有一文件名为 `README.md`，可在本地使用以下命令：\n\n```bash\ndocker run --rm -it -v$(pwd):/docs yuque/lint-md:cli /docs/README.md # 也可直接带其它参数\n```\n\n其中：\n\n- `--rm` 表示在运行完毕后直接销毁容器。\n- `-it` 表示交互式 TTY，你可以理解为进入容器终端。\n- `-v$(pwd)/docs` 表示将当前目录「挂载」至容器内部的 `/docs` 目录。\n\n另外，在基于 Docker 的 CI/CD 平台上，也可使用 `yuque/lint-md` 镜像。例如 GitLab CI/CD：\n\n```yml\nlint:\n  image: yuque/lint-md:cli\n  script:\n    - lint-md README.md # 或其它文件\n```\n\nCircle CI：\n\n```yml\nversion: 2\njobs:\n  lint:\n    docker:\n      - image: yuque/lint-md:cli\n    steps:\n      - checkout\n      - run: lint-md README.md # 或其它文件\n```\n\n利用 Docker 作为 CI 的基础环境通常更有优势，不必每次构建都执行 `yarn install`；资源节省，速度也会更快些。\n\n\n\n\n## License\n\nMIT@[hustcc](https://github.com/hustcc).\n","_attachments":{},"homepage":"https://github.com/hustcc/lint-md#readme","bugs":{"url":"https://github.com/hustcc/lint-md/issues"},"license":"MIT"}