-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
128 lines (128 loc) · 3.26 KB
/
.eslintrc.json
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"root": true,
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:react-hooks/recommended"
],
"ignorePatterns": ["node_modules", "src/__generated__", "build", "coverage"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["@typescript-eslint", "eslint-plugin-import", "unused-imports", "import"],
"rules": {
"@next/next/no-img-element": "off",
"@typescript-eslint/array-type": [
"error",
{
"default": "array-simple"
}
],
"@typescript-eslint/consistent-return": "warn",
"@typescript-eslint/no-empty-function": [
"warn",
{
"allow": ["arrowFunctions"]
}
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-mixed-enums": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-enum-initializers": "warn",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/unified-signatures": "error",
"complexity": [
"warn",
{
"max": 5
}
],
"consistent-return": "off",
"import/no-unresolved": "error",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"groups": ["external", "internal"],
"newlines-between": "always",
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "@/**",
"group": "internal",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["react"]
}
],
"max-depth": ["warn", 2],
"max-lines": ["warn", 200],
"max-nested-callbacks": ["warn", 3],
"max-params": ["warn", 3],
"max-statements-per-line": [
"warn",
{
"max": 1
}
],
"newline-before-return": "error",
"no-case-declarations": "warn",
"no-else-return": "error",
"no-magic-numbers": [
"warn",
{
"detectObjects": false,
"enforceConst": true,
"ignore": [-1, 0, 1, 2, 10, 100],
"ignoreArrayIndexes": true
}
],
"no-multiple-empty-lines": [
"error",
{
"max": 1,
"maxEOF": 1
}
],
"no-nested-ternary": "error",
"no-return-await": "off",
"no-throw-literal": "off",
"no-unneeded-ternary": "error",
"no-warning-comments": "warn",
"one-var-declaration-per-line": ["warn", "always"],
"react/display-name": "warn",
"react/sort-comp": "warn",
"sort-keys": "warn",
"unused-imports/no-unused-imports": "error"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "./tsconfig.json"
}
}
}
}