Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11팀 임재도] [Chapter 2-2] 디자인 패턴과 함수형 프로그래밍 #8

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8e2776c
chore : eslint 및 prettier 설정
effozen Jan 12, 2025
627d442
refactor : prettier, eslint 코드에 적용해서 여백만 수정
effozen Jan 12, 2025
ea6540b
chore : eslint, prettier 재설정 (flat config 양식)
effozen Jan 12, 2025
9e660c9
chore : prettier 재설정
effozen Jan 13, 2025
9b954f9
refactor : 컨텐츠 별 요소 분리 및 주석 추가
effozen Jan 13, 2025
b86e5b5
refactor : AdminPage 디렉토리 수정
effozen Jan 13, 2025
6f3e582
feat: useCoupon 구현
effozen Jan 14, 2025
ed956c3
feat: useProduct 구현
effozen Jan 14, 2025
1ef81ee
feat: cart 요소 구현
effozen Jan 15, 2025
e46bf27
feat: useCart 구현
effozen Jan 15, 2025
3fcf3ce
refactor: FSD 유사하게, 디렉토리 차원에서의 범주화
effozen Jan 15, 2025
11fb480
chore : 절대경로 설정
effozen Jan 15, 2025
e407735
chore : 절대경로 설정 및 테스트코드에 내용 반영
effozen Jan 15, 2025
92ac343
feat : FSD 도입 및 initial data 분리
effozen Jan 15, 2025
62e3715
feat : calculate 로직 분리
effozen Jan 15, 2025
34fcca2
feat : CartPage에서 비즈니스 로직들 분리
effozen Jan 15, 2025
051b8a8
feat : 공통 헤더 컴포넌트 선언
effozen Jan 15, 2025
547171a
chore : zustand 추가
effozen Jan 16, 2025
ff7b379
feat : cartStore 생성 후, 전역으로 데이터 처리하게 수정
effozen Jan 16, 2025
5a80991
feat: feature 요소 entities로 이동
effozen Jan 16, 2025
0910211
feat: cartItem 분리
effozen Jan 16, 2025
aceb2e6
feat: Layout 분리
effozen Jan 16, 2025
ab69224
feat: GridItem 분리
effozen Jan 16, 2025
348459c
feat: Button 분리
effozen Jan 16, 2025
958c6e9
feat: SelectedItem 분리
effozen Jan 16, 2025
d5c50eb
feat: App의 Product를 전역상태로 분리
effozen Jan 16, 2025
465bd5a
feat: App의 Coupon을 전역상태로 분리
effozen Jan 16, 2025
70f57b1
refactor: couponStore.tsx의 이름 수정
effozen Jan 16, 2025
b9783f1
feat : advanced 테스트 코드 작성
effozen Jan 16, 2025
98dfa2c
feat : calculate 순수함수 작성
effozen Jan 16, 2025
c9ee087
feat : addItem 순수함수 작성
effozen Jan 16, 2025
4638a22
test : 순수함수에 대한 테스트코드 작성
effozen Jan 16, 2025
52c4a30
fix : calculate 연산 오류 수정
effozen Jan 16, 2025
a23d6c8
feat : useAdminCoupon 커스텀 훅 분리
effozen Jan 16, 2025
bb057cb
test : useAdminCoupon 커스텀 훅 테스트코드 작성
effozen Jan 16, 2025
de993e0
chore : workflow 오타 수정
effozen Jan 16, 2025
c12c5c6
chore : workflow 오타 수정
effozen Jan 16, 2025
412453d
chore : workflow pnpm으로 수정
effozen Jan 16, 2025
7f2cd82
chore : eslint, airbnb 충돌 오류 수정
effozen Jan 16, 2025
816d52f
chore : eslint, airbnb 충돌 오류 수정 - 리액트 훅 린트 버전 낮춤
effozen Jan 16, 2025
28fa451
chore : eslint, airbnb 의존성 충돌 수정
effozen Jan 16, 2025
37a773f
chore : 설정에서 airbnb 요소 제거
effozen Jan 16, 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
18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows_/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
npm install
npm run test:basic
advacned:
advanced:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -37,4 +37,4 @@ jobs:
- name: advanced-test
run: |
npm install
npm run test:advanced
npm run test:advanced
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=true
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 120,
"tabWidth": 2
}
70 changes: 70 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import a11y from 'eslint-plugin-jsx-a11y';
import vitest from 'eslint-plugin-vitest';
import prettier from 'eslint-plugin-prettier';
export default [
{
files: ['*.ts', '*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
project: [
'./tsconfig.json',
'./tsconfig.app.json',
'./tsconfig.node.json',
],
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': typescript,
react,
'react-hooks': reactHooks,
'jsx-a11y': a11y,
vitest,
prettier,
},
rules: {
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off', // React 17+ JSX transform 사용
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
'react/function-component-definition': [
'error',
{
namedComponents: 'function-declaration',
unnamedComponents: 'arrow-function',
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/explicit-function-return-type': 'off',
'import/prefer-default-export': 'off', // 유틸 함수 내보내기 규칙 맞춤
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'jsx-a11y/anchor-is-valid': 'off', // Next.js의 <Link> 지원
},
},
{
files: ['*.test.{ts,tsx}'],
plugins: {
vitest,
},
rules: {
'vitest/no-disabled-tests': 'warn',
'vitest/no-focused-tests': 'error',
'vitest/no-identical-title': 'error',
},
},
{
ignores: ['dist/', 'node_modules/'],
},
];
16 changes: 13 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"zustand": "^5.0.3"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.6.2",
Expand All @@ -28,9 +29,18 @@
"@typescript-eslint/parser": "^8.10.0",
"@vitejs/plugin-react-swc": "^3.7.1",
"@vitest/ui": "^2.1.3",
"eslint": "^9.12.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint": "^8.2.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.12",
"eslint-plugin-testing-library": "^7.1.1",
"eslint-plugin-vitest": "^0.5.4",
"jsdom": "^26.0.0",
"prettier": "^3.4.2",
"typescript": "^5.6.3",
"vite": "^5.4.9",
"vitest": "^2.1.3"
Expand Down
Loading
Loading