From c85b1c06a9804ad41fbccf8fe5a5689f28eb049e Mon Sep 17 00:00:00 2001 From: Axetroy Date: Wed, 19 Jun 2019 12:22:01 +0800 Subject: lint: add max line length rules (denoland/deno_std#507) Original: https://github.com/denoland/deno_std/commit/b04fda30c8949b6347094b898bfa427c0b9a6162 --- archive/tar.ts | 9 ++++++--- archive/tar_test.ts | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'archive') diff --git a/archive/tar.ts b/archive/tar.ts index 5698ae6a0..5f5b1a99e 100644 --- a/archive/tar.ts +++ b/archive/tar.ts @@ -1,5 +1,6 @@ /** - * Ported and modified from: https://github.com/jshttp/mime-types and licensed as: + * Ported and modified from: https://github.com/jshttp/mime-types and + * licensed as: * * (The MIT License) * @@ -292,7 +293,8 @@ export class Tar { /** * Append a file to this tar archive - * @param fileName file name (e.g., test.txt; use slash for directory separators) + * @param fileName file name + * e.g., test.txt; use slash for directory separators * @param opts options */ async append(fileName: string, opts: TarOptions): Promise { @@ -314,7 +316,8 @@ export class Tar { } if (i < 0 || fileName.length > 100 || fileNamePrefix!.length > 155) { throw new Error( - "ustar format does not allow a long file name (length of [file name prefix] + / + [file name] must be shorter than 256 bytes)" + "ustar format does not allow a long file name (length of [file name" + + "prefix] + / + [file name] must be shorter than 256 bytes)" ); } } diff --git a/archive/tar_test.ts b/archive/tar_test.ts index 951879277..474e1e2d3 100644 --- a/archive/tar_test.ts +++ b/archive/tar_test.ts @@ -34,7 +34,10 @@ test(async function createTarArchive(): Promise { const writer = new Deno.Buffer(), wrote = await Deno.copy(writer, tar.getReader()); - // 3072 = 512 (header) + 512 (content) + 512 (header) + 512 (content) + 1024 (footer) + /** + * 3072 = 512 (header) + 512 (content) + 512 (header) + 512 (content) + * + 1024 (footer) + */ assertEquals(wrote, 3072); }); -- cgit v1.2.3