-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
213 lines (213 loc) · 6.26 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
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:eslint-comments/recommended",
"plugin:unicorn/recommended",
"airbnb"
],
"env": {
"browser": true,
"node": true,
"jest": true
},
"plugins": ["react", "react-hooks", "no-useless-assign", "jest-dom"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"project": ["./ui/tsconfig.json", "./tsconfig-base.json", "./backend/tsconfig.json"]
},
"ignorePatterns": ["server/cache/**/*", "dist/**/*", "language-colors.ts"],
"rules": {
"implicit-arrow-linebreak": "off",
"comma-dangle": "off",
"function-paren-newline": "off",
"max-len": "off",
"key-spacing": "off",
"arrow-parens": "off",
"object-curly-newline": "off",
"operator-linebreak": "off",
"eslint-comments/no-unused-disable": "error",
"consistent-return": "off",
"react/jsx-uses-vars": "error",
"react/prop-types": "off",
"react/require-default-props": "off",
"no-multiple-empty-lines": "off",
"no-param-reassign": [
"error",
{
"props": false
}
],
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": "error",
"no-extra-parens": "off",
"react/jsx-fragments": "error",
"react/state-in-constructor": "warn",
"react/static-property-placement": "warn",
"react/jsx-props-no-spreading": "off",
"react/jsx-filename-extension": "off",
"react/jsx-first-prop-new-line": "off",
"react/jsx-closing-bracket-location": "off",
"react/jsx-max-props-per-line": "off",
"space-infix-ops": "off",
"no-useless-assign/no-useless-assign": "error",
"import/no-unresolved": [
"error",
{
"ignore": ["\\.json$", "\\.css$"]
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/__tests__/*",
"ui/**/*",
"vite.config.js",
"vitest.config.ts"
]
}
],
"react/react-in-jsx-scope": "off",
"import/prefer-default-export": "off",
"no-shadow": "off",
"no-bitwise": [
"error",
{
"allow": ["~"]
}
],
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTernary": true
}
],
"eslint-comments/disable-enable-pair": [
"error",
{
"allowWholeFile": true
}
],
"space-before-function-paren": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"jsx-a11y/label-has-associated-control": [
"error",
{
"depth": 3
}
],
"jsx-a11y/no-static-element-interactions": "warn",
"no-nested-ternary": "off",
"unicorn/no-nested-ternary": "off",
"no-confusing-arrow": "off",
"no-whitespace-before-property": "off",
"indent": "off",
"no-underscore-dangle": ["error", { "allow": ["_id"] }],
"quote-props": "off",
"unicorn/no-thenable": "off",
"react/jsx-wrap-multilines": "off",
"react/jsx-one-expression-per-line": "off",
"no-spaced-func": "off",
"func-call-spacing": "off",
"react/jsx-indent": "off",
"react/jsx-curly-newline": "off",
"react/jsx-closing-tag-location": "off",
"comma-spacing": "off",
"object-property-newline": "off",
"arrow-body-style": "off",
"quotes": "off",
"object-curly-spacing": "off",
"semi": "off",
"no-trailing-spaces": "off",
"jsx-a11y/click-events-have-key-events": "warn",
"react/no-array-index-key": "warn",
"jsx-a11y/control-has-associated-label": "warn",
"react/no-unescaped-entities": "off",
"jsx-props-no-spreading": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/destructuring-assignment": "off",
"react/button-has-type": "off",
"jsx-a11y/no-noninteractive-element-interactions": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports"
}
],
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/no-unstable-nested-components": "warn",
"import/extensions": [
"error",
"always",
{
"ts": "never",
"tsx": "never"
}
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/require-await": "error",
"unicorn/import-style": [
"error",
{
"styles": {
"path": false
}
}
],
"unicorn/no-null": "off",
"unicorn/explicit-length-check": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-reduce": "off",
"unicorn/prefer-object-from-entries": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/prefer-spread": "off",
"unicorn/filename-case": "off"
},
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/extensions": [".json", ".css"],
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": ["ui/tsconfig.json", "backend/tsconfig.json"]
}
}
}
}