File tree Expand file tree Collapse file tree
workers-editor-shared/lib
workers-shared/asset-worker/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 206206 " packages/miniflare/**" ,
207207 " packages/quick-edit-extension/**" ,
208208 " packages/vitest-pool-workers/**" ,
209- " packages/workers-editor-shared/**" ,
210- " packages/workers-shared/**" ,
211209 " packages/wrangler/**" ,
212210 ],
213211 "rules" : {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ interface SetEntryPoint {
3737}
3838
3939// Sent on load to request sources for inflating a stack trace
40- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
40+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- interface used as a branded message type in the EditorMessage generic
4141interface RequestSources { }
4242
4343export type WorkerLoadedMessage = EditorMessage < "WorkerLoaded" , WorkerLoaded > ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export function useRefreshableIframe(
4242 second . removeEventListener ( "load" , onLoadEvent ) ;
4343 } ;
4444 }
45- // eslint-disable-next-line react-hooks/exhaustive-deps
45+ // eslint-disable-next-line react-hooks/exhaustive-deps -- refs are stable across renders and should not trigger re-subscription
4646 } , [ onLoad ] ) ;
4747
4848 function listen ( ) {
@@ -72,7 +72,7 @@ export function useRefreshableIframe(
7272 if ( src ) {
7373 setUrl ( src ) ;
7474 }
75- // eslint-disable-next-line react-hooks/exhaustive-deps
75+ // eslint-disable-next-line react-hooks/exhaustive-deps -- setUrl depends on mutable state that would cause infinite loops if included
7676 } , [ src ] ) ;
7777 const isLoading = isLoadingContent ;
7878 return {
Original file line number Diff line number Diff line change @@ -96,11 +96,13 @@ function comparePathHashWithEntry(
9696) {
9797 let pathHashOffset = HEADER_SIZE + entryIndex * ENTRY_SIZE + PATH_HASH_OFFSET ;
9898 for ( let offset = 0 ; offset < PATH_HASH_SIZE ; offset ++ , pathHashOffset ++ ) {
99- // We know that both values could not be undefined
100- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
101- const s = searchValue [ offset ] ! ;
102- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
103- const e = manifest [ pathHashOffset ] ! ;
99+ const s = searchValue [ offset ] ;
100+ const e = manifest [ pathHashOffset ] ;
101+ if ( s === undefined || e === undefined ) {
102+ throw new TypeError (
103+ `Unexpected undefined value at offset ${ offset } during path hash comparison`
104+ ) ;
105+ }
104106 if ( s < e ) {
105107 return - 1 ;
106108 }
You can’t perform that action at this time.
0 commit comments