{"versions":{"1.0.7":{"name":"commitlint-config-encode","version":"1.0.7","main":"index.js","description":"印客学院 Git规范","keywords":["encode","commit","lint"],"author":{"name":"chenghuai"},"homepage":"https://github.com/encode-studio-fe/fe-spec#readme","license":"ISC","repository":{"type":"git","url":"git+https://github.com/encode-studio-fe/fe-spec.git"},"bugs":{"url":"https://github.com/encode-studio-fe/fe-spec/issues"},"dependencies":{"conventional-changelog-conventionalcommits":"^4.5.0"},"gitHead":"bb00cf440fcdd6a583cdda2254e9ed6d7f0390ab","_id":"commitlint-config-encode@1.0.7","_nodeVersion":"16.18.0","_npmVersion":"lerna/6.6.2/node@v16.18.0+x64 (win32)","dist":{"integrity":"sha512-jQCiD3wUFMZZ3dsirOlp/NGFn4yq//ORIkCrhhxQN7SK/Oomb0s4snONWZwqnaZtwSgRhTg53bGpUfRZt7rvoA==","shasum":"4fdbc187017310b3d6b15aa3fb57139ba067830f","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/commitlint-config-encode/-/commitlint-config-encode-1.0.7.tgz","fileCount":4,"unpackedSize":3344,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7CCrZ3RgzdosEhnwX8oyehJIl0CnRNLk8p0NdNWlpkAiEAmUKXpDTArvjFrWsjFHVxzy+elen1cV9W7bbwbikY2b0="}],"size":1915},"_npmUser":{"name":"anonymous","email":"encode_studio@163.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"encode_studio@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/commitlint-config-encode_1.0.7_1698241309496_0.19184808143512777"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-25T13:41:49.688Z","publish_time":1698241309688,"_source_registry_name":"default","contributors":[]},"1.0.8":{"name":"commitlint-config-encode","version":"1.0.8","main":"index.js","description":"印客学院 Git规范","keywords":["encode","commit","lint"],"author":{"name":"chenghuai"},"homepage":"https://github.com/encode-studio-fe/fe-spec#readme","license":"ISC","repository":{"type":"git","url":"git+https://github.com/encode-studio-fe/fe-spec.git"},"bugs":{"url":"https://github.com/encode-studio-fe/fe-spec/issues"},"dependencies":{"conventional-changelog-conventionalcommits":"^4.5.0"},"gitHead":"f62d3614141362dd5606bd6d32d9b013b5ebf431","_id":"commitlint-config-encode@1.0.8","_nodeVersion":"16.18.0","_npmVersion":"lerna/6.6.2/node@v16.18.0+x64 (win32)","dist":{"integrity":"sha512-7Lw5PxnT+hMv3Dt+DiaT6A6Fv0wm7hn8fw2SaFUlD2Y7deSDD8ycXdD1GG5pPgZa662+lpiUu6NxbbMpxDSMpw==","shasum":"05301265090d4473294c35129433f72da6110282","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/commitlint-config-encode/-/commitlint-config-encode-1.0.8.tgz","fileCount":4,"unpackedSize":3344,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDo1qOzodpeI3mO8uEES6Acp0jcARbysQzV+XvNFDNazAIhAPAlygd4EsEXdfXzNmYoSwWkeuE9S83vZPf5y0C/0kGD"}],"size":1913},"_npmUser":{"name":"anonymous","email":"encode_studio@163.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"encode_studio@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/commitlint-config-encode_1.0.8_1698247382497_0.161501727038879"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-25T15:23:02.787Z","publish_time":1698247382787,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.0.8"},"name":"commitlint-config-encode","time":{"created":"2023-10-25T14:19:41.073Z","modified":"2023-10-25T16:12:16.405Z","1.0.7":"2023-10-25T13:41:49.688Z","1.0.8":"2023-10-25T15:23:02.787Z"},"readme":"# `commitlint-config-encode`\r\n\r\n> 印客学院 Git 规范\r\n\r\n支持配套的 [commitlint 配置](https://commitlint.js.org/#/concepts-shareable-config)，用于对 `git commit message` 进行校验。\r\n\r\n## 安装\r\n\r\n使用时，需要安装 [@commitlint/cli](https://www.npmjs.com/package/@commitlint/cli)：\r\n\r\n```bash\r\nnpm install commitlint-config-encode @commitlint/cli --save-dev\r\n```\r\n\r\n## 使用\r\n\r\n在 `commitlint.config.js` 中集成本包:\r\n\r\n```javascript\r\nmodule.exports = {\r\n  extends: ['encode'],\r\n};\r\n```\r\n\r\n## 设置 git hook\r\n\r\n可通过 [husky](https://www.npmjs.com/package/husky) 设置在 `git commit` 时触发 `commitlint`。\r\n\r\n首先安装 husky：\r\n\r\n```bash\r\nnpm install husky --save-dev\r\n```\r\n\r\n然后执行添加`commit-msg`:\r\n\r\n```bash\r\nnpx husky add .husky/commit-msg 'npx commitlint --edit $1'\r\n```\r\n\r\n更多信息可参考 [commitlint 文档](https://commitlint.js.org/#/guides-local-setup?id=install-husky)。","users":{}}