Skip to content

[chore] husky pre-commit 훅 정상 동작 수정#5

Merged
2seb2 merged 2 commits into
mainfrom
hotfix/husky-permission
Apr 21, 2026
Merged

[chore] husky pre-commit 훅 정상 동작 수정#5
2seb2 merged 2 commits into
mainfrom
hotfix/husky-permission

Conversation

@2seb2
Copy link
Copy Markdown
Contributor

@2seb2 2seb2 commented Apr 21, 2026

#️⃣ 관련 이슈

연관된 이슈 번호를 적어주세요.
이슈를 함께 종료하려면 Closes #이슈번호 형식으로 작성해주세요.

  • Closes #없음 (hotfix)

⏰ 작업 시간

예상과 실제 시간이 다르다면 이유를 간단히 적어주세요.

  • 예상 작업 시간 : 30m
  • 실제 작업 시간 : 30m

💻 작업 내용

이번 작업에서 진행한 내용을 정리해주세요.

  • pre-commit 파일에 실행 권한(chmod +x) 추가
  • lint-staged에서 eslint --fixeslint로 변경

필요한 경우 스크린샷이나 캡처 화면을 함께 첨부해주세요.


🪏 작업하면서 고민한 부분

작업 중 겪은 문제나 고민, 그리고 그에 대한 해결 과정을 정리해주세요.
관련 트러블슈팅 문서가 있다면 링크로 연결해주세요.

문제 상황

  • console.log 추가 후 커밋 시도했는데 husky가 막지 않고 커밋이 통과됨

원인 파악 과정

  1. .husky/pre-commit 실행 권한 없음 → chmod +x 추가했으나 여전히 통과
  2. git config core.hooksPath 확인 결과 hooksPath 자체가 설정 안 된 것이 진짜 원인
  3. yarn prepare 실행 시 hooksPath가 .husky/_로 설정되며 정상 동작 확인

추가 수정

  • eslint --fixno-console 룰을 auto-fix하지 못해 커밋이 통과되는 문제가 있어 eslint로 변경
  • Yarn Berry PnP 환경에서는 yarn installprepare 스크립트가 자동 실행되지 않아 클론 후 yarn prepare를 별도 실행해야 함

👀 리뷰 포인트

리뷰어가 중점적으로 확인해주길 바라는 부분이 있다면 작성해주세요.

  • lint-staged eslint → --fix 제거로 인해 기존에 자동 수정되던 ESLint 오류는 직접 수정 필요
    • 자동 수정보단 본인의 코드를 커밋하는 것이기 때문에 직접 수정해서 변경사항을 알고있는 게 좋을 것 같아 변경

📘 참고 자료

작업하면서 참고한 문서, 링크, 자료가 있다면 작성해주세요.

Summary by CodeRabbit

Chores

  • 개발 환경의 코드 검사 구성을 업데이트했습니다.

2seb2 added 2 commits April 22, 2026 04:32
- chmod +x 적용으로 클론 후 별도 권한 설정 없이 husky 동작
- --fix 옵션 제거로 console.log 등 ESLint 오류 시 커밋 차단
@2seb2 2seb2 self-assigned this Apr 21, 2026
@2seb2 2seb2 added 🐞 Bug 버그 수정 및 오류 해결 🔧 Chore 빌드 설정, 패키지 업데이트 등 자잘한 설정 hotfix 급한 수정사항 labels Apr 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 76009488-a28a-4f77-84b6-f0d83cd9e830

📥 Commits

Reviewing files that changed from the base of the PR and between 7953c67 and 55b7e4d.

📒 Files selected for processing (2)
  • .husky/pre-commit
  • package.json

📝 Walkthrough

Walkthrough

package.json의 lint-staged 설정에서 TypeScript/TSX 파일에 대한 eslint 명령어의 --fix 플래그를 제거했습니다. 이제 staged 린트는 자동 수정 없이 eslint를 실행한 후 prettier --write를 실행합니다.

Changes

Cohort / File(s) Summary
Lint-staged Configuration
package.json
eslint 명령어에서 --fix 플래그 제거. 자동 수정 비활성화, Prettier가 포맷팅 담당.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

🏗️ Infra

Poem

🐰 린트의 깃발을 내리고,
Prettier가 아름다운 코드를 그어요.
자동 수정은 안녕, 검증만 해요.
깨끗한 무대 위에 코드가 빛나~! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 husky pre-commit 훅의 동작 수정이라는 주요 변경 내용을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿의 모든 필수 섹션을 포함하고 있으며, 문제 상황, 원인 파악 과정, 해결 방법, 리뷰 포인트를 상세하게 작성했습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/husky-permission

Comment @coderabbitai help to get the list of available commands and usage tips.

@2seb2 2seb2 merged commit e0bceea into main Apr 21, 2026
2 checks passed
@2seb2 2seb2 deleted the hotfix/husky-permission branch April 21, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 Bug 버그 수정 및 오류 해결 🔧 Chore 빌드 설정, 패키지 업데이트 등 자잘한 설정 hotfix 급한 수정사항

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant