-
Notifications
You must be signed in to change notification settings - Fork 3
File and Directory Convention
lim edited this page Mar 4, 2024
·
1 revision
컴포넌트 파일명
- 아래의 경우를 제외하고는 파스칼 케이스로 작성한다.
ex)
Navigation.tsx
- 디렉토리 내에 하나의 tsx만 들어갈 때는 index.tsx를 사용한다.
SCSS 파일명
- 파스칼 케이스로 작성한다. ex)
Navigation.module.scss
-
tsx
와 같은 디렉토리 내에 위치시킨다.
디렉토리명
- 아래의 경우를 제외하고는 소문자로 작성한다.
- 컴포넌트 index.tsx를 담을 때는 파스칼 케이스로 작성한다.
- 단어 사이에 공백 대신 하이픈(-)을 사용하여 단어를 구분한다. ex)
page-components
,utility-functions
- 디렉토리 이름은 해당 디렉토리에 포함된 파일들의 목적이나 유형을 잘 설명하도록 짓는다.
- 최대한 단일 책임 원칙(Single Responsibility Principle)을 준수하도록 한다.
- Features by pages : Landing
- Features by pages : List
- Features by pages : Post Detail
- Features by pages : Create Post
- Features by pages : Edit Post
- Features by pages : MyPage
- Features by pages : Account
- Features by pages : Signin
- Features by pages : Signup
- Code Convention
- Commit Convention
- File and Directory Convention
- Git Convention
- Issue Convention
- PR Convention