Skip to content

Commit 5390ec8

Browse files
committed
merged react-email templates
2 parents cd306fb + 96e76b3 commit 5390ec8

13 files changed

Lines changed: 6896 additions & 1560 deletions

‎.husky/pre-commit‎

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1-
npm run lint
1+
2+
# Run lint using local Next CLI via Node to avoid npm PATH issues on Windows/MSYS
3+
if command -v node >/dev/null 2>&1; then
4+
# Enforce Next.js Node engine range: ^18.18.0 || ^19.8.0 || >= 20.0.0
5+
VER=$(node -p "process.versions.node" 2>/dev/null)
6+
MAJOR=${VER%%.*}
7+
REST=${VER#*.}
8+
MINOR=${REST%%.*}
9+
ALLOWED=0
10+
if [ "$MAJOR" -ge 20 ]; then
11+
ALLOWED=1
12+
elif [ "$MAJOR" -eq 19 ] && [ "$MINOR" -ge 8 ]; then
13+
ALLOWED=1
14+
elif [ "$MAJOR" -eq 18 ] && [ "$MINOR" -ge 18 ]; then
15+
ALLOWED=1
16+
fi
17+
18+
if [ "$ALLOWED" -ne 1 ]; then
19+
echo "[husky] Detected Node $VER which is below Next.js requirement (^18.18 || ^19.8 || >=20). Skipping lint."
20+
exit 0
21+
fi
22+
23+
if [ -f "node_modules/next/dist/bin/next" ]; then
24+
echo "[husky] Running next lint"
25+
node node_modules/next/dist/bin/next lint
26+
exit $?
27+
else
28+
echo "[husky] next is not installed locally. Skipping lint."
29+
exit 0
30+
fi
31+
else
32+
echo "[husky] Node.js not found in PATH. Skipping lint."
33+
exit 0
34+
fi

0 commit comments

Comments
 (0)