The following is the tl;dr for getting this done.
yarn add husky @commitlint/cli @commitlint/config-conventional standard-version --dev
For the release script:
"scripts" : { "release" : "standard-version" }
For commit lint:
"commitlint": { "extends": [ "@commitlint/config-conventional" ], "rules": { "subject-case": [ 2, "never", [ "start-case", "pascal-case" ] ] } }
For Husky (with some examples from another project). The follow expects a generation of the CHANGELOG.md
pre-push and also to run the test suite prior to deploy:
"husky": { "hooks": { "pre-push": "yarn release && yarn test", "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } }