refactor(ui): modernize code for eslint 10 and react best practices#6227
refactor(ui): modernize code for eslint 10 and react best practices#6227erka wants to merge 2 commits into
Conversation
erka
commented
Jul 19, 2026
- Replace let with const for non-reassigned variables
- Remove unused catch parameters and function arguments
- Remove eslint-disable comments where violations are fixed
- Fix isFetchBaseQueryError return type to eliminate @ts-ignore
- Route navigation through browser.navigateTo abstraction
- Simplify SegmentsPicker: useMemo over useRef/useEffect
- Fix Analytics: derive selectedFlag and pollingInterval with useMemo
- Fix Preferences: useRef for isInitialLoad, streamline debounce
- Replace let with const for non-reassigned variables - Remove unused catch parameters and function arguments - Remove eslint-disable comments where violations are fixed - Fix isFetchBaseQueryError return type to eliminate @ts-ignore - Route navigation through browser.navigateTo abstraction - Simplify SegmentsPicker: useMemo over useRef/useEffect - Fix Analytics: derive selectedFlag and pollingInterval with useMemo - Fix Preferences: useRef for isInitialLoad, streamline debounce Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #6227 +/- ##
=======================================
Coverage 62.27% 62.27%
=======================================
Files 145 145
Lines 14815 14815
=======================================
Hits 9226 9226
Misses 4829 4829
Partials 760 760
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Verdict: approve
Clean mechanical refactor. The const/let fixes, unused-parameter cleanups, eslint-disable removals, type-guard correction, and effect simplifications in SegmentsPicker and Analytics all look correct. The prior automated review’s two concerns (Preferences.tsx missing a mount effect and NavUser.tsx duplicate import) appear to have been based on a misread—the current diff preserves the separate mount effect and has only a single merged import line. No changes requested.
🤖 Automated review by the Flipt PR review agent.
Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>