-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
143 lines (143 loc) · 3.31 KB
/
.eslintrc
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
"env": {
"browser": true,
"es6": true,
"es2017": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"jsx": true
},
"plugins": [
"@typescript-eslint",
"react",
"prettier"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/ban-types": "off",
// Блок включаемых правил
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "after-used"
}
],
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"quotes": [
"error",
"single"
],
"dot-location": [
"error",
"property"
],
"no-void": "error",
"no-var": "error",
"radix": "error",
"max-len": [
"error",
{
"code": 120
}
],
"react/no-access-state-in-setstate": "error",
"react/jsx-uses-vars": "error",
"react/jsx-uses-react": "error",
"react/destructuring-assignment": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
// "react/no-multi-comp": "error",
"react/no-render-return-value": "error",
"react/no-this-in-sfc": "error",
"react/prefer-es6-class": [
"error",
"always"
],
"react/react-in-jsx-scope": "error",
"react/require-render-return": "error",
"react/no-unused-state": "error",
"react/jsx-boolean-value": "error",
"react/jsx-closing-tag-location": "error",
"react/jsx-closing-bracket-location": [
"error",
{
"nonEmpty": "tag-aligned",
"selfClosing": "tag-aligned"
}
],
"react/jsx-curly-brace-presence": [
"error",
{
"props": "never",
"children": "never"
}
],
"react/jsx-equals-spacing": [
"error",
"never"
],
"react/jsx-first-prop-new-line": [
"error",
"multiline"
],
"react/jsx-fragments": [
"error",
"syntax"
],
"react/jsx-no-script-url": "error",
"react/jsx-props-no-multi-spaces": "error",
"react/jsx-tag-spacing": "error",
"react/jsx-sort-props": [
"error",
{
"callbacksLast": true,
"shorthandFirst": true,
"noSortAlphabetically": true,
"reservedFirst": true
}
],
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
}
}