-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (69 loc) · 2.22 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
'prettier',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {
'max-len': [
'warn',
{
code: 150,
},
],
'no-shadow': 'off',
// 'no-unused-vars': 'warn',
'import/no-unresolved': 'off',
// 선언 전에 변수가 사용될 경우 (styles가 아래 선언 되어있을 시 에러)
'no-use-before-define': 'off',
'no-unused-expressions': 'warn',
// tsx 파일에서 jsx가 사용될 시 (React.Fragment도 해당됨)
'react/jsx-filename-extension': 'off',
// Global required() 사용 금지
'global-require': 'off',
'@typescript-eslint/no-var-requires': 'off',
// console 사용 금지
// 불필요한 콘솔로그가 많아, 가시성을 위해 워닝으로 변경함
'no-console': 'warn',
// 불안정한 형태로 컴포넌트를 사용 시
'react/no-unstable-nested-components': 'off',
// Optional한 Props로 defaultProps에 포함되었으나 초기값이 정해지지 않은 경우
'react/require-default-props': 'off',
// 화살표 함수이지만 리턴값이 없을 경우
'consistent-return': 'off',
// 생성된 배열의 index값을 사용하는 경우
'react/no-array-index-key': 'warn',
'react/jsx-curly-brace-presence': 'off',
'arrow-body-style': 'off',
'react/function-component-definition': 'off',
// 빈 fragment 사용하는 경우
'react/jsx-no-useless-fragment': 'off',
'no-else-return': 'off',
'no-nested-ternary': 'off',
'import/extensions': 'off',
'react/jsx-props-no-spreading': 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'react/no-unused-prop-types': 'off',
'import/prefer-default-export': 'off',
'no-restricted-syntax': 'off',
'no-empty-pattern': 'off',
'max-classes-per-file': 'off',
camelcase: 'off',
},
};