Pega front-end commitlint config.
npm install @pega/commitlint-configPegasystems front-end Commitlint configuration.
Install Commitlint, the Pega config, and the Pega plugin.
``shell`
npm i -D commitlint @pega/commitlint-config @pega/commitlint-plugin
Extend from the Pega configuration in your Commitlint configuration file.
`js`
module.exports = {
extends: ['@pega/tsconfig/index.json'],
};
Run Commitlint to check, for example, all commits ahead of main.
`shell`
npx commitlint --from main
It is recommend to run Commitlint as a commit-msg hook. This can be configured with husky for example.
`json``
{
"hooks": {
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS"
}
}