Add ESLint and lint a bunch

This commit is contained in:
Vanilagy
2024-12-01 17:33:54 +01:00
parent 3ae891842f
commit 6730e41c07
25 changed files with 3668 additions and 1584 deletions
+9 -9
View File
@@ -1,5 +1,5 @@
import { Output } from "./output";
import { ArrayBufferTargetWriter, ChunkedStreamTargetWriter, StreamTargetWriter, Writer } from "./writer";
import { ArrayBufferTargetWriter, ChunkedStreamTargetWriter, StreamTargetWriter, Writer } from './writer';
import { Output } from './output';
/** @public */
export abstract class Target {
@@ -23,15 +23,15 @@ export class ArrayBufferTarget extends Target {
/** @public */
export type StreamTargetChunk = {
type: 'write', // This ensures automatic compatibility with FileSystemWritableFileStream
data: Uint8Array,
position: number
type: 'write'; // This ensures automatic compatibility with FileSystemWritableFileStream
data: Uint8Array;
position: number;
};
/** @public */
export type StreamTargetOptions = {
chunked?: boolean,
chunkSize?: number
chunked?: boolean;
chunkSize?: number;
};
/** @public */
@@ -43,7 +43,7 @@ export class StreamTarget extends Target {
constructor(
writable: WritableStream<StreamTargetChunk>,
options: StreamTargetOptions = {}
options: StreamTargetOptions = {},
) {
super();
@@ -68,4 +68,4 @@ export class StreamTarget extends Target {
_createWriter() {
return this._options.chunked ? new ChunkedStreamTargetWriter(this) : new StreamTargetWriter(this);
}
}
}