Skip to content

Commit 3fd424b

Browse files
committed
fix: update typescript-eslint for ESLint 10 compatibility
ESLint 10 removed context.parserOptions, breaking typescript-eslint 8.54.0's no-deprecated rule. Updated to 8.56.1 and fixed new no-useless-assignment and preserve-caught-error violations.
1 parent 08da9d6 commit 3fd424b

11 files changed

Lines changed: 135 additions & 217 deletions

File tree

‎agent-bridge/src/agent/utils/content.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function buildContentBlocks(
8080
});
8181
} else if (attachment.type === 'text') {
8282
// Text content with metadata
83-
let textContent = '';
83+
let textContent: string;
8484

8585
if (
8686
attachment.filePath !== undefined &&

‎apps/Canvas-UI-Builder/src/components/layout/resize-handles/LeftResizeHandle.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const LeftResizeHandle: FC = () => {
4747
if (isCollapsed) return;
4848

4949
const step = e.shiftKey ? KEYBOARD_STEP_LARGE : KEYBOARD_STEP;
50-
let newWidth = leftSidebarWidth;
50+
let newWidth: number;
5151

5252
if (e.key === 'ArrowLeft') {
5353
newWidth = Math.max(PANEL_SIZES.sidebar.minUsable, leftSidebarWidth - step);

‎apps/Canvas-UI-Builder/src/components/layout/resize-handles/RightResizeHandle.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const RightResizeHandle: FC = () => {
4747
if (isCollapsed) return;
4848

4949
const step = e.shiftKey ? KEYBOARD_STEP_LARGE : KEYBOARD_STEP;
50-
let newWidth = canvasRightSidebarWidth;
50+
let newWidth: number;
5151

5252
// Inverted: ArrowLeft expands, ArrowRight collapses
5353
if (e.key === 'ArrowLeft') {

‎apps/agent/src/__tests__/integration/chat/rewind-e2e.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ describe('Single Rewind E2E', () => {
444444
'assistant',
445445
'Let me explain...',
446446
displayedMessages,
447-
ts++
447+
ts
448448
);
449449
displayedMessages.push(asst4);
450450
expect(asst4.parentUuid).toBe('user-4'); // Normal chain continuation
@@ -491,7 +491,7 @@ describe('Single Rewind E2E', () => {
491491
expect(result.forkPointSet?.messageId).toBe('u1');
492492

493493
// New message after rewind branches from user1
494-
const user3 = createMessage(SESSION_ID, 'u3', 'user', 'Try again', result.resultMessages, ts++);
494+
const user3 = createMessage(SESSION_ID, 'u3', 'user', 'Try again', result.resultMessages, ts);
495495
expect(user3.parentUuid).toBe('u1');
496496
});
497497

@@ -850,7 +850,7 @@ describe('Multi-Rewind E2E', () => {
850850
// KEY: u5 forks from sdk-a1 again (third branch from the same point)
851851
expect(u5.parentUuid).toBe('sdk-a1');
852852

853-
const a5 = createMessage(SESSION_A, 'a5', 'assistant', 'OK third try', displayed2, ts++);
853+
const a5 = createMessage(SESSION_A, 'a5', 'assistant', 'OK third try', displayed2, ts);
854854
displayed2.push(a5);
855855

856856
// ============================================================
@@ -946,7 +946,7 @@ describe('Multi-Rewind E2E', () => {
946946

947947
const r2 = processConversationRewound(rewind2Event);
948948
const b2 = [...r2.resultMessages];
949-
const u5 = createMessage(SESSION_ID, 'u5', 'user', 'Branch from a1', b2, ts++);
949+
const u5 = createMessage(SESSION_ID, 'u5', 'user', 'Branch from a1', b2, ts);
950950
b2.push(u5);
951951
expect(u5.parentUuid).toBe('a1');
952952

‎apps/agent/src/__tests__/integration/chat/rewind-flow.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ describe('Full Rewind Flow Integration', () => {
219219
'assistant',
220220
'Let me explain the concept...',
221221
messages,
222-
timestamp++
222+
timestamp
223223
);
224224
messages.push(resp3);
225225

@@ -358,7 +358,7 @@ describe('Full Rewind Flow Integration', () => {
358358
'assistant',
359359
'Reply 4',
360360
messages,
361-
timestamp++
361+
timestamp
362362
);
363363
messages.push(resp4);
364364

@@ -404,7 +404,7 @@ describe('Full Rewind Flow Integration', () => {
404404
'assistant',
405405
'Reply 2',
406406
messages,
407-
timestamp++
407+
timestamp
408408
);
409409
messages.push(resp2);
410410
expect(resp2.parentUuid).toBe('msg-2'); // Normal, not from fork point
@@ -420,7 +420,7 @@ describe('Full Rewind Flow Integration', () => {
420420
);
421421

422422
// No fork point set - should use last message
423-
const msg2 = createMessage(SESSION_ID, 'msg-2', 'user', 'Second', messages, timestamp++);
423+
const msg2 = createMessage(SESSION_ID, 'msg-2', 'user', 'Second', messages, timestamp);
424424
messages.push(msg2);
425425

426426
expect(msg2.parentUuid).toBe('resp-1');
@@ -465,7 +465,7 @@ describe('Full Rewind Flow Integration', () => {
465465
createMessage(SESSION_ID, 'msg-4', 'user', 'Branch msg', messages, timestamp++)
466466
);
467467
messages.push(
468-
createMessage(SESSION_ID, 'resp-4', 'assistant', 'Branch resp', messages, timestamp++)
468+
createMessage(SESSION_ID, 'resp-4', 'assistant', 'Branch resp', messages, timestamp)
469469
);
470470

471471
// Active chain should be: msg1 -> resp1 -> msg2 -> resp2 -> msg4 -> resp4

‎apps/agent/src/components/git/source-control/hooks/use-source-control.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ export function useSourceControl(isVisible = true): UseSourceControlReturn {
530530

531531
const display = toUserGitError(err);
532532
toast.error('Create branch failed', { description: display });
533-
throw new Error(display);
533+
throw new Error(display, { cause: err });
534534
} finally {
535535
setIsCheckingOut(false);
536536
operationInProgress.current = false;

‎apps/agent/src/components/layout/resize-handle.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const ResizeHandle: FC<ResizeHandleProps> = ({
129129
const currentValue = target === 'review' ? reviewPanelWidth : bottomPanelHeight;
130130
const setValue = target === 'review' ? setReviewPanelWidth : setBottomPanelHeight;
131131

132-
let newValue = currentValue;
132+
let newValue: number;
133133

134134
if (direction === 'vertical') {
135135
// Vertical handle: Left/Right arrows resize

‎apps/agent/src/components/layout/sidebar-resize-handle.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const SidebarResizeHandle: FC = () => {
7878
if (isCollapsed) return; // Can't resize when collapsed
7979

8080
const step = e.shiftKey ? KEYBOARD_STEP_LARGE : KEYBOARD_STEP;
81-
let newWidth = leftSidebarWidth;
81+
let newWidth: number;
8282

8383
if (e.key === 'ArrowLeft') {
8484
newWidth = Math.max(PANEL_SIZES.sidebar.minUsable, leftSidebarWidth - step);

‎apps/agent/src/components/sidebar/WorktreeItem.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export const WorktreeItem: FC<WorktreeItemProps> = ({
237237
error: message,
238238
});
239239
toast.error('Create branch failed', { description: displayMessage });
240-
throw new Error(displayMessage);
240+
throw new Error(displayMessage, { cause: err });
241241
} finally {
242242
setIsCheckingOut(false);
243243
}

0 commit comments

Comments
 (0)