From 981a5a2c7edecc2239dda1bc3321003f939a7450 Mon Sep 17 00:00:00 2001 From: TheMas3212 Date: Sun, 2 Feb 2025 17:34:27 +1100 Subject: Apply and fix new eslint ruleset --- src/file.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/file.ts') diff --git a/src/file.ts b/src/file.ts index f95c8ff..139aa76 100644 --- a/src/file.ts +++ b/src/file.ts @@ -38,8 +38,8 @@ export class TASD { return concatUint8Array(packets); } pprint() { - console.log('VERSION', this.version); - console.log('G_KEYLEN', this.g_keylen); + console.log("VERSION", this.version); + console.log("G_KEYLEN", this.g_keylen); for (const packet of this.packets) { console.log(packet.toString()); } @@ -64,14 +64,14 @@ export class TASD { this.markDirty(); } static parseFile(buffer: Uint8Array) { - if (buffer.length < 7) throw new Error('Input Too Short'); + if (buffer.length < 7) throw new Error("Input Too Short"); for (let i = 0; i < TASD.MAGIC.length; i++) { - if (buffer[i] !== TASD.MAGIC[i]) throw new Error('Invalid Magic Bytes'); + if (buffer[i] !== TASD.MAGIC[i]) throw new Error("Invalid Magic Bytes"); } const version = readUint16(buffer, 4); - if (version !== 1) throw new Error('Unsupported Version'); + if (version !== 1) throw new Error("Unsupported Version"); const g_keylen = readUint8(buffer, 6); - if (g_keylen !== 2) throw new Error('G_KEYLEN not equal to 2, unsupported'); + if (g_keylen !== 2) throw new Error("G_KEYLEN not equal to 2, unsupported"); const file = new TASD(version, g_keylen); let index = 7; while (index < buffer.length) { -- cgit v1.2.3