We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1036cc commit 0061801Copy full SHA for 0061801
.git-hooks/pre-commit
@@ -0,0 +1,6 @@
1
+#!/bin/bash
2
+set -e
3
+
4
+FILES=$(git diff --staged --name-only --diff-filter=ACMR)
5
+echo "$FILES" | grep '[jt]sx\?$' | xargs --no-run-if-empty deno lint
6
+echo "$FILES" | grep '\([jt]sx\?\|jsonc\?\|md\)$' | xargs --no-run-if-empty deno fmt
velociraptor.yml
@@ -34,12 +34,7 @@ scripts:
34
cmd: deno fmt --ignore=cov_profile
35
36
pre-commit:
37
- cmd: |
38
- FILES=$(git diff --staged --name-only --diff-filter=ACMR "*.ts")
39
- [ -z "$FILES" ] && exit 0
40
- echo "$FILES" | xargs deno lint
41
- echo "$FILES" | xargs deno fmt
42
- # echo "$FILES" | xargs git add
+ cmd: sh .git-hooks/pre-commit
43
desc: Lints and formats staged files
44
gitHook: pre-commit
45
0 commit comments