pnpm + egg + eslint + commitlint + commitizen + husky
- 安装依赖
pnpm install
- 启动项目
pnpm run dev
- 请求接口
http://localhost:7001
- 安装依赖
pnpm add husky -D
- 添加脚本
// package.json
"scripts": {
"lint": "eslint . --fix",
"husky": "husky install",
}
- 初始化 husky
pnpm run husky
npx husky add .husky/pre-commit "npm run lint"