- eslint √
- typescript及tsc检查 √
- 打包配置 rollup ×
- prettier 代码格式化,与eslint有冲突,需要额外依赖 √
- commit,husky 规范 √
- mit开源管理 ×
- npm源管理 √
- ci pr时候进行检测等等 √
本人git
垃圾,决定采用simple-git-hooks
来规范 git ,轻量,简洁,快速上手,感觉比cz
好用。
用法:@see https://gitcode.com/toplenboren/simple-git-hooks/overview?utm_source=artical_gitcode&isLogin=1
- 安装开发依赖;
simple-git-hooks
,lint-staged
; - package.json 中加入
simple-git-hooks
和lint-staged
- 设置钩子,
pre-commit
,pre-push
,commit-msg
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged && node scripts/commitVerify.js",
"pre-push": "pnpm format",
"commit-msg": "node scripts/commitVerify.js",
"preserveUnused": true
},