chore: enforce lint across codebase and ban "maybe" in identifiers

Remove member-ordering and complexity eslint-disable comments by reordering
class members and applying targeted fixes. Add metoyou/no-maybe-in-naming,
type-safe WebRTC e2e harness helpers, and resolve remaining lint errors so
npm run lint exits cleanly.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-11 11:08:26 +02:00
parent b630bacdc6
commit 79c6f91cd6
138 changed files with 4286 additions and 2310 deletions

View File

@@ -0,0 +1,28 @@
export interface RtcRemoteTrackSnapshot {
kind: string;
id: string;
readyState: string;
}
export interface RtcSyntheticMediaResource {
audioCtx: AudioContext;
source?: AudioScheduledSourceNode;
drawIntervalId?: number;
}
export interface WebRtcTestHarnessWindow extends Window {
__rtcConnections: RTCPeerConnection[];
__rtcDataChannels: RTCDataChannel[];
__rtcRemoteTracks: RtcRemoteTrackSnapshot[];
__rtcSyntheticMediaResources: RtcSyntheticMediaResource[];
__trackedAudioContexts?: AudioContext[];
__rtcStatsHWM?: Record<number, Record<string, number | boolean>>;
__rtcVideoStatsHWM?: Record<number, Record<string, number | boolean>>;
__lastRtcState?: RTCPeerConnectionState;
RTCPeerConnection: typeof RTCPeerConnection;
AudioContext: typeof AudioContext;
}
export function getWebRtcTestHarnessWindow(): WebRtcTestHarnessWindow {
return window as unknown as WebRtcTestHarnessWindow;
}