-
Notifications
You must be signed in to change notification settings - Fork 275
Re-enable no-misused-promises and no-dynamic-delete eslint rules #5753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, these are two really good lint rules to have switched back on.
7abdf07 to
3925a3b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and pushed up a fixup, so we can get this in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReturnType<typeof makePeriodicTask> is called PeriodicTask. I'll import the type for ya.
d687f77 to
cf195cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: State Mutation Causes React to Miss Updates
The useFilter hook directly mutates filteredDataCache (a Map) and fifoCache (an array) state objects. Passing these mutated references to setState can prevent React from detecting changes, potentially causing missed re-renders and unexpected UI behavior.
Uh oh!
There was an error while loading. Please reload this page.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Re-enables
@typescript-eslint/no-misused-promisesand@typescript-eslint/no-dynamic-delete, refactoring handlers and data structures (use Maps/immutable copies), adding explicit error handling, and adjusting timers/polling across UI, providers, and utilities.@typescript-eslint/no-misused-promisesand@typescript-eslint/no-dynamic-deleteineslint.config.mjs.delete obj[key]patterns with immutable rest copies orMapAPIs; migrate various caches/state toMap(perf timers, stake metadata cache, rates resolver map, filters, pending calls, etc.).asyncvoid UI handlers to non-async functions using promise chains with.catch(showError); tighten types (e.g.,onPress?: () => Promise<void>where needed).makePeriodicTask) and ensure cleanup via.stop(); add centralized error reporting in periodic callbacks.EarnOptionCardonPress,WalletListdefaultonPress).banxa,kado,moonpay,paybis,revolut,simplex):PeriodicTask; fix status handling.Mapwith safer iteration; improve app perf timer storage.Written by Cursor Bugbot for commit cf195cc. This will update automatically on new commits. Configure here.