-
Notifications
You must be signed in to change notification settings - Fork 0
Team rules
- 수면 및 예고된 휴식시간 외에 디스코드 항시 접속
- 소통 전에 merge 금지
- merge 시간 매일 아침 시작으로 통일
- merge 하고 배포 상태까지 확인
- 최대한 각자 재량 껏
- 너무 무리하지 않기
- 장시간 휴식 시 미리 알려주기
- hyphen-case
- 이름 형식
종류 | 사용패턴 | 특징 |
---|---|---|
main | main | 프로덕션 스냅샷 |
dev | dev | 릴리즈 계획에 따라 Github에서 기본 브랜치로 지정 |
feature | feature/이름 | dev에 병합 |
hotfix | hotfix/#이슈번호 | 메인에 병합 |
1. 제목과 본문을 한 줄 띄워 분리해 주세요.
2. 제목은 영문 기준 50자 이내로 적어주세요.
3. 제목 첫글자를 대문자로 적어주세요.
4. 제목 끝에 `.` 는 금지합니다.
5. 제목은 명령어로 작성합니다.
6. 본문은 50자마다 줄을 바꿔주세요.
7. 본문은 어떻게 변경했는지 보다 무엇을 변경했는지, 왜 변경했는지 에 맞추어 작성하세요.
- 코드 컨벤션을 잘 지켜주세요.
컨벤션 오류로 인한 불필요한 코멘트는 시간 낭비이기 때문에 지양하는 것이 좋습니다.
- 리뷰 가이드라인을 잘 작성해 주세요.
모든 코드 변경사항에는 의도가 필요합니다. 의도치 않게 변경된 부분이 있다면 되돌려 놓아야 하고, 줄바꿈과 같이 아주 단순한 변경사항이라도 그 부분을 리뷰어가 볼 필요가 없다면 “Just line change” 와 같은 코멘트를 달아 명시하여 리뷰 시간을 줄여줄 수 있을 것입니다. 또는 사용된 라이브러리 업데이트가 포함되었다면 해당 라이브러리의 릴리즈 노트 링크나 스크린샷을 첨부하는 것도 좋은 방법입니다.
- 작업중, 리뷰 가능 여부를 잘 명시해 주세요.
아직 코드를 작성 중일 때에는 [WiP] (Work in Progress) 를 타이틀 앞에 추가하고, 만약 작업이 끝났으면 이를 제거하고 review-needed 태그를 설정할 수 있습니다. 한 번 작업을 마쳤다고 끝난 것이 아니기 때문에 리뷰를 반영하는 중에도 이 과정을 반복하여 명시해 주세요.
PR 제목
[Client] add / edit / rm : 파일명1, 파일명2, ...
PR 본문**
### PR 타입(하나 이상의 PR 타입을 선택해주세요)
-[] 기능 추가
-[] 기능 삭제
-[] 버그 수정
-[] 의존성, 환경 변수, 빌드 관련 코드 업데이트
### 반영 브랜치
ex) feature/login -> dev
### 변경 사항
ex)
### 테스트 결과
ex)
- 탭 사이즈 : 2
-
Use 2 spaces for indentation.
eslint:
[indent](http://eslint.org/docs/rules/indent)
function hello (name) { console.log('hi', name) }
- 따옴표 : ' ' (홀따옴표 사용)
-
Use single quotes for strings except to avoid escaping.
eslint:
[quotes](http://eslint.org/docs/rules/quotes)
console.log('hello there') // ✓ ok console.log("hello there") // ✗ avoid console.log(`hello there`) // ✗ avoid $("<div class='box'>") // ✓ ok console.log(`hello ${name}`) // ✓ ok
- var 선언 사용 금지
function myFunction () {
var result = something() // ✗ avoid
}
- 키워드 뒤 한칸 띄어쓰기
-
Add a space after keywords.
eslint:
[keyword-spacing](http://eslint.org/docs/rules/keyword-spacing)
if (condition) { ... } // ✓ ok
- 비교연산자
===
사용
-
Always use instead of
==
.Exception:obj == null
is allowed to check fornull || undefined
.eslint:
[eqeqeq](http://eslint.org/docs/rules/eqeqeq)
if (name === 'John') // ✓ ok
if (name == 'John') // ✗ avoid
if (name !== 'John') // ✓ ok
if (name != 'John')
- else 구분
-
Keep else statements on the same line as their curly braces.
eslint:
[brace-style](http://eslint.org/docs/rules/brace-style)
// ✓ ok
if (condition) {
// ...
} else {
// ...
}
- 중괄호 사용 유무
For multi-line if statements, use curly braces.
// ✓ ok
if (options.quiet !== true) console.log('done')
// ✓ ok
if (options.quiet !== true) {
console.log('done')
}
- 불필요한 blank line 제거
- Multiple blank lines not allowed.
eslint: [no-multiple-empty-lines](http://eslint.org/docs/rules/no-multiple-empty-lines)
// ✓ ok
var value = 'hello world'
console.log(value)
- 삼항 연산자
For the ternary operator in a multi-line setting, place ?
and :
on their own lines.
eslint: [operator-linebreak](http://eslint.org/docs/rules/operator-linebreak)
// ✓ ok
var location = env.development ? 'localhost' : 'www.api.com'
// ✓ ok
var location = env.development
? 'localhost'
: 'www.api.com'
-
안쓰는 변수는 선언, import 하지 않기
-
선언은 한번씩
-
For var declarations, write each declaration in its own statement.
eslint:
[one-var](http://eslint.org/docs/rules/one-var)
// ✓ ok
var silent = true
var verbose = true
- 괄호 사이 공간
- eslint:
[block-spacing](http://eslint.org/docs/rules/block-spacing)
function foo () {return true} // ✗ avoid
function foo () { return true } // ✓ ok
- 변수와 함수엔
[camelcase](http://eslint.org/docs/rules/camelcase)
- eslint:
[camelcase](http://eslint.org/docs/rules/camelcase)
function my_function () { } // ✗ avoid
function myFunction () { } // ✓ ok
var my_var = 'hello' // ✗ avoid
var myVar = 'hello' // ✓ ok
- 불필요한 Commas 제거
-
Commas must be placed at the end of the current line.
eslint:
[comma-style](http://eslint.org/docs/rules/comma-style)
var obj = { foo: 'foo' ,bar: 'bar' // ✗ avoid } var obj = { foo: 'foo', bar: 'bar' // ✓ ok }
- key-spacing
-
Add space between colon and value in key value pairs.
eslint:
[key-spacing](http://eslint.org/docs/rules/key-spacing)
var obj = { 'key' : 'value' } // ✗ avoid var obj = { 'key' :'value' } // ✗ avoid var obj = { 'key':'value' } // ✗ avoid var obj = { 'key': 'value' } // ✓ ok
- dot-loaction
-
Dot should be on the same line as property.
eslint:
[dot-location](http://eslint.org/docs/rules/dot-location)
console. log('hello') // ✗ avoid console .log('hello') // ✓ ok
- import 규칙
-
Use a single import statement per module.
eslint:
[no-duplicate-imports](http://eslint.org/docs/rules/no-duplicate-imports)
import { myFunc1 } from 'module' import { myFunc2 } from 'module' // ✗ avoid import { myFunc1, myFunc2 } from 'module' // ✓ ok
- 변수 끝에 세미콜론 사용하지 않기
-
Camel-case
ㅁ 변수, 함수, 파일 이름
-
Pascal-case
ㅁ 컴포넌트 이름
- Node v14.18.0
- NPM v7.24.1