Repository navigation
Expand file tree
/
Copy pathlint_output.txt
More file actions
464 lines (370 loc) · 153 KB
/
Copy pathlint_output.txt
File metadata and controls
464 lines (370 loc) · 153 KB
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
> spectra@0.0.0 lint
> eslint .
D:\Workspace\Projects\spectrav2\api\relay.js
3:17 error 'process' is not defined no-undef
4:20 error 'process' is not defined no-undef
19:20 error 'process' is not defined no-undef
D:\Workspace\Projects\spectrav2\contracts\scripts\fundExchange.js
1:13 error 'require' is not defined no-undef
2:12 error 'require' is not defined no-undef
3:14 error 'require' is not defined no-undef
9:33 error '__dirname' is not defined no-undef
54:3 error 'process' is not defined no-undef
D:\Workspace\Projects\spectrav2\src\api\sarvamAgent.js
81:40 error 'process' is not defined no-undef
223:14 error '_' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\about\ComplianceBanner.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\about\MissionStatement.jsx
1:8 error 'React' is defined but never used no-unused-vars
4:23 error 'Fingerprint' is defined but never used no-unused-vars
4:36 error 'Shield' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\agent\AgentTerminal.jsx
1:8 error 'React' is defined but never used no-unused-vars
1:36 error 'useEffect' is defined but never used no-unused-vars
7:7 error 'ERC20_ABI' is assigned a value but never used no-unused-vars
52:48 error 'sdkError' is assigned a value but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\agent\GlassTerminal.jsx
1:8 error 'React' is defined but never used no-unused-vars
6:83 error 'resolveTokenDecimals' is defined but never used no-unused-vars
282:7 error 'ErrorBox' is assigned a value but never used no-unused-vars
634:48 error 'sdkError' is assigned a value but never used no-unused-vars
644:10 error 'userTier' is assigned a value but never used no-unused-vars
645:10 error 'remainingTxs' is assigned a value but never used no-unused-vars
670:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
668 | useEffect(() => {
669 | if (walletAddress || stellarPublicKey) {
> 670 | setShowConnectWall(false);
| ^^^^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
671 | }
672 | }, [walletAddress, stellarPublicKey]);
673 | react-hooks/set-state-in-effect
718:9 error 'walletSnapshot' is assigned a value but never used no-unused-vars
774:19 error '_' is defined but never used no-unused-vars
781:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
779 | : `It looks like your wallet is currently empty.`;
780 |
> 781 | pushMessage('agent', `Terminal connected to ${walletAddress.slice(0, 6)}...${walletAddress.slice(-4)}. ${balanceText} How can I assist you with your DeFi operations today?`);
| ^^^^^^^^^^^ Avoid calling setState() directly within an effect
782 | } else if (!walletAddress && messages.length === 0) {
783 | pushMessage('agent', `Welcome to Spectra Agent Terminal. Please connect your wallet to review your balances and execute swaps.`);
784 | } react-hooks/set-state-in-effect
791:7 error 'setError' is not defined no-undef
821:17 error 'e' is defined but never used no-unused-vars
821:20 error Empty block statement no-empty
884:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
882 | useEffect(() => {
883 | if (walletAddress) {
> 884 | hydrateWallet().catch(() => undefined);
| ^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
885 | } else {
886 | setTokenBalances({});
887 | setWalletNonce(0); react-hooks/set-state-in-effect
893:6 warning React Hook useEffect has a missing dependency: 'hydrateWallet'. Either include it or remove the dependency array react-hooks/exhaustive-deps
981:5 error 'setError' is not defined no-undef
D:\Workspace\Projects\spectrav2\src\components\agent\IntentCard.jsx
1:8 error 'React' is defined but never used no-unused-vars
127:23 error Error: Cannot call impure function during render
`Math.random` is an impure function. Calling an impure function can produce unstable results that update unpredictably when the component happens to re-render. (https://react.dev/reference/rules/components-and-hooks-must-be-pure#components-and-hooks-must-be-idempotent).
125 |
126 | const jsonString = JSON.stringify({
> 127 | intent_id: '0x' + Math.random().toString(16).slice(2, 10) + '...',
| ^^^^^^^^^^^^^ Cannot call impure function
128 | action: intent.action,
129 | amount: intent.amount,
130 | token: intent.token, react-hooks/purity
D:\Workspace\Projects\spectrav2\src\components\auth\WalletConnectProvider.jsx
20:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
33:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
48:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
73:17 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
91:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\auth\WalletSelectorModal.jsx
1:8 error 'React' is defined but never used no-unused-vars
93:7 error 'ErrorText' is assigned a value but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\exchange\CrossChainSelector.jsx
1:8 error 'React' is defined but never used no-unused-vars
10:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
21:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
D:\Workspace\Projects\spectrav2\src\components\exchange\RouteDetails.jsx
1:8 error 'React' is defined but never used no-unused-vars
49:7 error 'Divider' is assigned a value but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\exchange\SwapBox.jsx
1:8 error 'React' is defined but never used no-unused-vars
6:62 error 'resolveTokenAddress' is defined but never used no-unused-vars
6:83 error 'resolveTokenLabel' is defined but never used no-unused-vars
18:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
39:3 error 'onError' is defined but never used no-unused-vars
41:59 error 'isStellarConnected' is assigned a value but never used no-unused-vars
44:9 error 'stellarAccount' is assigned a value but never used no-unused-vars
64:9 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
62 | if (mode === 'BRIDGE' && !bridgeDestination) {
63 | if (walletAddress) {
> 64 | setBridgeDestination(walletAddress);
| ^^^^^^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
65 | } else {
66 | const cachedEvm = localStorage.getItem('spectra_wallet');
67 | if (cachedEvm) setBridgeDestination(cachedEvm); react-hooks/set-state-in-effect
72:48 error 'sdkError' is assigned a value but never used no-unused-vars
158:14 error 'err' is defined but never used no-unused-vars
180:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
178 | hydrate().catch((error) => console.warn('[SwapBox] Hydration failed:', error));
179 | } else {
> 180 | setEthBalance(ZERO);
| ^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
181 | setPaymentTokenBalance(ZERO);
182 | setSelectedAssetBalance(ZERO);
183 | setRawPaymentTokenBalance('0'); react-hooks/set-state-in-effect
185:6 warning React Hook useEffect has a missing dependency: 'fetchBalances'. Either include it or remove the dependency array react-hooks/exhaustive-deps
492:17 error 'setExecutionError' is not defined no-undef
494:17 error 'setExecutionError' is not defined no-undef
D:\Workspace\Projects\spectrav2\src\components\home\CinematicHero.jsx
1:8 error 'React' is defined but never used no-unused-vars
3:16 error 'useNavigate' is defined but never used no-unused-vars
5:10 error 'Spline' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\home\FeatureScroll.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\home\FeaturesGrid.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\home\FeedbackSection.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\home\Hero.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\home\HeroDesign.jsx
1:8 error 'React' is defined but never used no-unused-vars
1:38 error 'Component' is defined but never used no-unused-vars
23:5 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
21 |
22 | useEffect(() => {
> 23 | setIsMounted(true);
| ^^^^^^^^^^^^ Avoid calling setState() directly within an effect
24 | }, []);
25 |
26 | return ( react-hooks/set-state-in-effect
D:\Workspace\Projects\spectrav2\src\components\home\LiveTerminal.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\layout\AmbientBackground.jsx
1:8 error 'React' is defined but never used no-unused-vars
49:5 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
47 |
48 | useEffect(() => {
> 49 | setIsMounted(true);
| ^^^^^^^^^^^^ Avoid calling setState() directly within an effect
50 |
51 | // Set initial position to center of the screen
52 | if (typeof window !== 'undefined') { react-hooks/set-state-in-effect
D:\Workspace\Projects\spectrav2\src\components\layout\ErrorDialog.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\layout\FluidNav.jsx
137:23 error 'walletAddress' is assigned a value but never used no-unused-vars
137:38 error 'login' is assigned a value but never used no-unused-vars
139:9 error 'handleLogout' is assigned a value but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\layout\Footer.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\layout\MainLayout.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\layout\Navigation.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\layout\OnboardingEnforcer.jsx
16:10 error 'isChecking' is assigned a value but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\layout\RequireAuth.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\components\mint\MintConsole.jsx
1:8 error 'React' is defined but never used no-unused-vars
170:14 error 'e' is defined but never used no-unused-vars
170:17 error Empty block statement no-empty
188:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
186 | hydrate().catch(e => console.warn('[MintConsole] Hydration failed:', e));
187 | } else {
> 188 | setEthBalance(ZERO);
| ^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
189 | setMockUsdBalance(ZERO);
190 | setUserTier(-1);
191 | setOwnedTokenId(0); react-hooks/set-state-in-effect
193:6 warning React Hook useEffect has missing dependencies: 'fetchBalances' and 'stellarPublicKey'. Either include them or remove the dependency array react-hooks/exhaustive-deps
D:\Workspace\Projects\spectrav2\src\components\mint\PricingMatrix.jsx
1:8 error 'React' is defined but never used no-unused-vars
1:17 error 'useState' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\context\AuthContext.jsx
1:8 error 'React' is defined but never used no-unused-vars
239:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
D:\Workspace\Projects\spectrav2\src\context\ErrorContext.jsx
1:8 error 'React' is defined but never used no-unused-vars
26:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
D:\Workspace\Projects\spectrav2\src\context\RateLimitContext.jsx
1:8 error 'React' is defined but never used no-unused-vars
65:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
D:\Workspace\Projects\spectrav2\src\context\ThemeContext.jsx
1:8 error 'React' is defined but never used no-unused-vars
28:14 error Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
D:\Workspace\Projects\spectrav2\src\hooks\useUGF.js
28:52 error 'paymentToken' is defined but never used no-unused-vars
109:16 error 's' is defined but never used no-unused-vars
140:7 error There is no `cause` attached to the symptom error being thrown preserve-caught-error
D:\Workspace\Projects\spectrav2\src\lib\stellar\client.js
1:64 error 'xdr' is defined but never used no-unused-vars
107:62 error '_publicKey' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\lib\stellar\contracts\bridge.js
1:34 error 'scValToNative' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\lib\stellar\contracts\nft.js
29:12 error 'err' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\lib\stellar\contracts\token.js
1:19 error 'nativeToScVal' is defined but never used no-unused-vars
2:24 error 'invokeContract' is defined but never used no-unused-vars
25:12 error 'err' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\lib\stellar\relayer.js
1:10 error 'Keypair' is defined but never used no-unused-vars
1:19 error 'TransactionBuilder' is defined but never used no-unused-vars
2:10 error 'server' is defined but never used no-unused-vars
2:18 error 'networkPassphrase' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\lib\stellar\snap.js
12:12 error 'e' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\main.jsx
1:10 error 'StrictMode' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\About.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Admin.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\AdminDashboard.jsx
1:8 error 'React' is defined but never used no-unused-vars
124:7 error Error: Cannot access variable before it is declared
`fetchData` is accessed before it is declared, which prevents the earlier access from updating when this value changes over time.
122 | navigate('/');
123 | } else {
> 124 | fetchData();
| ^^^^^^^^^ `fetchData` accessed before it is declared
125 | }
126 | }, [navigate]);
127 |
126 | }, [navigate]);
127 |
> 128 | const fetchData = async () => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 129 | setLoading(true);
| ^^^^^^^^^^^^^^^^^^^^^
> 130 | const data = await getAllFeedback();
| ^^^^^^^^^^^^^^^^^^^^^
> 131 | setFeedback(data || []);
| ^^^^^^^^^^^^^^^^^^^^^
> 132 | setLoading(false);
| ^^^^^^^^^^^^^^^^^^^^^
> 133 | };
| ^^^^^ `fetchData` is declared here
134 |
135 | const handleExport = () => {
136 | const worksheet = XLSX.utils.json_to_sheet(feedback.map(f => ({ react-hooks/immutability
D:\Workspace\Projects\spectrav2\src\pages\AdminLogin.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Agent.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Exchange.jsx
1:8 error 'React' is defined but never used no-unused-vars
1:28 error 'useMemo' is defined but never used no-unused-vars
4:59 error 'TOKEN_ADDRESSES' is defined but never used no-unused-vars
83:16 error 'quoteError' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Features.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Home.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Journal.jsx
1:8 error 'React' is defined but never used no-unused-vars
3:10 error 'ArrowRight' is defined but never used no-unused-vars
3:35 error 'TrendingUp' is defined but never used no-unused-vars
28:7 error 'Pill' is assigned a value but never used no-unused-vars
53:7 error 'Subtitle' is assigned a value but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\LegalPage.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Login.jsx
1:8 error 'React' is defined but never used no-unused-vars
1:17 error 'useEffect' is defined but never used no-unused-vars
87:9 error 'navigate' is assigned a value but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\Mint.jsx
1:8 error 'React' is defined but never used no-unused-vars
D:\Workspace\Projects\spectrav2\src\pages\ProfileDashboard.jsx
1:8 error 'React' is defined but never used no-unused-vars
3:18 error 'keyframes' is defined but never used no-unused-vars
6:3 error 'User' is defined but never used no-unused-vars
6:58 error 'X' is defined but never used no-unused-vars
7:3 error 'RefreshCw' is defined but never used no-unused-vars
7:14 error 'Star' is defined but never used no-unused-vars
7:25 error 'Cpu' is defined but never used no-unused-vars
7:30 error 'CreditCard' is defined but never used no-unused-vars
184:9 error 'location' is assigned a value but never used no-unused-vars
209:7 error Error: Cannot access variable before it is declared
`loadProfile` is accessed before it is declared, which prevents the earlier access from updating when this value changes over time.
207 | useEffect(() => {
208 | if (account) {
> 209 | loadProfile(account);
| ^^^^^^^^^^^ `loadProfile` accessed before it is declared
210 | } else {
211 | setHasProfile(false);
212 | setFormData({ name: '', email: '', phone: '', bio: '', avatarId: 1 });
215 | }, [account, isStellarConnected]);
216 |
> 217 | const loadProfile = async (address) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 218 | setLoading(true);
| ^^^^^^^^^^^^^^^^^^^^^
> 219 | try {
…
| ^^^^^^^^^^^^^^^^^^^^^
> 270 | }
| ^^^^^^^^^^^^^^^^^^^^^
> 271 | };
| ^^^^^ `loadProfile` is declared here
272 |
273 | const saveProfile = async () => {
274 | setSaving(true); react-hooks/immutability
211:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
209 | loadProfile(account);
210 | } else {
> 211 | setHasProfile(false);
| ^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
212 | setFormData({ name: '', email: '', phone: '', bio: '', avatarId: 1 });
213 | setUserTier(0);
214 | } react-hooks/set-state-in-effect
215:6 warning React Hook useEffect has a missing dependency: 'loadProfile'. Either include it or remove the dependency array react-hooks/exhaustive-deps
254:18 error 'e' is defined but never used no-unused-vars
254:21 error Empty block statement no-empty
264:18 error 'e' is defined but never used no-unused-vars
264:21 error Empty block statement no-empty
D:\Workspace\Projects\spectrav2\vite.config.js
6:29 error 'process' is not defined no-undef
Γ£û 154 problems (150 errors, 4 warnings)