refactor: [Refactor] SonarCloud 코드 품질 개선 - Props ReadOnly 및 접근성 이슈 수정 (#1243)#1244
refactor: [Refactor] SonarCloud 코드 품질 개선 - Props ReadOnly 및 접근성 이슈 수정 (#1243)#1244
Conversation
Walkthrough이 PR은 SonarCloud 코드 품질 개선을 위해 컴포넌트 props에 Changes코드 품질 및 타입 정리
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Summary
SonarCloud에서 검출된 20개 코드 품질 이슈를 수정합니다.
Changes
src/components/CampusInfo/index.tsxShopIconProps→Readonly<{...}>src/components/Callvan/components/CallvanRestrictionModal/index.tsxreadonly추가,<div role="dialog">→<dialog open>src/components/Callvan/components/AddPostForm/index.tsxconvertTo24Hour헬퍼 함수 추출src/components/Callvan/components/CallvanPageLayout/index.tsx!== 'ALL'→=== 'ALL')src/components/Callvan/utils/callvanQuery.tssrc/components/TimetablePage/components/MainTimetable/index.tsxreadonly추가, 중복isSemesterAndTimetableExist→validateSemesterAndTimetable공유 함수 추출src/components/TimetablePage/components/TimetableGridPlaceholder/index.tsxreadonly추가src/pages/room/[id]/index.tsxRoomDetailPagePropspropsreadonly추가src/pages/timetable/index.tsxgetServerSidePropsCognitive Complexity 19 → 5 (prefetchTimetableWithToken추출)src/utils/ts/withCacheControl.tsquerystring→node:querystring, call-signature 전용interface→typesrc/api/articles/queries.tsnumber | string | null유니온 →ChatroomParamId타입 알리아스src/api/bus/queries.tsas Depart,as Arrival타입 단언 제거SonarCloud Issues Fixed
role="dialog"→<dialog>요소로 접근성 개선getServerSidePropsCognitive Complexity 19 → 15 이하로 감소withCacheControl.ts:node:querystring사용, call-signature interface → function typeMainTimetable동일 구현 중복 함수 제거Test Plan
yarn lint통과 확인yarn tsc --noEmit타입 오류 없음 확인Related
Closes #1243
Summary by CodeRabbit
릴리스 노트
Chores
기타 개선사항