-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
88 lines (82 loc) ยท 2.94 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: { jsx: true },
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
plugins: ['@typescript-eslint', 'import', 'react', 'react-hooks'],
settings: { 'import/resolver': { typescript: {} }, react: { version: 'detect' } },
rules: {
'no-implicit-coercion': 'error',
'no-warning-comments': [
'warn',
{
terms: ['TODO', 'FIXME', 'XXX', 'BUG'],
location: 'anywhere',
},
],
curly: ['error', 'all'],
eqeqeq: ['error', 'always', { null: 'ignore' }],
// Hoisting์ ์ ๋ต์ ์ผ๋ก ์ฌ์ฉํ ๊ฒฝ์ฐ๊ฐ ๋ง์์
'@typescript-eslint/no-use-before-define': 'off',
// ๋ชจ๋ธ ์ ์ ๋ถ๋ถ์์ class์ interface๋ฅผ ํฉ์น๊ธฐ ์ํด ์ฌ์ฉํ๋ ์ฉ๋ฒ๋ ์ก๊ณ ์์ด์
'@typescript-eslint/no-empty-interface': 'off',
// ๋ชจ๋ธ ์ ์ ๋ถ๋ถ์์ ํ๋ผ๋ฏธํฐ ํ๋กํผํฐ๋ฅผ ์ ์ฐ๊ณ ์์ด์
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
'@typescript-eslint/no-inferrable-types': 'warn',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/naming-convention': [
'error',
{ format: ['camelCase', 'UPPER_CASE', 'PascalCase'], selector: 'variable', leadingUnderscore: 'allow' },
{ format: ['camelCase', 'PascalCase'], selector: 'function' },
{ format: ['PascalCase'], selector: 'interface' },
{ format: ['PascalCase'], selector: 'typeAlias' },
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'@typescript-eslint/member-ordering': [
'error',
{
default: [
'public-static-field',
'private-static-field',
'public-instance-field',
'private-instance-field',
'public-constructor',
'private-constructor',
'public-instance-method',
'private-instance-method',
],
},
],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'react/prop-types': 'off',
// React.memo, React.forwardRef์์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๋ ๋ง๊ณ ์์ด์
'react/display-name': 'off',
'react-hooks/exhaustive-deps': 'error',
'react/react-in-jsx-scope': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
},
};