-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
124 lines (124 loc) · 3.15 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
{
"extends": [
"react-app",
"react-app/jest",
"plugin:import/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:css-import-order/recommended",
"prettier"
],
"plugins": ["react", "prettier", "css-import-order"],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx"],
"moduleDirectory": [".", "node_modules"]
}
}
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
"import/order": [
"error",
{
"warnOnUnassignedImports": true,
"groups": [
// Встроенные модули (например, 'react')
"builtin",
// Внешние зависимости (пакеты npm)
"external",
// Модули из вашего проекта
"internal",
[
// Родительские директории (например, '../')
"parent",
// Индексные файлы (например, './index.js')
"index"
],
// Родственные директории (например, './' или '../components')
"sibling",
// Неизвестные импорты
"unknown"
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"pathGroups": [
{
"pattern": "*.{css,scss}",
"patternOptions": {
"matchBase": true
},
"group": "unknown",
"position": "after"
},
{
"pattern": "*.{jpg,png,svg}",
"patternOptions": {
"matchBase": true
},
"group": "unknown",
"position": "before"
}
]
}
],
"no-var": "error",
"semi": "error",
"indent": ["error", 2],
"react/jsx-filename-extension": [
1,
{
"extensions": [".js", ".jsx"]
}
],
"no-multi-spaces": "error",
"space-in-parens": "error",
"no-multiple-empty-lines": "error",
"react/jsx-uses-react": "error",
"prefer-const": "error",
"no-use-before-define": "error",
"react/jsx-uses-vars": "error",
"import/prefer-default-export": "off",
"react/function-component-definition": "off",
"react/jsx-props-no-spreading": "warn",
"react/no-unescaped-entities": "off",
"react/button-has-type": "warn",
"no-console": "off",
"react/react-in-jsx-scope": "off",
"arrow-body-style": "off",
"react/self-closing-comp": "off",
"react-hooks/exhaustive-deps": "off",
"jsx-a11y/anchor-is-valid": "off",
"no-underscore-dangle": "off",
"no-unused-vars": "off",
"no-param-reassign": [
"warn",
{
"props": false
}
],
"react/jsx-max-props-per-line": [
1,
{
"when": "multiline"
}
]
}
}