[chore] husky pre-commit 훅 정상 동작 수정#5
Merged
Merged
Conversation
- chmod +x 적용으로 클론 후 별도 권한 설정 없이 husky 동작
- --fix 옵션 제거로 console.log 등 ESLint 오류 시 커밋 차단
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣ 관련 이슈
⏰ 작업 시간
💻 작업 내용
pre-commit파일에 실행 권한(chmod +x) 추가eslint --fix→eslint로 변경 작업하면서 고민한 부분
문제 상황
console.log추가 후 커밋 시도했는데 husky가 막지 않고 커밋이 통과됨원인 파악 과정
.husky/pre-commit실행 권한 없음 →chmod +x추가했으나 여전히 통과git config core.hooksPath확인 결과 hooksPath 자체가 설정 안 된 것이 진짜 원인yarn prepare실행 시 hooksPath가.husky/_로 설정되며 정상 동작 확인추가 수정
eslint --fix는no-console룰을 auto-fix하지 못해 커밋이 통과되는 문제가 있어eslint로 변경yarn install시prepare스크립트가 자동 실행되지 않아 클론 후yarn prepare를 별도 실행해야 함👀 리뷰 포인트
📘 참고 자료
Summary by CodeRabbit
Chores