-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.cjs
73 lines (71 loc) · 2.06 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true // 'module' is not defined. 에러가 발생하면 기입
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: "module"
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:import/typescript", "plugin:import/errors", "plugin:import/warnings", "plugin:import/typescript", "plugin:import/recommended", "prettier", "plugin:storybook/recommended"],
plugins: ["@typescript-eslint", "prettier", "import"],
settings: {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"]
}
}
},
rules: {
"prettier/prettier": ["error", {
arrowParens: "avoid",
// 화살표 함수 괄호 사용 방식
bracketSpacing: true,
// 객체 리터럴의 괄호 사이에 공백 출력
endOfLine: "auto",
// 개행문자 CRLF/LF 자동 설정
printWidth: 160,
// 줄바꿈 길이 설정
semi: true,
// 명령문 끝에 세미콜론 추가
singleQuote: true,
// 작은 따옴표 사용
tabWidth: 2,
// 들여쓰기 공백 수 설정
trailingComma: "es5",
// 후행 쉼표 추가
useTabs: false // tab 대신 space 사용
}],
"import/no-unresolved": "off",
"import/extensions": ["error", "ignorePackages", {
"": "never",
js: "never",
jsx: "never",
ts: "never",
tsx: "never"
}],
"import/order": ["error", {
groups: ["builtin", "external", "internal", "parent", "sibling"],
pathGroups: [{
pattern: "@*/**",
group: "external",
position: "after"
}],
pathGroupsExcludedImportTypes: [],
// 동일한 그룹에선 오름차순으로 정렬한다.
alphabetize: {
order: "asc",
caseInsensitive: true
}
}]
}
};