@@ -35,6 +35,7 @@ type MetadataWithIPFS = CollMetadata & {
3535 ipfsPins ?: { url : string ; cid : string } [ ] | null ;
3636} ;
3737
38+ // eslint-disable-next-line @typescript-eslint/require-await
3839export async function setAutoIPFSUrl ( url : string ) {
3940 if ( autoipfsOpts . daemonURL !== url ) {
4041 autoipfs = null ;
@@ -213,7 +214,6 @@ async function ipfsWriteBuff(
213214 const file = UnixFS . createFileWriter ( writer ) ;
214215 if ( content instanceof Uint8Array ) {
215216 await file . write ( content ) ;
216- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
217217 } else if ( content [ Symbol . asyncIterator ] ) {
218218 for await ( const chunk of content ) {
219219 await file . write ( chunk ) ;
@@ -347,7 +347,6 @@ async function splitByWarcRecordGroup(
347347 links = [ ] ;
348348 }
349349
350- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
351350 fileLinks . push ( link ) ;
352351
353352 const [ dirName , filename ] = getDirAndName ( currName ) ;
@@ -364,7 +363,6 @@ async function splitByWarcRecordGroup(
364363 dir = dirs [ dirName ] ;
365364 }
366365
367- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
368366 dir . set ( filename , link ) ;
369367
370368 inZipFile = false ;
@@ -379,7 +377,6 @@ async function splitByWarcRecordGroup(
379377 file = UnixFS . createFileWriter ( writer ) ;
380378
381379 if ( chunk === WARC_GROUP ) {
382- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
383380 secondaryLinks . push ( await concat ( writer , links ) ) ;
384381 links = [ ] ;
385382 }
@@ -416,7 +413,6 @@ async function splitByWarcRecordGroup(
416413
417414 rootDir . set ( "webarchive" , await waczDir . close ( ) ) ;
418415
419- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
420416 rootDir . set ( waczPath , await concat ( writer , fileLinks ) ) ;
421417}
422418
@@ -429,7 +425,6 @@ async function concat(
429425 const { fileEncoder, hasher, linker } = writer . settings ;
430426 // eslint-disable-next-line @typescript-eslint/no-explicit-any
431427 const advanced = ( fileEncoder as any ) . createAdvancedFile ( links ) ;
432- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
433428 const bytes = fileEncoder . encode ( advanced ) ;
434429 const hash = await hasher . digest ( bytes ) ;
435430 const cid = linker . createLink ( fileEncoder . code , hash ) ;
@@ -449,7 +444,6 @@ async function concat(
449444
450445export const iterate = async function * ( stream : ReadableStream < Uint8Array > ) {
451446 const reader = stream . getReader ( ) ;
452- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
453447 while ( true ) {
454448 const next = await reader . read ( ) ;
455449 if ( next . done ) {
@@ -462,7 +456,6 @@ export const iterate = async function* (stream: ReadableStream<Uint8Array>) {
462456
463457// eslint-disable-next-line @typescript-eslint/no-explicit-any
464458export async function encodeBlocks ( blocks : UnixFS . Block [ ] , root ?: any ) {
465- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
466459 const { writer, out } = CarWriter . create ( root ) ;
467460 /** @type {Error? } */
468461 let error ;
@@ -480,7 +473,6 @@ export async function encodeBlocks(blocks: UnixFS.Block[], root?: any) {
480473 } ) ( ) ;
481474 const chunks = [ ] ;
482475 for await ( const chunk of out ) chunks . push ( chunk ) ;
483- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
484476 if ( error != null ) throw error ;
485477 const roots = root != null ? [ root ] : [ ] ;
486478 console . log ( "chunks" , chunks . length ) ;
@@ -558,7 +550,6 @@ export class ShardingStream extends TransformStream {
558550 shard = [ ] ;
559551 currSize = 0 ;
560552 }
561- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
562553 shard . push ( block ) ;
563554 currSize += block . bytes . length ;
564555 } ,
0 commit comments