chore(frontend): remove unused variables and imports to fix lint warnings#1466
chore(frontend): remove unused variables and imports to fix lint warnings#1466lepitaaar wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| 파일/그룹 | 요약 |
|---|---|
Mock 핸들러 frontend/src/mocks/handlers/promotion.ts |
POST 핸들러에서 request.json() 결과를 변수에 저장하지 않도록 변경. 응답 페이로드와 제어 흐름은 유지. |
관리자 페이지 컴포넌트 frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsx, frontend/src/pages/AdminPage/tabs/RecruitEditTab/RecruitEditTab.tsx |
useGetApplicants 훅에서 미사용 값 제거, useQueryClient 임포트 삭제. |
배너 및 부스 맵 컴포넌트 frontend/src/pages/FestivalPage/components/BoothMapSection/BoothMapSection.tsx, frontend/src/pages/MainPage/components/Banner/bannerData.ts |
미사용 React 임포트(useEffect) 제거, ClubFair 배너 이미지 임포트 삭제. |
예상 코드 리뷰 소요 시간
🎯 1 (Trivial) | ⏱️ ~3 분
관련 가능성 있는 PR
- [feature] 11월 패치노트 배너 추가 및 Banner 컴포넌트 구조 개선 #858: 동일한 배너 데이터 모듈(
bannerData.ts) 및 이미지 임포트를 수정하는 관련 변경 - [fix] 동소한 페이지 디자인 수정, 팝업 이미지 최적화 및 이벤트 트래킹 추가 #1289: 동일한 파일(
BoothMapSection.tsx)을 수정하며, 해당 PR은 shadowColor props 및 추적 변경 추가 - [release] FE v1.5.0 #1386: 동일한 파일(
promotion.ts)의 mock 데이터를 수정하는 관련 변경
제안 라벨
💻 FE, 🛠Fix
제안 리뷰어
- seongwon030
- suhyun113
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목이 변경 사항의 주요 내용을 명확하게 요약합니다: 미사용 변수와 imports 제거로 lint 경고 해결. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
fix/tech-debt-lint-frontend-20260415-v2
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
✅ UI 변경사항 없음
전체 56개 스토리 · 22개 컴포넌트 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/mocks/handlers/promotion.ts (1)
54-54: 사용하지 않는 변수 제거 완료, 추가 단순화 고려 가능lint 경고를 수정하기 위해 사용하지 않는
body변수를 제거한 것은 올바른 접근입니다.현재 이 mock 핸들러는 요청 본문과 관계없이 고정된 응답을 반환하므로,
await request.json()라인 전체를 제거하는 것도 고려할 수 있습니다. 다만 요청 본문을 소비하는 것이 의도적일 수 있으므로, 현재 상태로도 문제없습니다.♻️ 추가 단순화가 필요한 경우 제안
요청 본문이 전혀 사용되지 않는다면 아래와 같이 더 단순화할 수 있습니다:
http.post(`${API_BASE_URL}/api/promotion`, async ({ request }) => { - await request.json(); - return HttpResponse.json({🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/mocks/handlers/promotion.ts` at line 54, The mock handler in frontend/src/mocks/handlers/promotion.ts currently calls await request.json() but never uses the parsed body; remove that unused await request.json() line from the promotion mock handler (or explicitly keep a comment if consuming the body is intentional) so the handler returns the fixed response without creating an unused variable or triggering lint warnings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/src/mocks/handlers/promotion.ts`:
- Line 54: The mock handler in frontend/src/mocks/handlers/promotion.ts
currently calls await request.json() but never uses the parsed body; remove that
unused await request.json() line from the promotion mock handler (or explicitly
keep a comment if consuming the body is intentional) so the handler returns the
fixed response without creating an unused variable or triggering lint warnings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c0190ec5-acdb-46e4-9f44-f8639b9ea3c6
📒 Files selected for processing (5)
frontend/src/mocks/handlers/promotion.tsfrontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsxfrontend/src/pages/AdminPage/tabs/RecruitEditTab/RecruitEditTab.tsxfrontend/src/pages/FestivalPage/components/BoothMapSection/BoothMapSection.tsxfrontend/src/pages/MainPage/components/Banner/bannerData.ts
💤 Files with no reviewable changes (3)
- frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsx
- frontend/src/pages/AdminPage/tabs/RecruitEditTab/RecruitEditTab.tsx
- frontend/src/pages/MainPage/components/Banner/bannerData.ts
|
Maintainer 요청에 따라 자동 생성 PR 운영을 중단하며 본 PR을 닫습니다. 필요 시 수동으로 재개하겠습니다. |
Summary by CodeRabbit
릴리스 노트