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

feat: add husky & lint-staged #93

Merged
merged 11 commits into from
May 10, 2023
Merged

feat: add husky & lint-staged #93

merged 11 commits into from
May 10, 2023

Conversation

inkyu0103
Copy link
Owner

설명

husky를 적용하여 commit 시 lint rule을 위반한 내용이 없는지 확인합니다.

관련 이슈

Fix #90

변경사항

코드적으로 변경되는 부분을 작성해주세요

스크린샷

@inkyu0103 inkyu0103 added enhancement New feature or request frontend backend labels May 6, 2023
@inkyu0103 inkyu0103 self-assigned this May 6, 2023
@inkyu0103 inkyu0103 changed the title Feat 90 husky feat: add husky & lint-staged May 7, 2023
@inkyu0103 inkyu0103 requested a review from dadahee May 7, 2023 05:32
@vercel
Copy link

vercel bot commented May 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
badminton-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2023 0:34am

@@ -10,7 +10,7 @@ jobs:
with:
fetch-depth: 3
- name: Install dependencies
run: cd frontend && npm ci
run: cd frontend && HUSKY=0 npm ci
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI 환경에서 Husky를 disable하기 위한 옵션입니다.
image

disableSnapshot: true;
}
}
chromatic: { disableSnapshot: true },
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

더 이상 EmailSend 컴포넌트에 대해 snapshot을 사용하지 않습니다.

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd frontend && npx lint-staged -q
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

원래는 npx lint-stage로 사용하였으나, multiple run 처럼 보이는 문제가 발생하여 quite mode 옵션을 사용합니다.

관련 issue : lint-staged/lint-staged#1164 (comment)

@inkyu0103 inkyu0103 merged commit 45e2ccf into main May 10, 2023
@inkyu0103 inkyu0103 deleted the feat-90-husky branch May 10, 2023 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

lint, husky 설정
1 participant