chore: align project config with torrentclaw org standards

This commit is contained in:
Deivid Soto 2026-02-12 15:44:09 +01:00
parent 2f58ac7bf8
commit 8bb8e5507e
9 changed files with 367 additions and 46 deletions

36
lefthook.yml Normal file
View file

@ -0,0 +1,36 @@
commit-msg:
commands:
validate:
run: |
msg=$(head -1 {1})
if ! echo "$msg" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?(!)?: .{1,}$'; then
echo ""
echo "ERROR: Invalid commit message format."
echo ""
echo " Got: $msg"
echo ""
echo " Expected: <type>[optional scope][!]: <description>"
echo ""
echo " Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
echo " Examples:"
echo " feat: add new audio codec detection"
echo " fix(scanner): correct HDR10 detection for MKV files"
echo " feat!: redesign output format"
echo ""
exit 1
fi
pre-commit:
parallel: true
commands:
prettier:
glob: "*.{ts,js,json,md,yml,yaml}"
run: npx prettier --check {staged_files}
typecheck:
glob: "*.ts"
run: npx tsc --noEmit
pre-push:
commands:
test:
run: npm test