Skip to content

Commit 8250001

Browse files
committed
chore: refactor indentation
1 parent 6d0f299 commit 8250001

File tree

18 files changed

+111
-89
lines changed

18 files changed

+111
-89
lines changed

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineConfig } from "eslint/config";
2+
import path from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
import js from "@eslint/js";
5+
import { FlatCompat } from "@eslint/eslintrc";
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all
13+
});
14+
15+
export default defineConfig([{
16+
extends: compat.extends("next", "prettier", "next/core-web-vitals"),
17+
18+
rules: {
19+
indent: ["error", 2],
20+
},
21+
}]);

next-env.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
6+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

src/app/community/boards/[boardId]/components/Post.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export function Post({ post }: PropsPost) {
3131
<PhotoZone>
3232
{images
3333
? images.map((src, idx) =>
34-
idx < 1 ? <Photo key={src} src={src} alt="게시글 사진 모음" /> : null,
35-
)
34+
idx < 1 ? <Photo key={src} src={src} alt="게시글 사진 모음" /> : null,
35+
)
3636
: null}
3737
</PhotoZone>
3838
</Container>
@@ -83,7 +83,7 @@ const Info = styled.div<{ isImages: boolean | null }>`
8383
height: min-content;
8484
8585
${(props) =>
86-
props.isImages !== null &&
86+
props.isImages !== null &&
8787
css`
8888
max-width: calc(100% - 71.5px);
8989
`}

src/app/community/boards/[boardId]/posts/[postId]/Posts.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export default function Post({ boardId, postId }: { boardId: number; postId: num
4949

5050
const actions: ModalAction[] = post.isMine
5151
? [
52-
{ name: "수정", handleClick: () => updatePost(post.id) },
53-
{ name: "삭제", handleClick: () => removePost(post.id) },
54-
]
52+
{ name: "수정", handleClick: () => updatePost(post.id) },
53+
{ name: "삭제", handleClick: () => removePost(post.id) },
54+
]
5555
: [{ name: "신고", handleClick: () => reportPost(post.id) }];
5656

5757
const onClickMoreActions = (actions: ModalAction[]) => {

src/app/community/boards/[boardId]/posts/[postId]/components/Comment.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ export default function Comment({ comment, deleteComment, toggleLike }: CommentP
5757
comment.isMine
5858
? { name: "삭제", handleClick: onClickDelete }
5959
: {
60-
name: "신고",
61-
handleClick: onClickReport,
62-
},
60+
name: "신고",
61+
handleClick: onClickReport,
62+
},
6363
];
6464

6565
return (

src/app/community/write/components/BoardSelectDropdown.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ export function BoardSelectDropdown({ boards, onSelect }: BoardSelectDropdownPro
4040
}, [selectedBoardId]);
4141

4242
return (
43-
<Container ref={dropdownRef}>
44-
<BoardMenu onClick={toggleDropdown}>
45-
<span>{selectedBoardName}</span>
46-
<Icon src="/img/down-arrow.svg" style={{ width: "11px" }} alt="게시판 선택" />
47-
</BoardMenu>
48-
<BoardMenuList isOpen={isOpen}>
49-
{boards.map((board) => (
50-
<BoardMenuItem key={board.id} onClick={() => handleClickItem(board.id)} className={board.id === selectedBoardId ? "selected" : ""}>
51-
<span>{board.name}</span>
52-
</BoardMenuItem>
53-
))}
54-
</BoardMenuList>
55-
</Container>
56-
);
43+
<Container ref={dropdownRef}>
44+
<BoardMenu onClick={toggleDropdown}>
45+
<span>{selectedBoardName}</span>
46+
<Icon src="/img/down-arrow.svg" style={{ width: "11px" }} alt="게시판 선택" />
47+
</BoardMenu>
48+
<BoardMenuList isOpen={isOpen}>
49+
{boards.map((board) => (
50+
<BoardMenuItem key={board.id} onClick={() => handleClickItem(board.id)} className={board.id === selectedBoardId ? "selected" : ""}>
51+
<span>{board.name}</span>
52+
</BoardMenuItem>
53+
))}
54+
</BoardMenuList>
55+
</Container>
56+
);
5757
}
5858

5959
const Container = styled.div`

src/app/components/Meal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ const MealText = styled.div`
104104
font-weight: 400;
105105
106106
color: ${(props: { active: boolean }) =>
107-
props.active ? "var(--Color-Foundation-orange-500)" : "#919191"};
107+
props.active ? "var(--Color-Foundation-orange-500)" : "#919191"};
108108
}
109109
`;

src/app/components/MobileFilter/MobileBottomSheet.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ export default function MobileBottomSheet({
7979
<BottomSheetWrapper isVisible={isOpen} translateY={translateY} isAnimating={isAnimating}>
8080
{
8181
showHandle ?
82-
<BottomSheetHandle onMouseDown={handleDragStart} onTouchStart={handleDragStart}>
83-
<div style={{
84-
width: "46px",
85-
height: "4px",
86-
backgroundColor: "var(--Color-Foundation-gray-200, #E5E6E9)",
87-
borderRadius: "2px",
88-
}}/>
89-
</BottomSheetHandle> :
90-
<div style={{ marginBottom: 16 }} />
82+
<BottomSheetHandle onMouseDown={handleDragStart} onTouchStart={handleDragStart}>
83+
<div style={{
84+
width: "46px",
85+
height: "4px",
86+
backgroundColor: "var(--Color-Foundation-gray-200, #E5E6E9)",
87+
borderRadius: "2px",
88+
}}/>
89+
</BottomSheetHandle> :
90+
<div style={{ marginBottom: 16 }} />
9191
}
9292
<CloseButton onClick={onClose} showHandle={showHandle}/>
9393
<BottomSheetContent headerHeight={headerHeight}>{children}</BottomSheetContent>

src/app/components/MobileFilterBar.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ export default function MobileFilterBar() {
174174
<ButtonText isActive={isSet.priceMin || isSet.priceMax}>
175175
{isSet.priceMin || isSet.priceMax
176176
? `${formatPrice(filterList.priceMin)}원 ~ ${
177-
isFinite(filterList.priceMax)
178-
? `${formatPrice(filterList.priceMax)}원`
179-
: `${formatPrice(PRICE_FILTER_OPTIONS.max)}원 이상`
180-
}`
177+
isFinite(filterList.priceMax)
178+
? `${formatPrice(filterList.priceMax)}원`
179+
: `${formatPrice(PRICE_FILTER_OPTIONS.max)}원 이상`
180+
}`
181181
: "가격"}
182182
</ButtonText>
183183
<Image
@@ -271,9 +271,9 @@ const Button = styled.button<{ isActive?: boolean }>`
271271
border-radius: 30px;
272272
border: 1px solid
273273
${(props) =>
274-
props.isActive
275-
? "var(--Color-Foundation-orange-500, #FF9522)"
276-
: "var(--Color-Foundation-gray-200, #E5E6E9)"};
274+
props.isActive
275+
? "var(--Color-Foundation-orange-500, #FF9522)"
276+
: "var(--Color-Foundation-gray-200, #E5E6E9)"};
277277
background: ${(props) =>
278278
props.isActive
279279
? "var(--Color-Foundation-orange-100, #FFEAD3)"

src/app/components/RestaurantInfo.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,24 @@ export default function RestaurantInfo() {
8585
{infoData.etc &&
8686
infoData.etc.operating_hours &&
8787
infoData.etc.operating_hours.weekdays.length != 0 && (
88-
<MobileOperatingHour type={"weekdays"} etc={etc} />
89-
)}
88+
<MobileOperatingHour type={"weekdays"} etc={etc} />
89+
)}
9090
{infoData.etc &&
9191
infoData.etc.operating_hours &&
9292
infoData.etc.operating_hours.saturday.length != 0 && (
93-
<>
94-
<HLine color={"#ECECEC"} margin={"2px"} />
95-
<MobileOperatingHour type={"saturday"} etc={etc} />
96-
</>
97-
)}
93+
<>
94+
<HLine color={"#ECECEC"} margin={"2px"} />
95+
<MobileOperatingHour type={"saturday"} etc={etc} />
96+
</>
97+
)}
9898
{infoData.etc &&
9999
infoData.etc.operating_hours &&
100100
infoData.etc.operating_hours.holiday.length != 0 && (
101-
<>
102-
<HLine color={"#ECECEC"} margin={"2px"} />
103-
<MobileOperatingHour type={"holiday"} etc={etc} />
104-
</>
105-
)}
101+
<>
102+
<HLine color={"#ECECEC"} margin={"2px"} />
103+
<MobileOperatingHour type={"holiday"} etc={etc} />
104+
</>
105+
)}
106106
{(!infoData.etc || !infoData.etc.operating_hours) && (
107107
<>
108108
<EmptyText>운영 시간 정보가 없습니다.</EmptyText>

0 commit comments

Comments
 (0)