if ! npx --no -- commitlint --edit "$1"; then
    printf "\n\033[31m❌ Commit failed!\033[0m Your message does not follow Conventional Commits.\n"
    printf "%s\n" "--------------------------------------------------"
    printf "%s\n" "Your message was:"
    cat "$1"
    printf "%s\n" "--------------------------------------------------"
    printf "\033[32m💡 To fix and retry, run:\033[0m\n"
    printf "%s\n" "   git commit --edit --file=.git/COMMIT_EDITMSG"
    printf "%s\n\n" "--------------------------------------------------"
    exit 1
fi
