Skip to content

Commit 8e3422f

Browse files
authored
Merge pull request #163 from sebanimm/main
chore(lint): eslint react-hooks/exhaustive-deps 규칙 관련 코드 수정
2 parents 705b153 + 4ba6237 commit 8e3422f

File tree

10 files changed

+4
-14
lines changed

10 files changed

+4
-14
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ module.exports = {
5555
],
5656
"react/no-array-index-key": 0,
5757
"consistent-return": 0,
58+
"react-hooks/exhaustive-deps": "off",
5859
},
5960
};

src/assets/icons/ArrowIcon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ const ArrowIcon = ({
3434

3535
const StyledSVG = styled.svg`
3636
cursor: pointer;
37-
`
37+
`;
38+
3839
export default ArrowIcon;

src/components/common/DragDrop/hooks/useDragDrop.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const useDragDrop = (handler: (file?: File) => void) => {
2828
handler(currentFile);
2929
setFile(currentFile);
3030
},
31-
// eslint-disable-next-line
3231
[],
3332
);
3433

@@ -40,13 +39,11 @@ const useDragDrop = (handler: (file?: File) => void) => {
4039
const handleDragOut = React.useCallback((e: DragEvent) => {
4140
handleDragIn(e);
4241
setIsDragging(false);
43-
// eslint-disable-next-line
4442
}, []);
4543

4644
const handleDragOver = React.useCallback((e: DragEvent) => {
4745
handleDragIn(e);
4846
if (e.dataTransfer) setIsDragging(true);
49-
// eslint-disable-next-line
5047
}, []);
5148

5249
const handleDrop = React.useCallback(
@@ -55,7 +52,6 @@ const useDragDrop = (handler: (file?: File) => void) => {
5552
handleChangeFiles(e as unknown as React.DragEvent<HTMLInputElement>);
5653
setIsDragging(false);
5754
},
58-
// eslint-disable-next-line
5955
[handleChangeFiles],
6056
);
6157

src/hooks/useDidMountEffect.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const useDidMountEffect = (func: () => void, deps: React.DependencyList) => {
66
React.useEffect(() => {
77
if (didMount.current) func();
88
else didMount.current = true;
9-
// eslint-disable-next-line
109
}, deps);
1110
};
1211

src/provider/StyledComponentsProvider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ const StyledComponentsRegistry = ({ children }: React.PropsWithChildren) => {
1212
useServerInsertedHTML(() => {
1313
const styles = styledComponentsStyleSheet.getStyleElement();
1414
styledComponentsStyleSheet.instance.clearTag();
15-
// eslint-disable-next-line
15+
1616
return <>{styles}</>;
1717
});
1818

19-
// eslint-disable-next-line
2019
if (typeof window !== "undefined") return <>{children}</>;
2120

2221
return (

src/templates/meal/hooks/useMeal.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ const useMeal = () => {
5353

5454
window.addEventListener("keydown", handleMealDateKeyDown);
5555
return () => window.removeEventListener("keydown", handleMealDateKeyDown);
56-
// eslint-disable-next-line
5756
}, []);
5857

5958
return {

src/templates/meister/hooks/useMeister.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,11 @@ const useMeister = () => {
5858
setViewType("분석");
5959
meisterDetailQuery.refetch().then(() => setButtonSwitch(false));
6060
}
61-
// eslint-disable-next-line
6261
}, [buttonSwitch]);
6362

6463
React.useEffect(() => {
6564
handleStudentSearchClick();
6665
setStudentNum(getStudentId(grade, classNum, studentNumber));
67-
// eslint-disable-next-line
6866
}, []);
6967

7068
React.useEffect(() => {

src/templates/meister/layouts/Ranking.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const Ranking = () => {
1515

1616
useDidMountEffect(() => {
1717
refetch();
18-
// eslint-disable-next-line
1918
}, [currentGrade]);
2019

2120
return (

src/templates/post/layouts/detail/comment/CommentWritableBox.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const CommentWritableBox = ({ ...comment }: Comment) => {
2828

2929
React.useEffect(() => {
3030
setCommentInput(comment.detail);
31-
// eslint-disable-next-line
3231
}, []);
3332

3433
return (

src/templates/post/layouts/detail/recomment/RecommentWritableBox.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const RecommentWritableBox = ({ ...recomment }: Recomment) => {
2828

2929
React.useEffect(() => {
3030
setRecommentInput(recomment.detail);
31-
// eslint-disable-next-line
3231
}, []);
3332

3433
return (

0 commit comments

Comments
 (0)