Skip to content

멘토 신청 폼의 verificationFile 타입 안전성 개선 #358

@coderabbitai

Description

@coderabbitai

문제 설명

멘토 신청 폼의 verificationFile 필드에서 null as any 타입 단언을 사용하여 타입 체크를 우회하고 있습니다.

발생 위치

src/app/my/apply-mentor/_components/UniversityScreen/index.tsx

  • 라인 63: 잘못된 파일 형식일 때
  • 라인 73: 파일 크기 초과일 때
  • 라인 82: 파일 제거 시

근본 원인

schema.ts에서 verificationFile이 nullable을 허용하지 않도록 변경되었으나, 실제 사용자 경험상 파일을 제거하거나 유효하지 않은 파일을 처리할 때는 null 상태가 필요합니다.

제안 사항

  1. schema.ts에서 verificationFile을 nullable로 변경하되, refine을 통해 제출 시 non-null 검증
  2. 코드에서 as any 제거
  3. ESLint 설정에 @typescript-eslint/no-explicit-any 규칙 추가하여 향후 any 사용 방지

관련 링크

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions