fix(dx): add node_modules guard to pre-push hook and pin Node 22 (#1368)

Worktrees start with no node_modules, causing tsc to fail with
misleading TS2307 errors. The guard auto-runs npm install on first push.
.nvmrc pins Node 22 to match CI and avoid Node 24 compat issues.
This commit is contained in:
Elie Habib
2026-03-10 08:27:44 +04:00
committed by GitHub
parent 3d51a2619e
commit 2df7d23edb
2 changed files with 7 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
# Ensure dependencies are installed (worktrees start with no node_modules)
if [ ! -d node_modules ]; then
echo "node_modules missing, running npm install..."
npm install --prefer-offline || exit 1
fi
echo "Running type check..."
npm run typecheck || exit 1

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22