fix(lint): resolve react-hooks/exhaustive-deps, arrow-body-style, and no-plusplus errors

This commit is contained in:
Evie Gauthier committed 2026-03-13 22:17:13 -04:00
1 parent 1261c3b2a0
commit 79e4e09436
4 files changed
+9 -8

No files matched your search

+3 -2
View File
@@ -717,7 +717,8 @@ export function RoomTimeline({
return () => {
debugLog.info('timeline', 'Timeline unmounted', { roomId: room.roomId });
};
}, [room.roomId, eventId]); // Only log on mount/unmount
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [room.roomId, eventId]); // Only log on mount/unmount - intentionally capturing initial values
// Log live timeline linking state changes
useEffect(() => {
@@ -806,7 +807,7 @@ export function RoomTimeline({
setTimeline(getInitialTimeline(room));
scrollToBottomRef.current.count += 1;
scrollToBottomRef.current.smooth = false;
}, [alive, room])
}, [alive, room, room.roomId])
);
useLiveEventArrive(
@@ -535,9 +535,10 @@ export function BackgroundNotifications() {
});
return () => {
const cleanupMap = clientCleanupRef.current;
current.forEach((mx, userId) => {
clientCleanupRef.current.get(userId)?.();
clientCleanupRef.current.delete(userId);
cleanupMap.get(userId)?.();
cleanupMap.delete(userId);
stopClient(mx);
});
current.clear();
+2 -3
View File
@@ -354,9 +354,8 @@ const disposeSlidingSync = (mx: MatrixClient): void => {
slidingSyncByClient.delete(mx);
};
export const getSlidingSyncManager = (mx: MatrixClient): SlidingSyncManager | undefined => {
return slidingSyncByClient.get(mx);
};
export const getSlidingSyncManager = (mx: MatrixClient): SlidingSyncManager | undefined =>
slidingSyncByClient.get(mx);
export const startClient = async (mx: MatrixClient, config?: StartClientConfig): Promise<void> => {
debugLog.info('sync', 'Starting Matrix client', { userId: mx.getUserId() });
+1 -1
View File
@@ -368,7 +368,7 @@ export class SlidingSyncManager {
this.onLifecycle = (state, resp, err) => {
const syncStartTime = performance.now();
this.syncCount++;
this.syncCount += 1;
debugLog.info('sync', `Sliding sync lifecycle: ${state} (cycle #${this.syncCount})`, {
state,