-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
70 lines (70 loc) · 2.11 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"ignorePatterns": ["node_modules/**", "**/dist/**"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "import"],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"no-console": ["error", { "allow": ["warn", "error", "info"] }],
"@typescript-eslint/no-empty-interface": "off",
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"react/react-in-jsx-scope": "off",
"import/order": [
"warn",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
]
}
],// 일단 style의 경우 {}같은 형식으로 불러오는 hook또는 함수 사이에 있어 import에서 걸림 -> import를 아래쪽으로 내려 해결
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],// 사용하지않는 기능을 불러오는 경우 -> 삭제
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
],
// 수정해야할 부분들
"no-empty": "off",// 대부분 catch라서 off..
"react/prop-types": "off",// 아직 파악을 제대로 하지 못 함
"prefer-const": "warn", //const로 바꿔도 문제가 없는 let
"no-extra-boolean-cast":"warn", // 불필요한 !!사용 필요한 경우 Boolean()으로 바꾸는게 더 좋을 수도 있음
"no-constant-condition": "warn",// 항상 결과가 참 또는 거짓임
"@typescript-eslint/no-inferrable-types": "warn",//추론 가능 타입
"@typescript-eslint/ban-types": "warn"// Object -> NonNullable<object>
}
}