-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
91 lines (91 loc) · 2.5 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'prettier',
],
parserOptions: {
project: './tsconfig.json',
},
settings: {
'import/resolver': {
typescript: {},
},
},
plugins: ['import'],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
selector: ['variable'],
},
{
format: ['camelCase', 'PascalCase'],
selector: ['parameter'],
},
{
format: ['camelCase'],
selector: ['function'],
},
{
format: ['PascalCase'],
selector: 'typeLike',
},
],
'react/function-component-definition': [
2,
{ namedComponents: 'arrow-function' },
],
'react/jsx-filename-extension': [1, { extensions: ['tsx'] }],
'no-console': ['warn', { allow: ['error'] }],
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/consistent-type-imports': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
['sibling', 'parent', 'index'],
'type',
'unknown',
],
pathGroups: [
{
pattern: '{react*,react*/**}',
group: 'external',
position: 'before',
},
{
pattern: '@/**',
group: 'internal',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['react', 'unknown'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'react/react-in-jsx-scope': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'import/no-extraneous-dependencies': 'off', // 원인 모를 error 때문에 꺼둠(install 후 reload하기 전까지 빨간줄)
'import/prefer-default-export': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'react/require-default-props': 'off',
'react/no-children-prop': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-unknown-property': ['error', { ignore: ['css', 'tw'] }],
'no-param-reassign': 'off',
'@typescript-eslint/no-shadow': 'off',
},
};