Skip to content

chore(frontend): remove unused variables and imports to fix lint warnings#1466

Closed
lepitaaar wants to merge 1 commit into
mainfrom
fix/tech-debt-lint-frontend-20260415-v2
Closed

chore(frontend): remove unused variables and imports to fix lint warnings#1466
lepitaaar wants to merge 1 commit into
mainfrom
fix/tech-debt-lint-frontend-20260415-v2

Conversation

@lepitaaar
Copy link
Copy Markdown
Contributor

@lepitaaar lepitaaar commented Apr 15, 2026

  • Removed unused useEffect import from BoothMapSection.tsx.\n- Removed unused useQueryClient import from RecruitEditTab.tsx.\n- Removed unused image imports (ClubFairDesktopImage, ClubFairMobileImage) from bannerData.ts.\n- Removed unused 'body' variable assignment in promotion.ts.\n- Removed unused 'isLoading' and 'isError' variables in ApplicantsTab.tsx.

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 사용하지 않는 변수 및 import 정리로 코드 품질 개선

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview, Comment Apr 15, 2026 4:50pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

개요

여러 파일에서 사용되지 않는 임포트 및 변수를 제거했습니다. 프로모션 핸들러의 요청 처리 로직을 수정하고, 컴포넌트에서 미사용 훅 값을 정리하며, 배너 이미지 임포트를 삭제했습니다.

변경 사항

파일/그룹 요약
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

제안 라벨

💻 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.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

✅ UI 변경사항 없음

구분 링크
📖 Storybook https://67904e61c16daa99a63b44a7-tseldviqpl.chromatic.com/

전체 56개 스토리 · 22개 컴포넌트

Copy link
Copy Markdown
Contributor

@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.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0ec3a42 and c670f7b.

📒 Files selected for processing (5)
  • frontend/src/mocks/handlers/promotion.ts
  • frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsx
  • frontend/src/pages/AdminPage/tabs/RecruitEditTab/RecruitEditTab.tsx
  • frontend/src/pages/FestivalPage/components/BoothMapSection/BoothMapSection.tsx
  • frontend/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

@lepitaaar
Copy link
Copy Markdown
Contributor Author

Maintainer 요청에 따라 자동 생성 PR 운영을 중단하며 본 PR을 닫습니다. 필요 시 수동으로 재개하겠습니다.

@lepitaaar lepitaaar closed this Apr 18, 2026
@seongwon030 seongwon030 deleted the fix/tech-debt-lint-frontend-20260415-v2 branch May 22, 2026 07:23
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