I'd like to use huksy and commitlint to my angular project.
How can I achieve this ?
npm i husky --save-devnpx husky initThe
initcommand simplifies setting up husky in a project. It creates apre-commitscript in.husky/and updates thepreparescript inpackage.json. Modifications can be made later to suit your workflow. Husky doc
npm i @commitlint/cli @commitlint/config-conventional --save-devcommitlint.config.js file at the root of the project.module.exports = {
extends: ['@commitlint/config-conventional'],
};
.husky folder, add commit-msg filenpx --no-install commitlint --edit "$1"
pre-commit file if you do not have any testgit commit -m "Keep calm and commit".../COMMIT_EDITMSG ?Just open the .git folder and add an empty COMMIT_EDITMSG file.
Git needs it to know the title you're trying to type, maybe he doesn't have the access to create the file.