Skip to content

Commit 170a432

Browse files
authored
chore(web): enforce no-console and remove console usage (#479)
1 parent 44e467a commit 170a432

37 files changed

+9
-84
lines changed

apps/web/biome.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"noNonNullAssertion": "off"
3333
},
3434
"suspicious": {
35+
"noConsole": "error",
3536
"noExplicitAny": "error",
3637
"noUnknownAtRules": "off",
3738
"useIterableCallbackReturn": "off"

apps/web/src/apis/Auth/postEmailVerification.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const usePostEmailSignUp = () => {
1111
return useMutation<EmailSignUpResponse, AxiosError, EmailSignUpRequest>({
1212
mutationFn: (data) => authApi.postEmailSignUp(data),
1313
onError: (error) => {
14-
console.error("이메일 회원가입 실패:", error);
1514
toast.error("회원가입에 실패했습니다.");
1615
},
1716
});

apps/web/src/apis/Auth/postSignUp.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const usePostSignUp = () => {
1111
return useMutation<SignUpResponse, AxiosError, SignUpRequest>({
1212
mutationFn: (data) => authApi.postSignUp(data),
1313
onError: (error) => {
14-
console.error("회원가입 실패:", error);
1514
toast.error("회원가입에 실패했습니다.");
1615
},
1716
});

apps/web/src/apis/Scores/postCreateGpa.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const usePostGpaScore = () => {
1818
},
1919

2020
onError: (error) => {
21-
console.error("학점 제출 중 오류 발생:", error);
2221
toast.error("오류가 발생했습니다. 다시 시도해주세요.");
2322
},
2423
});

apps/web/src/apis/Scores/postCreateLanguageTest.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const usePostLanguageTestScore = () => {
1818
},
1919

2020
onError: (error) => {
21-
console.error("어학 성적 제출 중 오류 발생:", error);
2221
toast.error("오류가 발생했습니다. 다시 시도해주세요.");
2322
},
2423
});

apps/web/src/apis/chat/putReadChatRoom.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ const usePutChatRead = () => {
1414
// 채팅방 목록 쿼리를 무효화하여 새로 고침
1515
queryClient.invalidateQueries({ queryKey: [ChatQueryKeys.chatRooms] });
1616
},
17-
onError: (error) => {
18-
console.error("채팅방 진입 읽기 실패", error);
19-
},
17+
onError: (error) => {},
2018
});
2119
};
2220

apps/web/src/apis/community/deleteComment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const useDeleteComment = () => {
2323
toast.success("댓글이 삭제되었습니다.");
2424
},
2525
onError: (error) => {
26-
console.error("댓글 삭제 실패:", error);
2726
toast.error("댓글 삭제에 실패했습니다.");
2827
},
2928
});

apps/web/src/apis/community/deleteLikePost.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const useDeleteLike = () => {
1717
queryClient.invalidateQueries({ queryKey: [CommunityQueryKeys.posts, postId] });
1818
},
1919
onError: (error) => {
20-
console.error("게시글 좋아요 취소 실패:", error);
2120
toast.error("좋아요 취소 처리에 실패했습니다.");
2221
},
2322
});

apps/web/src/apis/community/deletePost.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ interface DeletePostVariables {
2020
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
2121
try {
2222
if (!accessToken) {
23-
console.warn("Revalidation skipped: No access token available");
2423
return;
2524
}
2625

@@ -32,9 +31,7 @@ const revalidateCommunityPage = async (boardCode: string, accessToken: string) =
3231
},
3332
body: JSON.stringify({ boardCode }),
3433
});
35-
} catch (error) {
36-
console.error("Revalidate failed:", error);
37-
}
34+
} catch (error) {}
3835
};
3936

4037
/**
@@ -63,7 +60,6 @@ const useDeletePost = () => {
6360
router.replace(`/community/${variables.boardCode || "FREE"}`);
6461
},
6562
onError: (error) => {
66-
console.error("게시글 삭제 실패:", error);
6763
toast.error("게시글 삭제에 실패했습니다. 잠시 후 다시 시도해주세요.");
6864
},
6965
});

apps/web/src/apis/community/patchUpdatePost.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ interface UpdatePostVariables {
1919
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
2020
try {
2121
if (!accessToken) {
22-
console.warn("Revalidation skipped: No access token available");
2322
return;
2423
}
2524

@@ -31,9 +30,7 @@ const revalidateCommunityPage = async (boardCode: string, accessToken: string) =
3130
},
3231
body: JSON.stringify({ boardCode }),
3332
});
34-
} catch (error) {
35-
console.error("Revalidate failed:", error);
36-
}
33+
} catch (error) {}
3734
};
3835

3936
/**
@@ -58,7 +55,6 @@ const useUpdatePost = () => {
5855
toast.success("게시글이 수정되었습니다.");
5956
},
6057
onError: (error) => {
61-
console.error("게시글 수정 실패:", error);
6258
toast.error("게시글 수정에 실패했습니다.");
6359
},
6460
});

0 commit comments

Comments
 (0)