abcVideo 플레이어 소스 (client / server / shared / pythonsource / docs / .claude). .gitignore 적용으로 node_modules·storage·samplevideo·미디어 등 대용량 일괄 제외. 103 files, ~964K. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
884 B
Bash
37 lines
884 B
Bash
#!/bin/bash
|
|
# auto-lint.sh
|
|
# PostToolUse (Edit|Write) 훅: TypeScript 파일 수정 후 컴파일 체크
|
|
#
|
|
# 수정된 파일이 .ts/.tsx인 경우 tsc --noEmit으로 타입 체크
|
|
|
|
INPUT=$(cat)
|
|
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
|
|
|
|
# 파일 경로가 없으면 통과
|
|
if [ -z "$FILE_PATH" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# TypeScript 파일이 아니면 통과
|
|
if ! echo "$FILE_PATH" | grep -qE '\.(ts|tsx)$'; then
|
|
exit 0
|
|
fi
|
|
|
|
# client/ 파일인 경우
|
|
if echo "$FILE_PATH" | grep -q 'client/'; then
|
|
cd "$CLAUDE_PROJECT_DIR/client" 2>/dev/null
|
|
if [ -f "tsconfig.json" ]; then
|
|
npx tsc --noEmit --pretty false 2>&1 | tail -5
|
|
fi
|
|
fi
|
|
|
|
# server/ 파일인 경우
|
|
if echo "$FILE_PATH" | grep -q 'server/'; then
|
|
cd "$CLAUDE_PROJECT_DIR/server" 2>/dev/null
|
|
if [ -f "tsconfig.json" ]; then
|
|
npx tsc --noEmit --pretty false 2>&1 | tail -5
|
|
fi
|
|
fi
|
|
|
|
exit 0
|