forked from NOW-SOPT-CDSP-WEB3/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
60 lines (60 loc) · 1.56 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
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
ignorePatterns: ['dist', '.eslintrc.*'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2021,
sourceType: 'module',
},
plugins: [
'react',
'@typescript-eslint',
'react-hooks',
'jsx-a11y',
'import',
'prettier',
'react-refresh',
],
rules: {
'react/react-in-jsx-scope': 'off', // import에 react 선언이 없어도 된다
'react-hooks/rules-of-hooks': 'error', // Hooks 규칙을 위반하는 경우 에러
'react-hooks/exhaustive-deps': 'warn', // 효과 의존성 배열을 검사
'prettier/prettier': 0, // Prettier 충돌 규칙 비활성화
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'no-console': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.ts', '.tsx'] }],
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'default',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
],
},
};