diff --git a/.eslintrc.js b/.eslintrc.js index ade2335a..f567ec12 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -55,5 +55,6 @@ module.exports = { ], "react/no-array-index-key": 0, "consistent-return": 0, + "react-hooks/exhaustive-deps": "off", }, }; diff --git a/src/assets/icons/ArrowIcon.tsx b/src/assets/icons/ArrowIcon.tsx index 5d8567a9..4e580206 100644 --- a/src/assets/icons/ArrowIcon.tsx +++ b/src/assets/icons/ArrowIcon.tsx @@ -34,5 +34,6 @@ const ArrowIcon = ({ const StyledSVG = styled.svg` cursor: pointer; -` +`; + export default ArrowIcon; diff --git a/src/components/common/DragDrop/hooks/useDragDrop.ts b/src/components/common/DragDrop/hooks/useDragDrop.ts index c1d89531..536b7bac 100644 --- a/src/components/common/DragDrop/hooks/useDragDrop.ts +++ b/src/components/common/DragDrop/hooks/useDragDrop.ts @@ -28,7 +28,6 @@ const useDragDrop = (handler: (file?: File) => void) => { handler(currentFile); setFile(currentFile); }, - // eslint-disable-next-line [], ); @@ -40,13 +39,11 @@ const useDragDrop = (handler: (file?: File) => void) => { const handleDragOut = React.useCallback((e: DragEvent) => { handleDragIn(e); setIsDragging(false); - // eslint-disable-next-line }, []); const handleDragOver = React.useCallback((e: DragEvent) => { handleDragIn(e); if (e.dataTransfer) setIsDragging(true); - // eslint-disable-next-line }, []); const handleDrop = React.useCallback( @@ -55,7 +52,6 @@ const useDragDrop = (handler: (file?: File) => void) => { handleChangeFiles(e as unknown as React.DragEvent); setIsDragging(false); }, - // eslint-disable-next-line [handleChangeFiles], ); diff --git a/src/hooks/useDidMountEffect.ts b/src/hooks/useDidMountEffect.ts index 3cb44dea..35349d5b 100644 --- a/src/hooks/useDidMountEffect.ts +++ b/src/hooks/useDidMountEffect.ts @@ -6,7 +6,6 @@ const useDidMountEffect = (func: () => void, deps: React.DependencyList) => { React.useEffect(() => { if (didMount.current) func(); else didMount.current = true; - // eslint-disable-next-line }, deps); }; diff --git a/src/provider/StyledComponentsProvider.tsx b/src/provider/StyledComponentsProvider.tsx index 0ed649c5..bcbefe8b 100644 --- a/src/provider/StyledComponentsProvider.tsx +++ b/src/provider/StyledComponentsProvider.tsx @@ -12,11 +12,10 @@ const StyledComponentsRegistry = ({ children }: React.PropsWithChildren) => { useServerInsertedHTML(() => { const styles = styledComponentsStyleSheet.getStyleElement(); styledComponentsStyleSheet.instance.clearTag(); - // eslint-disable-next-line + return <>{styles}; }); - // eslint-disable-next-line if (typeof window !== "undefined") return <>{children}; return ( diff --git a/src/templates/meal/hooks/useMeal.ts b/src/templates/meal/hooks/useMeal.ts index 7e76eadd..b97ba081 100644 --- a/src/templates/meal/hooks/useMeal.ts +++ b/src/templates/meal/hooks/useMeal.ts @@ -53,7 +53,6 @@ const useMeal = () => { window.addEventListener("keydown", handleMealDateKeyDown); return () => window.removeEventListener("keydown", handleMealDateKeyDown); - // eslint-disable-next-line }, []); return { diff --git a/src/templates/meister/hooks/useMeister.tsx b/src/templates/meister/hooks/useMeister.tsx index e95d8405..1115cc3a 100644 --- a/src/templates/meister/hooks/useMeister.tsx +++ b/src/templates/meister/hooks/useMeister.tsx @@ -58,13 +58,11 @@ const useMeister = () => { setViewType("분석"); meisterDetailQuery.refetch().then(() => setButtonSwitch(false)); } - // eslint-disable-next-line }, [buttonSwitch]); React.useEffect(() => { handleStudentSearchClick(); setStudentNum(getStudentId(grade, classNum, studentNumber)); - // eslint-disable-next-line }, []); React.useEffect(() => { diff --git a/src/templates/meister/layouts/Ranking.tsx b/src/templates/meister/layouts/Ranking.tsx index 892d8f3a..85393285 100644 --- a/src/templates/meister/layouts/Ranking.tsx +++ b/src/templates/meister/layouts/Ranking.tsx @@ -15,7 +15,6 @@ const Ranking = () => { useDidMountEffect(() => { refetch(); - // eslint-disable-next-line }, [currentGrade]); return ( diff --git a/src/templates/post/layouts/detail/comment/CommentWritableBox.tsx b/src/templates/post/layouts/detail/comment/CommentWritableBox.tsx index 2b8676bc..5679db0c 100644 --- a/src/templates/post/layouts/detail/comment/CommentWritableBox.tsx +++ b/src/templates/post/layouts/detail/comment/CommentWritableBox.tsx @@ -28,7 +28,6 @@ const CommentWritableBox = ({ ...comment }: Comment) => { React.useEffect(() => { setCommentInput(comment.detail); - // eslint-disable-next-line }, []); return ( diff --git a/src/templates/post/layouts/detail/recomment/RecommentWritableBox.tsx b/src/templates/post/layouts/detail/recomment/RecommentWritableBox.tsx index 4532ddeb..8ae31c82 100644 --- a/src/templates/post/layouts/detail/recomment/RecommentWritableBox.tsx +++ b/src/templates/post/layouts/detail/recomment/RecommentWritableBox.tsx @@ -28,7 +28,6 @@ const RecommentWritableBox = ({ ...recomment }: Recomment) => { React.useEffect(() => { setRecommentInput(recomment.detail); - // eslint-disable-next-line }, []); return (