Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f8bdaa3
docs: cursorrules 설정
Legitgoons Jul 28, 2025
260c5ba
feat: prettier & eslint 설치
Legitgoons Jul 28, 2025
7a5c6a5
feat: prettier 설정
Legitgoons Jul 28, 2025
75668e6
feat: airbnb rule을 사용해 eslint 설정
Legitgoons Jul 28, 2025
d40406e
style: lint 적용
Legitgoons Jul 28, 2025
639696d
feat: lint ignore 설정
Legitgoons Jul 28, 2025
5caacdb
refactor: 상품 ID 상수 통일
Legitgoons Jul 28, 2025
af6b365
feat: 사용되지 않는 변수 제거
Legitgoons Jul 29, 2025
c6e5e12
refactor: 매직 넘버를 상수로 변경
Legitgoons Jul 29, 2025
ec05df8
refactor: 요일별 할인 및 적립 확장성 개선
Legitgoons Jul 29, 2025
72ad61d
refactor: 할인률 자연수로 변경 및 할인률 상수 추가 적용
Legitgoons Jul 29, 2025
316284e
refactor: 상품 데이터 관리를 위해 prodList -> useProductData 객체 구현
Legitgoons Jul 29, 2025
13f3e65
refactor: useProductData의 getProducts 메소드를 사용해서 상품 목록을 가져가도록 수정
Legitgoons Jul 29, 2025
4d35d77
refactor: getTotalStock을 사용해 총 재고를 가져가도록 수정
Legitgoons Jul 29, 2025
3247353
refactor: findProductById를 사용해 상품 id로 상품을 찾도록 수정
Legitgoons Jul 30, 2025
aca6c54
refactor: useStockManager 객체를 사용해 재고 관리 로직 캡슐화
Legitgoons Jul 30, 2025
5603f17
fix: Linter 에러 해결
Legitgoons Jul 30, 2025
c11f7ba
feature: useCartManager 객체 기본 구조 생성
Legitgoons Jul 30, 2025
1454864
feature: useCartManager 계산 메서드 구현
Legitgoons Jul 30, 2025
bbcb70b
refactor: 전역 변수 사용처를 useCartManager 메서드로 교체
Legitgoons Jul 30, 2025
4eb262a
refactor: totalAmt, itemCnt 전역 변수 완전 제거
Legitgoons Jul 30, 2025
3fb54e8
feature: useBonusPointsManager 기본 구조 생성
Legitgoons Jul 30, 2025
f5a8702
feature: useBonusPointsManager 보너스 계산 메서드 구현
Legitgoons Jul 30, 2025
edba679
refactor: doRenderBonusPoints 함수를 useBonusPointsManager 사용하도록 수정
Legitgoons Jul 30, 2025
32e7ae9
refactor: bonusPts 전역 변수 완전 제거
Legitgoons Jul 30, 2025
5c7049f
refactor: UI 스타일 업데이트 함수들 분리
Legitgoons Jul 30, 2025
c39856f
refactor: 주문 요약 렌더링 함수들 분리
Legitgoons Jul 30, 2025
e74be1b
refactor: handleCalculateCartStuff 함수 분할 완료
Legitgoons Jul 30, 2025
2dd933d
refactor: 변수명과 함수명 Clean Code 규칙 적용
Legitgoons Jul 31, 2025
5a10d24
refactor: Linter 에러 해결 - const 변수 선언 및 함수 호이스팅 정리
Legitgoons Jul 31, 2025
8bc5b5f
refactor: renderOrderSummaryDetails 함수 3단계 분리 - 데이터 계산, 템플릿 생성, DOM 렌…
Legitgoons Jul 31, 2025
6ed659a
refactor: updateProductSelectOptions 함수 3단계 분리 - 상품 데이터 계산, 옵션 생성, DO…
Legitgoons Jul 31, 2025
91d1472
refactor: updateCartItemPrices 함수 3단계 분리 - 가격 데이터 계산, DOM 렌더링 책임 분리
Legitgoons Jul 31, 2025
01ff20f
refactor: updateTotalAndPointsDisplay 함수 3단계 분리 - 총액 포인트 데이터 계산, DOM …
Legitgoons Jul 31, 2025
8f01d43
refactor: renderDiscountInfoPanel 함수 3단계 분리 - 할인 데이터 계산, 템플릿 생성, DOM …
Legitgoons Jul 31, 2025
ddb2acb
docs: Phase 2 UI 렌더링 모듈 분리 완료 - 5개 렌더러 객체 분리, 관심사 분리 95% 달성, React 마이…
Legitgoons Jul 31, 2025
0d4cd3b
refactor: addToCartButton 이벤트 핸들러의 순수 함수 분리
Legitgoons Jul 31, 2025
d281d65
refactor: cartDisplayElement 이벤트 핸들러 순수 함수 분리
Legitgoons Jul 31, 2025
32b5df3
refactor: 전역 변수를 useDOMManager 객체로 캡슐화
Legitgoons Jul 31, 2025
11f7244
refactor: 불변성 적용 - 직접 객체 수정을 불변 업데이트 메서드로 대체
Legitgoons Jul 31, 2025
2077c98
docs: Phase 3.4 불변성 적용 완료 - React 마이그레이션 100% 준비 완료
Legitgoons Jul 31, 2025
d95b3b9
refactor: for문을 Array.find()로 변경하여 코드 간소화
Legitgoons Jul 31, 2025
968ed6f
refactor: main() 함수 단일 책임 원칙 적용 - 6개 전문 함수로 분할
Legitgoons Jul 31, 2025
b0a9eff
chore: 불필요한 주석 제거
Legitgoons Jul 31, 2025
e7790af
refactor: TypeScript 변환 1단계 - 기본 타입 정의 및 DOM null 체크 추가
Legitgoons Jul 31, 2025
9b188c4
refactor: TypeScript 변환 2단계 - DOM 안전성 강화 및 렌더러 타입 정의
Legitgoons Jul 31, 2025
8bc021f
refactor: TypeScript 변환 3단계 - 이벤트 핸들러 및 계산 함수 타입 완성
Legitgoons Jul 31, 2025
4e34e16
docs: TypeScript 변환 완료 기록
Legitgoons Jul 31, 2025
3533a5c
refactor: basic 과제
Legitgoons Jul 31, 2025
0794c20
feat: React 설치 및 배포 설정
Legitgoons Aug 1, 2025
c8d6c75
feat: tsconfig 추가
Legitgoons Aug 1, 2025
03e8aad
docs: React 마이그레이션 계획서 작성
Legitgoons Aug 1, 2025
2f7a6ba
test: React 테스트 파일 마이그레이션 - 0단계 완료
Legitgoons Aug 1, 2025
6b77003
refactor: 도메인별 상수/타입 분리 - 1단계 완료
Legitgoons Aug 1, 2025
c80f649
docs: React 마이그레이션 계획서 진행상황 업데이트
Legitgoons Aug 1, 2025
989772c
feat: tsconfig jsx 옵션 추가
Legitgoons Aug 1, 2025
4892086
feat: Products 도메인 React 훅 변환 - 2단계 완료
Legitgoons Aug 1, 2025
401c503
refactor: ICartItem 타입 최적화 - IProduct 상속으로 중복 제거
Legitgoons Aug 1, 2025
eadbe17
feat: Cart 도메인 React 훅 변환 - 3단계 완료
Legitgoons Aug 1, 2025
688fd26
feat: Points/Stock/Discounts 도메인 React 훅 변환 - 4단계 완료
Legitgoons Aug 1, 2025
a8b50f6
feat: 특별 세일 타이머 React화 - 5단계 완료
Legitgoons Aug 1, 2025
d0ff806
feat: IProduct q -> quantity 수정 반영
Legitgoons Aug 1, 2025
70f75e3
docs: React 마이그레이션 계획서 진행상황 업데이트 - 2~5단계 완료
Legitgoons Aug 1, 2025
5a33c02
feat: 메인 앱 컴포넌트 구현 - 6단계 완료
Legitgoons Aug 1, 2025
03bed60
docs: React 마이그레이션 최종 완료 - 100% 완성
Legitgoons Aug 1, 2025
9373223
fix: 배포 경로 수정
Legitgoons Aug 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
84 changes: 84 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Clean Code Writing Rules

## MANDATORY CODE WRITING RULES

You MUST follow these rules when writing any code:

### CORE DESIGN PRINCIPLES
- **DRY**: NEVER repeat the same code
- **KISS**: Write code as simply as possible
- **YAGNI**: Do NOT write unnecessary code
- **Single Responsibility**: Functions MUST be under 20 lines and have ONE clear responsibility

### CODE ORGANIZATION RULES
Apply these 4 organization principles:
- **Proximity**: Group related elements with blank lines
- **Commonality**: Group related functionality into functions
- **Similarity**: Use similar names and positions for similar roles
- **Continuity**: Arrange code in dependency order

### NAMING REQUIREMENTS

#### Naming Principles (ALL MUST BE FOLLOWED)
1. **Predictable**: Name must allow prediction of value, type, and return value
2. **Contextual**: Add descriptive adjectives or nouns for context
3. **Clear**: Remove unnecessary words while maintaining clear meaning
4. **Concise**: Brief yet clearly convey role and purpose
5. **Consistent**: Use identical terms for identical intentions across entire codebase

#### REQUIRED Naming Patterns

**Action Functions - USE THESE PATTERNS:**
```
// Creation: create~(), add~(), push~(), insert~(), new~(), append~(), spawn~(), make~(), build~(), generate~()
// Retrieval: get~(), fetch~(), query~()
// Transformation: parse~(), split~(), transform~(), serialize~()
// Modification: update~(), mutation~()
// Deletion: delete~(), remove~()
// Communication: put~(), send~(), dispatch~(), receive~()
// Validation: validate~(), check~()
// Calculation: calc~(), compute~()
// Control: init~(), configure~(), start~(), stop~()
// Storage: save~(), store~()
// Logging: log~(), record~()
```

**Data Variables - USE THESE PATTERNS:**
```
// Quantities: count~, sum~, num~, min~, max~, total
// State: is~, has~, current~, selected~
// Progressive/Past: ~ing, ~ed
// Information: ~name, ~title, ~desc, ~text, ~data
// Identifiers: ~ID, ~code, ~index, ~key
// Time: ~at, ~date
// Type: ~type
// Collections: ~s
// Others: item, temp, params, error
// Conversion: from(), of()
```

### ABSTRACTION RULES
- **Data Abstraction**: Simplify data structure and processing methods
- **Process Abstraction**: Encapsulate complex logic into simple interfaces
- **Appropriate Level**: Do NOT over-abstract or under-abstract

### MANDATORY CHECKLIST

Before finalizing ANY code, you MUST verify:

1. ✅ **Applied standard naming patterns** from above
2. ✅ **Organized code using 4 organization principles**
3. ✅ **Split complex logic into small functions**
4. ✅ **Code expresses intent without comments** (comments only when absolutely necessary)
5. ✅ **Maintained consistent formatting**

### FORBIDDEN PRACTICES
- ❌ Do NOT mix similar terms (`display` vs `show`)
- ❌ Do NOT write functions longer than 20 lines
- ❌ Do NOT repeat code patterns
- ❌ Do NOT use unclear or ambiguous names
- ❌ Do NOT violate naming consistency across codebase


## COMPLIANCE REQUIREMENT
ALL code output MUST comply with these rules. No exceptions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.test.js
*.spec.js
vite.config.js
eslint.config.js
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 120
}
Loading