Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
75bda2b
chore: FSD구조를 위해 eslint 설정
Wonny-ing Apr 29, 2025
d13240e
refactor: UI 컴포넌트 분리
Wonny-ing Apr 29, 2025
55a8b3c
chore: tsconfig 절대경로 설정 추가 및 prettier 수정
Wonny-ing Apr 29, 2025
313ea0b
refactor: 영역별로 컴포넌트 분리
Wonny-ing Apr 29, 2025
5120d72
refactor: post 관련 타입을 entities/post/model/types.ts로 이동
Wonny-ing May 1, 2025
afd8048
refactor: FSD 구조에 맞게 post 관련 API 호출 로직을 별도의 서비스 파일로 이동
Wonny-ing May 1, 2025
0a21678
chore: post 엔티티에 TanStack Query를 위한 쿼리와 뮤테이션 파일 생성
Wonny-ing May 1, 2025
0a8f878
refactor: user 관련 타입을 entities/user/model/types.ts 로 이동
Wonny-ing May 1, 2025
feef475
chore: FSD 구조에 맞게 user 관련 API 호출 로직을 별도의 서비스 파일에 작성
Wonny-ing May 1, 2025
7c69160
chore: user 엔티티에 TanStack Query를 위한 쿼리 파일 생성
Wonny-ing May 1, 2025
18c5b8c
chore: user 관련 타입을 entities/comment/model/types.ts 에 정의 및 FSD 구조에 맞게 …
Wonny-ing May 1, 2025
3118629
chore: comment 엔티티에 TanStack Query를 위한 쿼리, 뮤테이션 파일 생성
Wonny-ing May 1, 2025
9e16f7c
feat: post 관련 로직을 TanStack Query 기반으로 교체
Wonny-ing May 1, 2025
dc2c4f2
feat: user관련 로직을 Tanstack Query 기반으로 교체
Wonny-ing May 1, 2025
54e6e4f
feat: comment 관련 로직을 Tanstack Query 기반으로 교체
Wonny-ing May 1, 2025
da242a1
refactor: highlightText 컴포넌트화
Wonny-ing May 1, 2025
e332c48
refactor: 각 컴포넌트에서 호출할 수 있는 함수 및 훅들을 이동시킴
Wonny-ing May 1, 2025
9b66ac1
refactor: zustand 라이브러리 사용하여서 전역으로 상태 관리
Wonny-ing May 1, 2025
09c4d5c
refactor: 알맞는 레이어로 파일 이동
Wonny-ing May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"semi": false,
"printWidth": 120,
"printWidth": 100,
"tabWidth": 2,
"singleQuote": false,
"quoteProps": "consistent",
"trailingComma": "all",
"singleAttributePerLine": false
}
}
75 changes: 62 additions & 13 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,77 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import js from "@eslint/js"
import globals from "globals"
import reactHooks from "eslint-plugin-react-hooks"
import reactRefresh from "eslint-plugin-react-refresh"
import boundaries from "eslint-plugin-boundaries"
import importPlugin from "eslint-plugin-import"
import simpleImportSort from "eslint-plugin-simple-import-sort"
import tseslint from "typescript-eslint"

export default tseslint.config(
{ ignores: ['dist'] },
{ ignores: ["dist"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
boundaries,
"import": importPlugin,
"simple-import-sort": simpleImportSort,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
...reactHooks.configs.recommended.rules, // Hook 호출 순서 문제 방지 및 의존성 배열 문제 방지
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }], // 컴포넌트 파일은 컴포넌트만 export함
"no-console": ["warn", { allow: ["warn", "error"] }],
"simple-import-sort/imports": "warn", // import 문을 정렬
"simple-import-sort/exports": "warn", // export 문을 정렬
"import/first": "error", // import 문은 파일 최상단에만 있어야 함
"import/no-duplicates": "error", // 같은 파일을 여러 번 import하면 에러

"no-restricted-imports": [
"error",
{
patterns: ["../*", "./*/../*"],
},
],

// boundaries: FSD 레이어 강제 - 상위에서 하위 요소를 import 하는 것만 가능
"boundaries/element-types": [
"error",
{
default: "disallow",
rules: [
{ from: "shared", allow: ["shared"] },
{ from: "entities", allow: ["shared", "entities"] },
{ from: "features", allow: ["shared", "entities", "features"] },
{ from: "widgets", allow: ["shared", "entities", "features", "widgets"] },
{ from: "pages", allow: ["shared", "entities", "features", "widgets", "pages"] },
],
},
],
},
settings: {
"import/resolver": {
node: {
paths: ["src"],
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
},
// boundaries 플러그인 설정
"boundaries": {
defaultIgnore: ["**/*.test.ts", "**/*.test.tsx"],
types: [
{ type: "shared", pattern: "src/shared/*" },
{ type: "entities", pattern: "src/entities/*" },
{ type: "features", pattern: "src/features/*" },
{ type: "widgets", pattern: "src/widgets/*" },
{ type: "pages", pattern: "src/pages/*" },
],
},
},
},
)
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
"coverage": "vitest run --coverage"
},
"dependencies": {
"@tanstack/react-query": "^5.74.11",
"@tanstack/react-query-devtools": "^5.75.0",
"react": "^19.1.0",
"react-dom": "^19.1.0"
"react-dom": "^19.1.0",
"zustand": "^5.0.3"
},
"devDependencies": {
"@eslint/js": "^9.25.1",
Expand All @@ -22,14 +25,21 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^22.15.3",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@typescript-eslint/eslint-plugin": "^8.31.0",
"@typescript-eslint/parser": "^8.31.0",
"@vitejs/plugin-react": "^4.4.1",
"axios": "^1.9.0",
"class-variance-authority": "^0.7.1",
"eslint": "^9.25.1",
"eslint-import-resolver-typescript": "^4.3.4",
"eslint-plugin-boundaries": "^5.0.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^16.0.0",
"jsdom": "^26.1.0",
"lucide-react": "^0.503.0",
Expand Down
Loading