-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprettier.config.mjs
More file actions
92 lines (78 loc) · 2.3 KB
/
prettier.config.mjs
File metadata and controls
92 lines (78 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* Prettier Configuration
* @see https://prettier.io/docs/options
* @type {import("prettier").Config}
*/
const config = {
/**
* 한 줄 최대 길이 80자로 제한 (자동 줄바꿈 기준)
* @see https://prettier.io/docs/options#print-width
*/
printWidth: 80,
/**
* 들여쓰기 간격을 스페이스 2칸으로 설정
* @see https://prettier.io/docs/options#tab-width
*/
tabWidth: 2,
/**
* 탭 대신 스페이스로 들여쓰기
* @see https://prettier.io/docs/options#tabs
*/
useTabs: false,
/**
* 문장 끝에 세미콜론(;)을 항상 추가
* @see https://prettier.io/docs/options#semicolons
*/
semi: true,
/**
* 문자열을 작은따옴표(')로 표시
* @see https://prettier.io/docs/options#quotes
*/
singleQuote: true,
/**
* 가능한 곳에는 항상 마지막에 쉼표 추가
* @see https://prettier.io/docs/options#trailing-commas
*/
trailingComma: 'all',
/**
* 객체 리터럴의 중괄호 안에 공백 추가 → { foo: bar }
* @see https://prettier.io/docs/options#bracket-spacing
*/
bracketSpacing: true,
/**
* JSX/HTML에서 마지막 >를 마지막 속성과 같은 줄에 배치
* @see https://prettier.io/docs/options#bracket-line
*/
bracketSameLine: true,
/**
* 화살표 함수 매개변수가 하나여도 괄호 항상 표시 → (x) => x
* @see https://prettier.io/docs/options#arrow-function-parentheses
*/
arrowParens: 'always',
/**
* 파일 상단에 특정 주석(pragma)이 없어도 포맷팅 수행
* @see https://prettier.io/docs/options#require-pragma
*/
requirePragma: false,
/**
* 마크다운 등에서 원문 줄바꿈을 유지
* @see https://prettier.io/docs/options#prose-wrap
*/
proseWrap: 'preserve',
/**
* HTML에서 공백 감도 무시 (레이아웃 영향 최소화)
* @see https://prettier.io/docs/options#html-whitespace-sensitivity
*/
htmlWhitespaceSensitivity: 'ignore',
/**
* OS에 맞는 줄바꿈 자동 선택 (LF/CRLF)
* @see https://prettier.io/docs/options#end-of-line
*/
endOfLine: 'auto',
/**
* Tailwind CSS 클래스 자동 정렬 플러그인
* @see https://github.com/tailwindlabs/prettier-plugin-tailwindcss
*/
plugins: ['prettier-plugin-tailwindcss'],
};
export default config;