-
Notifications
You must be signed in to change notification settings - Fork 4
코딩 컨밴션
Yun Hwan, Kim edited this page Nov 20, 2019
·
5 revisions
airbnb style guide를 베이스로 규칙을 따르되, 너무 받아들이기 힘든 부분에 의견을 제시하여 바꾼다.
각 1명당 무조건 한가지 스타일을 바꿀 수 있는 권한이 있다.
// good
import { hello } from 'foo'
// good
import {
hello,
world,
} from 'foo'
// good
if (hello && world) {
foo()
}
arrowParens: arrow 함수의 파라미터를 소괄호로 감싸는 규칙(https://eslint.org/docs/rules/arrow-parens)
// good
(param) => body
// bad
param => body
no-param-reassign: 함수의 파라미터에 재할당에 대한 규칙 (https://eslint.org/docs/rules/no-param-reassign)
consistent-return: 일관성있는 함수 리턴 타입에 대한 규칙 (https://eslint.org/docs/rules/consistent-return)
8. 배열 요소가 한줄로 너무 길어지게되면 multi line을 사용 (https://eslint.org/docs/rules/array-element-newline)
array-element-newline