Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
10e84aa
chore: eslint & prettier rule 팀 컨벤션 반영
esoby Aug 4, 2025
df9e3f8
refactor: basic 파일에 lint 적용
esoby Aug 4, 2025
7bf504e
refactor: ui 코드 section 기준 파일 분리
esoby Aug 4, 2025
2af9f01
refactor: product CRUD 상품 관리 훅으로 분리
esoby Aug 4, 2025
0ee5466
refactor: cart & coupon 관련 로직 분리
esoby Aug 4, 2025
78d70d5
refactor: notification 관련 로직 hook으로 분리
esoby Aug 4, 2025
6bcb75d
refactor: totalItemCount 상태 관리 헤더 내부로 지역화
esoby Aug 4, 2025
344901d
refactor: 초기 데이터 상수 분리
Aug 5, 2025
ce0cc0f
refactor: admin page 관련 ui 상태 app에서 분리
Aug 5, 2025
13d73eb
refactor: cartpage 컴포넌트 분리
Aug 5, 2025
c4a2cfa
refactor: header search bar 컴포넌트 분리
Aug 5, 2025
08f20b2
refactor: product item 컴포넌트 분리
Aug 5, 2025
fd4c327
refactor: product 비즈니스 로직 모델 파일로 분리
Aug 5, 2025
d8c9e6d
refactor: cart 비즈니스 로직 model 파일로 분리
Aug 6, 2025
776d791
refactor: useCart 모델 함수 적용 & 쿠폰 상태 관련 내용 삭제
Aug 6, 2025
761254a
refactor: useCoupons hook에 selected coupon 관리 추가
Aug 6, 2025
8a87944
refactor: cart 순수 계산 로직 utils로 분리
Aug 6, 2025
79dfd38
refactor: useCart 변경사항 컴포넌트 반영
Aug 6, 2025
bb4370e
refactor: format price 유틸 함수 추가
Aug 6, 2025
e5e8d50
refactor: format price 유틸 함수 적용
Aug 6, 2025
73385e6
refactor: format utils 파일 이름 변경
Aug 6, 2025
fd31773
refactor: 조합 훅 useStore 생성 및 적용
Aug 6, 2025
6415e50
refactor: coupon 비즈니스 로직 model 파일로 분리
Aug 6, 2025
ac2184d
refactor: useDebounce 구현 및 SearchBar 검색어에 적용
Aug 6, 2025
7eb6b6b
refactor: useLocalStorage 구현
Aug 6, 2025
b048d82
refactor: useLocalStorage product 상태 관리에 적용
Aug 6, 2025
a1353d5
refactor: discount, product model 분리
esoby Aug 6, 2025
d2ee0f7
refactor: admin page 컴포넌트 분리
esoby Aug 6, 2025
289708e
chore: 배포 설정
esoby Aug 7, 2025
18552b4
refactor: dismissnoti 추가
esoby Aug 7, 2025
60698dd
refactor: product interface 변경
esoby Aug 7, 2025
11f06dd
refactor: props interface 정의
esoby Aug 7, 2025
2c4a043
refactor: formatters validators 구현
esoby Aug 7, 2025
d4b86dc
fix: useNotification 내 useCallback 의존성 수정
esoby Aug 7, 2025
3ba6037
refactor: svg icon 컴포넌트 분리
esoby Aug 7, 2025
895bd10
chore: add a jotai dependency
esoby Aug 7, 2025
c26aaa9
init advanced project
esoby Aug 7, 2025
3bde99a
refactor: atoms 파일 추가
esoby Aug 7, 2025
33a472a
refactor: jotai 전역 상태 적용
esoby Aug 8, 2025
ae09e59
refactor: atomwithlocalstorage 추가
esoby Aug 8, 2025
dd21bc8
refactor: atomwithlocalstorage 적용
esoby Aug 8, 2025
c95f943
refactor: jotai provider 추가
Aug 8, 2025
2ace6fc
fix: resolve selected coupon state type error
Aug 8, 2025
fd10531
fix: replace stored atom utils
Aug 8, 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.

11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
semi: true,
singleQuote: true,
jsxSingleQuote: true,
tabWidth: 2,
bracketSpacing: true,
bracketSameLine: false,
arrowParens: "always",
printWidth: 100,
endOfLine: "auto",
};
134 changes: 134 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import typescript from "@typescript-eslint/eslint-plugin";
import typescriptParser from "@typescript-eslint/parser";
import { defineConfig } from "eslint/config";
import prettier from "eslint-config-prettier";
import compat from "eslint-plugin-compat";
import importPlugin from "eslint-plugin-import";
import eslintPluginPrettier from "eslint-plugin-prettier";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";

export default defineConfig([
{
ignores: ["**/node_modules/**", "dist/**", ".eslintrc.cjs"],
},
{
files: ["**/*.{js,jsx,ts,tsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: typescriptParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
tsconfigRootDir: ".",
},
},
plugins: {
prettier: eslintPluginPrettier,
react,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
"@typescript-eslint": typescript,
compat,
import: importPlugin,
},
settings: {
react: {
version: "detect",
},
browsers:
"> 0.5%, last 2 versions, not op_mini all, Firefox ESR, not dead",
},
rules: {
// 기존 규칙 유지
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],

// Prettier 통합 규칙
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never",
},
],

// React 관련 규칙
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",

// TypeScript 관련 규칙
"@typescript-eslint/no-explicit-any": "warn",

// 팀 컨벤션 - var 사용 금지
"no-var": "error",
"@typescript-eslint/no-unused-vars": "error",

// 팀 컨벤션 - 동등 연산자 (==, !=) 금지
eqeqeq: ["error", "always", { null: "ignore" }],

// 팀 컨벤션 - 얼리 리턴 권장
"consistent-return": "error",
"no-else-return": ["error", { allowElseIf: false }],

// 팀 컨벤션 - 템플릿 리터럴 규칙
"prefer-template": "error",

// 팀 컨벤션 - 상수는 대문자
camelcase: [
"error",
{
properties: "never",
ignoreDestructuring: false,
ignoreImports: false,
ignoreGlobals: false,
allow: ["^[A-Z][A-Z0-9_]*$"],
},
],

// 팀 컨벤션 - 구조분해할당 권장
"prefer-destructuring": [
"error",
{
array: true,
object: true,
},
{
enforceForRenamedProperties: false,
},
],

// 기본 코드 품질 규칙
"prefer-const": "error",
"object-shorthand": "error",
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0 }],
"no-console": ["warn", { allow: ["warn", "error"] }],
"no-debugger": "warn",
"no-undef": "off",

// import 순서 규칙
"import/order": [
"error",
{
groups: ["builtin", "external", ["parent", "sibling"], "index"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
"newlines-between": "always",
},
],
"import/extensions": "off",
},
},
prettier,
]);
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"start:origin": "vite serve --open ./index.origin.html",
"start:basic": "vite serve --open ./index.basic.html",
"start:advanced": "vite serve --open ./index.advanced.html",
"deploy": "vite build && cp dist/index.advanced.html dist/index.html && gh-pages -d dist",
"test": "vitest",
"test:origin": "vitest src/origin",
"test:basic": "vitest src/basic",
Expand All @@ -16,6 +17,8 @@
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
},
"dependencies": {
"gh-pages": "^6.3.0",
"jotai": "^2.13.0",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
Expand All @@ -30,9 +33,15 @@
"@vitejs/plugin-react-swc": "^3.11.0",
"@vitest/ui": "^3.2.4",
"eslint": "^9.32.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-compat": "^6.0.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.3",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"jsdom": "^26.1.0",
"prettier": "^3.6.2",
"typescript": "^5.9.2",
"vite": "^7.0.6",
"vitest": "^3.2.4"
Expand Down
Loading