-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
48 lines (41 loc) · 1.34 KB
/
lefthook.yml
File metadata and controls
48 lines (41 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
skip_output:
- meta
- summary
pre-commit:
commands:
format:
glob: "*.{js,jsx,ts,tsx,json,jsonc}"
run: npx biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
stage_fixed: true
typecheck:
glob: "*.{ts,tsx}"
run: npx turbo type-check --filter=...[HEAD] --continue
check-package-json:
glob: "**/package.json"
run: |
echo "🔍 Checking package.json files..."
find . -name "package.json" -not -path "./node_modules/*" -not -path "./.turbo/*" | while read -r file; do
if ! node -e "try { JSON.parse(require('fs').readFileSync('$file', 'utf8')); } catch(e) { process.exit(1); }" 2>/dev/null; then
echo "❌ Invalid JSON in $file"
exit 1
fi
done
echo "✅ All package.json files are valid"
check-dependencies:
glob: "**/package.json"
run: |
echo "🔍 Checking for unused dependencies..."
if command -v depcheck >/dev/null 2>&1; then
depcheck --ignores="@types/*,@requil/*,lefthook,turbo,typescript" --skip-missing
else
echo "⚠️ depcheck not installed, skipping dependency check"
fi
commit-msg:
commands:
commitlint:
run: npx commitlint --edit {1}
pre-push:
commands:
lint:
run: npx biome ci .
colors: true