-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.json
More file actions
46 lines (46 loc) · 1.71 KB
/
.eslintrc.json
File metadata and controls
46 lines (46 loc) · 1.71 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
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "react", "prettier"],
"ignorePatterns": ["node_modules/"],
"rules": {
"import/no-extraneous-dependencies": 0, //테스트 또는 개발환경을 구성하는 파일에서는 devDependency 사용을 허용
"react/react-in-jsx-scope": "off", //코드에 react import안하면 error off
"react/jsx-filename-extension": ["warn", { "extensions": [".ts", ".tsx"] }], // 파일 확장자 .ts, .tsx로 한정
"no-useless-catch": "off", // 불필요한 catch 사용 off
"no-console": "error", // console 사용하면 error
"react/jsx-props-no-spreading": "off", //spread사용시 error off
"jsx-a11y/no-static-element-interactions": "off", // div에 이벤트 등록이 error off
"jsx-a11y/click-events-have-key-events": "off", //onClick 이벤트에 key event 포함 안하면 error off
"import/no-cycle": "off", // 순환 의존성 감지 방지 off
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "function", // exported function (컴포넌트 명)
"format": ["PascalCase"],
"modifiers": ["exported"]
}
],
"react/require-default-props": 0 // optional prop 유형에 해당 defaultProps값이 있는지 확인 off
}
}