diff --git a/.commitlintrc.json b/.commitlintrc.json index b0a9726..badfa70 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -1,5 +1,26 @@ { - "extends": [ - "@commitlint/config-conventional" - ] + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "build", + "ci", + "chore", + "revert" + ] + ], + "scope-case": [2, "always", "lower-case"], + "subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]], + "subject-empty": [2, "never"], + "subject-full-stop": [2, "never", "."], + "header-max-length": [2, "always", 72] + } } diff --git a/.githooks/commit-msg b/.githooks/commit-msg index d82d4c9..2100adc 100755 --- a/.githooks/commit-msg +++ b/.githooks/commit-msg @@ -1,6 +1,6 @@ #!/bin/sh echo -e "\e[35m➤ [COMMIT]\e[0m Checking message\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m" -# npx commitlint --edit $1 +npx commitlint --edit $1 if [[ $? != 0 ]]; then echo -e "\e[31m➤ [COMMIT]\e[0m Wrong format on message\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m" exit -1