Skip to content

Instantly share code, notes, and snippets.

@ammarnajjar
Created October 23, 2019 10:07
Show Gist options
  • Save ammarnajjar/32e4dda76abecc7acc7209c49440e169 to your computer and use it in GitHub Desktop.
Save ammarnajjar/32e4dda76abecc7acc7209c49440e169 to your computer and use it in GitHub Desktop.
validate commit-msg hook using husky
{
"types": [
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert"
],
"scope": {
"required": false,
"allowed": ["*"],
"validate": false,
"multiple": false
},
"warnOnFail": false,
"maxSubjectLength": 100,
"subjectPattern": ".+",
"subjectPatternErrorMsg": "subject does not match subject pattern!",
"helpMessage": "Check the correct format on: ... ",
"autoFix": true
}
{
"devDependencies": {
"husky": "^3.0.9",
"validate-commit-msg": "^2.14.0"
},
"husky": {
"hooks": {
"commit-msg": "validate-commit-msg"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment