Commands
- 작업 완료 후 Push 이전
yarn run lint
명령어를 실행하여 Lint 가 지적하는 사항이 있는지를 체크한다.
Package Rules
- 패키지 관리자 :
yarn
- 패키지를 설치할 때
yarn add
나 yarn install
을 사용한다.
package-lock.json
을 사용하지 않고 yarn-lock.json
을 사용한다.
- 패키지 설치 후
package.json
에서 버전을 명시할 때, ~
이나 ^
를 지워서 특정 버전을 명시한다.
- 버전이 달라지면 실제 실행한 결과도 달라질 수 있기 때문에 정확한 버전을 설치하는 것이 안전하다.
Directory Structures
**public/**
**src/
api/**
**assets**/
**components**/
info/
signup/
...
각 페이지별 컴포넌트 폴더로 관리/
common/
template/ // 보류
**constants**/
**routes/**
**styles/**
**hooks/**
**pages/
types/
utils/**
- api/: api 관련된 기능
- assets/:
- components/:
- common/: 공통 컴포넌트 관리
- templates/: 비즈니스 로직과 뷰를 분리하기 위한 template들을 관리
- 페이지에서 사용되는 컴포넌트들을 폴더로 관리
- constants/: 상수
- routes/: 라우팅 관련된 기능
- styles/: 글로벌 스타일이나 테마
- hooks/: custom hook
- pages/: 비즈니스 로직을 관리하는 페이지 컴포넌트
- types/: 유틸 타입
- utils/: 유틸 함수
Components Structure
{component-name}/ ex) CardComponent
index.ts --- 컴포넌트 관련 로직 코드 작성
style.tsx --- Styled-Component 코드 작성