-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
192 lines (186 loc) · 6.27 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/warnings",
"airbnb"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"react",
"react-hooks",
"jsx-a11y",
"@typescript-eslint"
],
"rules": {
"arrow-body-style": 0,
"arrow-parens": ["warn", "as-needed", { "requireForBlockBody": true }],
"class-methods-use-this": 0,
"function-call-argument-newline": ["warn", "consistent"],
"function-paren-newline": ["warn", "consistent"],
"indent": ["warn", 4],
"lines-between-class-members": ["warn", "always", { "exceptAfterSingleLine": true }],
"max-classes-per-file": 0,
"max-len": ["warn", 120, {
"ignoreComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true,
"ignorePattern": "^import .+ from '"
}],
"operator-linebreak": 0,
"no-continue": 0,
"no-empty-function": 0,
"no-mixed-operators": 0,
"no-param-reassign": ["error", { "props": false }],
"no-plusplus": ["warn", { "allowForLoopAfterthoughts": true }],
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
"no-shadow": 0,
"no-undef": 0,
"no-unused-vars": 0,
"no-use-before-define": 0,
"no-useless-constructor": 0,
"no-restricted-exports": 0,
"object-curly-newline": ["warn", { "consistent": true }],
"prefer-destructuring": 0,
"import/extensions": ["error", "never", {
"ico": "always",
"scss": "always",
"png": "always",
"jpg": "always",
"svg": "always"
}],
"import/no-import-module-exports": 0,
"import/no-unresolved": 0,
"import/prefer-default-export": 0,
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"pathGroups": [
{
"pattern": "react|react*",
"group": "external",
"position": "before"
},
{
"pattern": "zustand?*",
"group": "external",
"position": "after"
},
{
"pattern": "@mui/**",
"group": "external",
"position": "after"
},
{
"pattern": "@react*/**",
"group": "external",
"position": "after"
},
{
"pattern": "three-stdlib/**",
"group": "external",
"position": "after"
},
{
"pattern": "@*/**",
"group": "internal",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["builtin", "object"],
"newlines-between": "always"
}
],
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
"@typescript-eslint/no-useless-constructor": ["error"],
"@typescript-eslint/triple-slash-reference": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"react/destructuring-assignment": 0,
"react/function-component-definition": 0,
"react/jsx-filename-extension": ["error", { "extensions": [".jsx", ".tsx"] }],
"react/jsx-indent": ["warn", 4],
"react/jsx-indent-props": ["warn", 4],
"react/jsx-no-useless-fragment": 0,
"react/jsx-one-expression-per-line": 0,
"react/jsx-props-no-spreading": 0,
"react/no-danger": 0,
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
"react/prop-types": 0,
"react/require-default-props": 0,
"react/sort-comp": ["warn", {
"order": [
"instance-variables",
"lifecycle",
"everything-else",
"rendering"
],
"groups": {
"lifecycle": [
"defaultProps",
"constructor",
"getDerivedStateFromProps",
"componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"getSnapshotBeforeUpdate",
"componentDidUpdate",
"componentDidCatch",
"componentWillUnmount"
],
"rendering": [
"/^render.+$/",
"render"
]
}
}],
"react/static-property-placement": 0,
"react-hooks/exhaustive-deps": 0,
"jsx-a11y/media-has-caption": 0
},
"settings": {
"react": {
"version": "18.0"
},
"import/internal-regex": "^src/"
},
"ignorePatterns": [
"**/build/*",
"**/config/*",
"**/node_modules/*",
"**/scripts/*",
"**/publicPathSetup.ts",
"**/*test.js",
"**/*test.ts",
"**/*test.tsx"
]
}