Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/prod-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
# Cache node modules 단계에서 설정된 출력이 캐시 히트를 발생시키지 않는다면
if: steps.cache.outputs.cache-hit != 'true'
# yarn install을 실행하여 새로운 캐시 키를 생성함
env:
HUSKY: 0 # CI 환경에서는 git 훅이 불필요하므로 husky 비활성화
run: yarn install

# Step 4: 코드 품질 검사
Expand Down
15 changes: 15 additions & 0 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
prev_head="$1"
new_head="$2"
is_branch_checkout="$3"

# 브랜치 체크아웃이 아닌 경우 스킵
if [ "$is_branch_checkout" != "1" ]; then
exit 0
fi

if git diff --name-only "$prev_head" "$new_head" -- yarn.lock | grep -q '^yarn.lock$'; then
echo "[post-checkout] yarn.lock이 변경되었습니다. yarn install 실행..."
yarn install
else
echo "[post-checkout] yarn.lock 변경 없음. 설치 생략."
fi
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "[pre-commit] lint-staged 실행..."
npx lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/shared/assets
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
"dev": "vite --host",
"build": "tsc -b && vite build",
"lint": "eslint src --ext .js,.jsx,.ts,.tsx",
"prettier:check": "prettier --check src",
"prettier:fix": "prettier --write src",
"preview": "vite preview",
"svgr": "npx @svgr/cli -d src/shared/assets/svgs/icon --typescript --no-dimensions public/svgs",
"pwa": "pwa-assets-generator --preset minimal public/pwa/moddo.svg",
"storybook": "storybook dev -p 6006",
"build-storybook": "STORYBOOK=true storybook build",
"test": "vitest run"
"test": "vitest run",
"prepare": "husky"
},
"dependencies": {
"@emotion/is-prop-valid": "^1.3.1",
Expand Down Expand Up @@ -81,6 +84,8 @@
"eslint-plugin-react-refresh": "^0.4.16",
"eslint-plugin-storybook": "^0.11.2",
"globals": "^15.14.0",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"msw": "^2.7.0",
"msw-storybook-addon": "^2.0.6",
"prettier": "^3.4.2",
Expand All @@ -100,6 +105,12 @@
"plugin:storybook/recommended"
]
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint"
]
},
"msw": {
"workerDirectory": [
"public"
Expand Down
Loading