npm install --save-dev @commitlint/{config-conventional,cli}
npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
npm install husky --save-dev
yarn add husky --dev
npx husky install
yarn husky install
npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
type(scope?): subject body? - optional footer? - optional
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
-
yarn add commitizen -D
-
yarn commitizen init cz-conventional-changelog --yarn --dev --exact
touch nodemon.json
{
"restartable": "rs",
"ignore": [".git", "node_modules/**/node_modules"],
"verbose": true,
"execMap": { // [A]
"ts": "node --require ts-node/register"
},
"watch": ["src/"],
"env": {
"NODE_ENV": "development"
},
"ext": "js,json,ts"
}
"scripts": {
// ...
"dev:debug": "nodemon --inspect src/entry.ts"
}