You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Padding lines between statements](#padding-lines-between-statements)
36
+
-[Comma spacing](#comma-spacing)
37
+
-[Object curly spacing](#object-curly-spacing)
38
+
-[Spacing around infix operators](#spacing-around-infix-operators)
39
+
-[Function declaration](#function-declaration)
40
+
-[React Rules](#react-rules)
41
+
-[Whitespace in and around the JSX opening and closing brackets](#whitespace-in-and-around-the-jsx-opening-and-closing-brackets)
42
+
-[CSS Rules](#css-rules)
43
+
-[CSS Shorthand](#css-shorthand)
44
+
-[CSS Sort](#css-sort)
45
+
-[Naming Rules](#naming-rules)
46
+
-[Variables](#variables)
47
+
-[Name attribute](#name-attribute)
48
+
-[Id](#id)
49
+
-[Class Name](#class-name)
50
+
-[Constants](#constants)
51
+
-[Enum](#enum)
52
+
-[Interface](#interface)
53
+
-[Folder/File Name](#folderfile-name)
54
+
-[Url path](#url-path)
55
+
-[Abbreviation](#abbreviation)
56
+
-[File Import Rules](#file-import-rules)
57
+
-[Import order](#import-order)
58
+
-[Newline after import](#newline-after-import)
59
+
-[Absolute path import](#absolute-path-import)
60
+
-[Style import](#style-import)
61
+
-[Image import](#image-import)
59
62
60
63
----------------------
61
64
@@ -107,7 +110,7 @@ function foo() {
107
110
108
111
### Single quotes
109
112
110
-
모든 경우에 single quotation(')을 사용한다. backtick(`)은 [Template literal](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals)을 사용하는 경우에만 허용된다.
113
+
모든 경우에 single quotation(')을 사용한다. backtick(`)은 [Template literal](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals)을 사용하는 경우에만 허용된다.
111
114
112
115
```javascript
113
116
// bad
@@ -197,7 +200,7 @@ var arr = [
197
200
198
201
### Line length 100
199
202
200
-
코드는 주석을 포함하여 한 줄 당 최대 100자 이하로 작성한다. (url은 제외한다.)
203
+
코드는 주석을 포함하여 한 줄 당 최대 100자 이하로 작성한다. (url은 제외한다.)
201
204
너무 긴 변수명과 함수명을 지양하며, 한 줄에 길게 쓰는 대신 여러 줄로 분리하여 코드의 가독성을 높인다.
202
205
203
206
```javascript
@@ -208,7 +211,7 @@ if (thisIsLongVariableName !== HelloWorld.longName.longName && thisIsLongVariabl
208
211
209
212
### No multiple empty lines
210
213
211
-
코드내에서 한 줄 이상의 여백을 허용하지 않습니다.
214
+
코드내에서 한 줄 이상의 여백을 허용하지 않습니다.
212
215
213
216
```javascript
214
217
// bad
@@ -231,7 +234,7 @@ var b = 2;
231
234
232
235
#### Conditional statements
233
236
234
-
조건식이 100자를 초과하거나 가독성이 떨어진다고 생각된다면, 조건식을 변수에 담고 아래 예시와 같이 줄바꿈하여 사용한다.
237
+
조건식이 100자를 초과하거나 가독성이 떨어진다고 생각된다면, 조건식을 변수에 담고 아래 예시와 같이 줄바꿈하여 사용한다.
235
238
236
239
```javascript
237
240
// bad
@@ -479,7 +482,7 @@ var arr = [1, 2];
479
482
480
483
### Object curly spacing
481
484
482
-
Object literal이나 destructuring assignments, import/export specifiers에 쓰이는 괄호(curly braces: `{}`) 안에 space를 꼭 넣는다.
485
+
Object literal이나 destructuring assignments, import/export specifiers에 쓰이는 괄호(curly braces: `{}`) 안에 space를 꼭 넣는다.
483
486
다만 괄호가 중복되는 경우 space를 제거한다.
484
487
485
488
```javascript
@@ -770,7 +773,7 @@ CSS 속성 정렬은 다음과 같은 순서를 따른다.
770
773
-::after
771
774
772
775
773
-
> Box model 범주에 속하는 속성들은 밖에서 안으로 향하는 순서(From outside in)로 나열한다.
776
+
> Box model 범주에 속하는 속성들은 밖에서 안으로 향하는 순서(From outside in)로 나열한다.
774
777
> 원래대로라면 border 속성도 Box model 범주에 포함시켜야하겠지만, border 영역은 두께만 단독으로 선언하지 않고 색상(Color)을 함께 선언하는 경우가 대부분이므로 Color 범주로 포함시킨다.
775
778
776
779
----------------------
@@ -809,7 +812,7 @@ let targetName = 'hello';
809
812
810
813
### Class Name
811
814
812
-
Class name은 Camel case를 따른다.
815
+
Class name은 Camel case를 따른다.
813
816
814
817
```jsx
815
818
<div className={ s.headerData }></div>
@@ -835,7 +838,7 @@ const COLOR_THEME = {
835
838
836
839
### Enum
837
840
838
-
Enum은 Pascal case를 따른다.
841
+
Enum은 Pascal case를 따른다.
839
842
Enum으로 선언된 각 constant도 Pascal case를 따른다.
840
843
841
844
```javascript
@@ -864,7 +867,7 @@ interface ExampleProps {
864
867
865
868
### Folder/File Name
866
869
867
-
폴더와 파일 이름은 하이픈`-`과 함께 Kebab case를 따르며 영문 소문자만 사용한다.
870
+
폴더와 파일 이름은 하이픈`-`과 함께 Kebab case를 따르며 영문 소문자만 사용한다.
파일을 import할 때는 `npm packages/Node.js builtins`와 `절대 경로 import`, `상대 경로 import`를 group화하여 분류하고 사이 사이에 빈 줄로 구분한다.
928
+
파일을 import할 때는 `npm packages/Node.js builtins`와 `절대 경로 import`, `상대 경로 import`를 group화하여 분류하고 사이 사이에 빈 줄로 구분한다.
916
929
917
930
이 부분은 [eslint-plugin-simple-import-sort](https://www.npmjs.com/package/eslint-plugin-simple-import-sort) 플러그인 설치 후 lint 설정으로 적용 가능하며 [web-template-pizza](https://github.com/Rainist/web-template-pizza) 템플릿에 기본 설정되어있다.
918
931
@@ -964,7 +977,7 @@ var a = 1;
964
977
965
978
### Absolute path import
966
979
967
-
2-depth를 넘어가는 경우 반드시 webpack alias 설정을 통해 절대 경로로 import한다.
980
+
2-depth를 넘어가는 경우 반드시 webpack alias 설정을 통해 절대 경로로 import한다.
0 commit comments