chore: add code quality tools

This commit is contained in:
2022-09-21 12:16:27 +02:00
parent af5c6f9626
commit 44e6e012fd
14 changed files with 3425 additions and 7702 deletions

18
.githooks/commit-msg Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -eo pipefail
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
export PATH="${PATH}:${DIR}/../node_modules/.bin"
function lint_commit_message {
local commit_message_file="$1"
cat "$commit_message_file" | commitlint
}
function main {
local commit_message_file="$1"
lint_commit_message "$commit_message_file"
}
main $@