Add this module to only allow git commits with emails from certain domain.
npm i husky-check-email
If you want to validate email against one domain:
{
"husky": {
"hooks": {
"pre-commit": "husky-check-email @mydomain.com"
}
}
}
If you want to validate email against several domains:
{
"husky": {
"hooks": {
"pre-commit": "husky-check-email @mydomain.com,@mail.ru"
}
}
}