-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
111 lines (111 loc) · 2.4 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'sort-keys-fix'],
extends: [
'next',
'next/core-web-vitals',
'prettier',
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/no-unused-vars': ['error'],
'comma-dangle': [
'error',
{
arrays: 'only-multiline',
exports: 'only-multiline',
functions: 'never',
imports: 'only-multiline',
objects: 'only-multiline',
},
],
'import/newline-after-import': ['error', { count: 1 }],
'import/no-cycle': ['error'],
'import/no-useless-path-segments': [
'error',
{
noUselessIndex: true,
},
],
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['../*'],
message: 'Usage of relative parent imports is not allowed.',
},
],
},
],
'no-else-return': [
'error',
{
allowElseIf: false,
},
],
'no-unused-vars': 'off',
'no-warning-comments': [
'error',
{
location: 'start',
terms: ['fixme'],
},
],
'prefer-template': 'error',
'react/jsx-no-bind': [
'error',
{
allowArrowFunctions: false,
allowBind: false,
allowFunctions: false,
ignoreDOMComponents: true,
ignoreRefs: false,
},
],
'react/jsx-sort-props': [
'error',
{
callbacksLast: true,
ignoreCase: false,
noSortAlphabetically: false,
reservedFirst: true,
shorthandFirst: false,
shorthandLast: true,
},
],
'sort-imports': [
'error',
{
allowSeparatedGroups: true,
ignoreCase: false,
ignoreDeclarationSort: false,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'sort-keys': [
'error',
'asc',
{
caseSensitive: true,
minKeys: 2,
natural: false,
},
],
'sort-keys-fix/sort-keys-fix': 'warn',
'object-shorthand': ['error', 'always'],
},
overrides: [
{
files: ['**/*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};