Skip to content

Conversation

@manNomi
Copy link
Contributor

@manNomi manNomi commented Dec 27, 2025

관련 이슈

  • resolves: #이슈 번호

작업 내용

  • Husky 설치 및 초기화
  • commitlint로 커밋 메시지 검증 추가 (feat, fix, refactor, style, test, docs, chore)
  • pre-push 훅 제거 (CI에서 빌드 체크)
  • lint-staged 제거
  • CI 워크플로우를 lint와 build로 병렬 실행하도록 분리

특이 사항

리뷰 요구사항 (선택)

- Husky 설치 및 초기화
- commitlint로 커밋 메시지 검증 추가 (feat, fix, refactor, style, test, docs, chore)
- pre-push 훅 제거 (CI에서 빌드 체크)
- lint-staged 제거
- CI 워크플로우를 lint와 build로 병렬 실행하도록 분리
@manNomi manNomi requested a review from wibaek as a code owner December 27, 2025 10:45
@coderabbitai
Copy link

coderabbitai bot commented Dec 27, 2025

Walkthrough

프로젝트에 개발자 도구 및 자동화 파이프라인이 추가되었습니다. 다음과 같은 구성으로 진행됩니다:

  1. GitHub Actions CI 파이프라인 추가

    • main과 develop 브랜치의 push 및 pull_request 트리거 시 자동 실행
    • Lint 작업: Node.js 22.x 환경에서 의존성 설치 후 linting 및 TypeScript 타입 체크 수행
    • Build 작업: NODE_ENV=production 환경에서 프로젝트 빌드
  2. Husky 깃 훅 설정

    • commit-msg 훅: commitlint를 통한 커밋 메시지 검증
    • pre-commit 훅: 커밋 메시지 검증이 commit-msg에서 처리됨을 안내
  3. Commitlint 규칙 정의

    • 종래적 커밋(Conventional Commits) 표준 확장
    • 허용 타입: feat, fix, refactor, style, test, docs, chore로 제한
  4. package.json 업데이트

    • prepare 스크립트로 Husky 자동 초기화
    • commitlint, husky, lint-staged 개발 의존성 추가

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 분

Suggested reviewers

  • wibaek

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경사항인 Husky, commitlint 설정 추가 및 CI 워크플로우 병렬화를 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 필수 섹션(관련 이슈, 작업 내용)을 포함하고 있으며, 구체적인 변경사항들을 충분히 설명하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.husky/pre-commit (1)

1-1: pre-commit 훅의 목적을 명확히 해주세요.

현재 pre-commit 훅은 주석만 포함하고 있어 실제로 아무 작업도 수행하지 않습니다. 일반적으로 빈 훅 파일은 필요하지 않으며, Husky가 설치된 경우 .husky 디렉토리에 실제로 사용되는 훅만 유지하는 것이 좋습니다.

다음 중 하나를 고려해주세요:

  1. 이 파일을 삭제하고 commit-msg 훅만 유지
  2. 실제로 pre-commit 단계에서 수행할 작업(예: lint-staged 실행)이 있다면 해당 명령어 추가
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0835690 and 25229b0.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • .husky/commit-msg
  • .husky/pre-commit
  • commitlint.config.js
  • package.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: manNomi
Repo: solid-connection/solid-connect-web PR: 242
File: src/components/ui/TabSelector.tsx:10-11
Timestamp: 2025-08-12T09:41:44.182Z
Learning: manNomi prefers to keep reusable UI components simple and focused on core functionality rather than adding many features. They don't want to over-engineer flexible/reusable UI components at the initial stage.
Learnt from: manNomi
Repo: solid-connection/solid-connect-web PR: 245
File: src/components/mentor/MentorChatCard/index.tsx:17-21
Timestamp: 2025-08-24T11:14:34.297Z
Learning: manNomi prefers not to receive accessibility suggestions or recommendations during code reviews.
Learnt from: manNomi
Repo: solid-connection/solid-connect-web PR: 245
File: src/api/auth/client/usePostLogout.ts:17-33
Timestamp: 2025-08-24T11:13:08.477Z
Learning: manNomi prefers to prioritize user experience over perfect state consistency in auth flows. Specifically, in logout scenarios, they prefer to keep tokens intact on API failure to avoid forcing users to re-login, even if it means temporary UI state inconsistency.
Learnt from: manNomi
Repo: solid-connection/solid-connect-web PR: 245
File: src/api/auth/client/useDeleteUserAccount.ts:17-27
Timestamp: 2025-08-24T11:11:40.758Z
Learning: manNomi prefers optimistic navigation in auth-related flows (like account deletion) to prevent race conditions where token clearing before navigation could cause intermediate redirects to login page due to pending async requests failing.
Learnt from: manNomi
Repo: solid-connection/solid-connect-web PR: 242
File: src/types/mentor.ts:70-73
Timestamp: 2025-08-12T04:07:04.134Z
Learning: manNomi prefers using Korean labels directly in enum values (e.g., MentorTab.MY_MENTEE = "나의 멘티") over separating enum keys from UI labels for efficiency and intuitiveness, considering scalability concerns as excessive for their current project needs.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: lint
  • GitHub Check: build
🔇 Additional comments (5)
package.json (2)

13-13: prepare 스크립트가 올바르게 추가되었습니다.

Husky를 자동으로 초기화하는 prepare 스크립트가 적절하게 설정되었습니다.


50-51: commitlint 패키지 버전 확인 완료 - 최신 버전입니다.

검증 결과, 다음 사항을 확인했습니다:

  1. 버전 상태

    • @commitlint/cli: 최신 버전 20.2.0 ✓
    • @commitlint/config-conventional: 최신 버전 20.2.0 ✓
  2. 보안 취약점

    • 두 패키지 모두 알려진 보안 취약점 없음 ✓
    • Snyk 및 공개 취약점 데이터베이스에서 확인 완료

현재 package.json의 버전 설정이 올바르므로 추가 조치는 필요하지 않습니다.

.husky/commit-msg (1)

1-2: commit-msg 훅이 올바르게 구성되었습니다.

commitlint를 실행하는 표준 명령어가 적절하게 설정되어 있습니다. --no 플래그는 패키지 설치 프롬프트를 방지하고, ${1}은 커밋 메시지 파일 경로를 올바르게 전달합니다.

.github/workflows/ci.yml (1)

1-50: CI 워크플로우가 효율적으로 구성되었습니다.

lint와 build 작업이 병렬로 실행되도록 설정되어 있어 CI 실행 시간이 최적화됩니다. 각 작업이 다음을 포함하고 있습니다:

  1. lint 작업: ESLint 검사 및 TypeScript 타입 체크
  2. build 작업: 프로덕션 환경 빌드

Node.js 22.x 설정과 npm 캐시 활용도 적절합니다.

commitlint.config.js (1)

1-11: commitlint 설정이 올바르게 구성되었습니다.

conventional commits 규칙을 기반으로 하며, PR 목표에 명시된 대로 허용된 커밋 타입이 적절히 제한되어 있습니다:

  • feat, fix, refactor, style, test, docs, chore

severity level 2(error)로 설정되어 있어 규칙 위반 시 커밋이 차단됩니다.

"eslint-config-next": "^14.2.13",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# lint-staged 설정 파일 찾기
echo "=== Searching for lint-staged config files ==="
fd -t f '\.(lintstagedrc|config)' -H 2>/dev/null | grep -i lint || echo "No lint-staged config files found"

# package.json에서 lint-staged 확인
echo -e "\n=== Checking package.json for lint-staged ==="
cat package.json | jq '.devDependencies.["lint-staged"], .["lint-staged"]'

# 전체 package.json에서 lint-staged 관련 항목 확인
echo -e "\n=== Full search for lint-staged in package.json ==="
cat package.json | jq 'to_entries[] | select(.value | tostring | contains("lint-staged") or .key | contains("lint-staged"))'

Repository: solid-connection/solid-connect-web

Length of output: 544


🏁 Script executed:

#!/bin/bash
# 파일 크기 확인
wc -l package.json

echo -e "\n=== Searching for lint-staged in package.json ==="
# lint-staged 관련 모든 항목 검색
grep -n "lint-staged" package.json

echo -e "\n=== Checking devDependencies section ==="
# devDependencies 섹션 추출
sed -n '/devDependencies/,/}/p' package.json | head -40

Repository: solid-connection/solid-connect-web

Length of output: 955


🏁 Script executed:

#!/bin/bash
echo "=== Checking .husky directory ==="
find .husky -type f 2>/dev/null || echo "No .husky directory found"

echo -e "\n=== Searching for lint-staged references in repo ==="
# 전체 리포지토리에서 lint-staged 참조 검색
rg "lint-staged" --type-list | head -20

echo -e "\n=== Checking for .husky hooks files ==="
ls -la .husky/ 2>/dev/null || echo "No .husky directory"

echo -e "\n=== Checking husky pre-commit hook ==="
cat .husky/pre-commit 2>/dev/null || echo "No pre-commit hook found"

Repository: solid-connection/solid-connect-web

Length of output: 947


🏁 Script executed:

#!/bin/bash
echo "=== Full content of .husky/pre-commit ==="
cat -n .husky/pre-commit

echo -e "\n=== Full content of .husky/commit-msg ==="
cat -n .husky/commit-msg

echo -e "\n=== Searching for lint-staged usage in entire repo ==="
grep -r "lint-staged" . --exclude-dir=node_modules --exclude-dir=.git 2>/dev/null || echo "No lint-staged references found"

echo -e "\n=== Checking if lint-staged is configured anywhere ==="
find . -name ".lintstagedrc*" -o -name "lint-staged.config.*" 2>/dev/null || echo "No lint-staged config files found"

Repository: solid-connection/solid-connect-web

Length of output: 837


lint-staged 설정 누락: 의존성이 추가되었으나 사용되지 않습니다.

검증 결과, 다음을 확인했습니다:

  1. 의존성은 추가됨 - package.json의 devDependencies에 "lint-staged": "^16.2.7"이 있습니다.

  2. 설정 파일 없음 - .lintstagedrc, lint-staged.config.js 등의 설정 파일이 존재하지 않으며, package.json에도 lint-staged 설정이 없습니다.

  3. 실제 사용되지 않음 - .husky/pre-commit 훅은 주석만 있고, .husky/commit-msg 훅에서는 commitlint만 실행되고 있습니다.

PR 목표가 "Remove lint-staged"라면 package.json에서 제거하거나, lint-staged를 사용할 계획이라면 설정 파일을 추가하고 husky 훅에 통합하기 바랍니다.

🤖 Prompt for AI Agents
package.json around line 64: lint-staged is present in devDependencies but not
configured or used; either remove the dependency or add proper lint-staged
configuration and hook integration. To fix: if you intend to remove it, delete
the "lint-staged" entry from devDependencies and ensure no scripts or docs
reference it; if you intend to keep it, add a .lintstagedrc or
lint-staged.config.js (or add a "lint-staged" section in package.json) with the
desired file patterns and commands, then update .husky/pre-commit to run npx
--no-install lint-staged (or the equivalent npm script) so the pre-commit hook
actually executes lint-staged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant