-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.json
39 lines (39 loc) · 1.19 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
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
// 리액트 17버전 이후는 jsx 문법 사용시 React를 import 하지 않아도 되어서 off
"react/react-in-jsx-scope": 0,
"no-console": "warn",
"no-unused-vars": "off",
// props 구조분해할당 하기 위해 off
"react/jsx-props-no-spreading": "off",
// 컴포넌트 생성시 화살표함수를 이용하도록
"react/function-component-definition": [
2,
{ "namedComponents": "arrow-function" }
],
// 함수 밖에서 선언된 변수와 같은 이름의 변수를 사용하기 위해
"no-shadow": ["warn"],
// export default 뿐 아니라 named export 방식도 사용할 수 있게 off
"import/prefer-default-export": "off"
}
}