Skip to content

Commit 93c5ac9

Browse files
committed
fix: lint
1 parent 8a5f854 commit 93c5ac9

5 files changed

+10
-13
lines changed

src/VirtualTarGenerator.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import * as utils from './utils';
77
* VirtualTar is a library used to create tar files using a virtual file system
88
* or a file tree. This library aims to provide a generator-parser pair to
99
* create tar files without the reliance on a file system.
10-
*
10+
*
1111
* This class is dedicated to generate an archive to be parsed by the parser.
12-
*
12+
*
1313
* The operation of adding files to the archive will be added to an internal
1414
* buffer tracking all such 'operations', and the generated data can be
1515
* extracted via {@link yieldchunks}. In this case, awaiting {@link settled}
@@ -41,7 +41,7 @@ class VirtualTarGenerator {
4141
* queue.
4242
*/
4343
protected resolveWaitChunksP: (() => void) | undefined;
44-
44+
4545
/**
4646
* This callback resolves a promise waiting for more data to be added to a
4747
* file.
@@ -164,9 +164,7 @@ class VirtualTarGenerator {
164164
}
165165
} else {
166166
while (data.length > 0) {
167-
const chunk = encoder.encode(
168-
data.slice(0, constants.BLOCK_SIZE),
169-
);
167+
const chunk = encoder.encode(data.slice(0, constants.BLOCK_SIZE));
170168
yield parentThis.generator.generateData(chunk);
171169
data = data.slice(constants.BLOCK_SIZE);
172170
}

src/VirtualTarParser.ts

+1
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ class VirtualTarParser {
288288
default:
289289
utils.never(`Unexpected type ${token.fileType}`);
290290
}
291+
break;
291292
}
292293
case 'data': {
293294
if (this.workingToken == null) {

tests/VirtualTarGenerator.test.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import fs from 'fs';
22
import path from 'path';
33
import os from 'os';
44
import { test } from '@fast-check/jest';
5-
import { VirtualTarGenerator } from '@';
65
import * as tar from 'tar';
7-
8-
6+
import { VirtualTarGenerator } from '@';
97

108
describe('generator', () => {
119
let tempDir;
@@ -111,4 +109,4 @@ describe('generator', () => {
111109
const directories = await fs.promises.readdir(path.join(tempDir));
112110
expect(directories).toEqual([dirName]);
113111
});
114-
});
112+
});

tests/VirtualTarParser.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import fs from 'fs';
22
import path from 'path';
33
import os from 'os';
44
import { test } from '@fast-check/jest';
5-
import { VirtualTarParser } from '@';
65
import * as tar from 'tar';
6+
import { VirtualTarParser } from '@';
77

88
describe('parser', () => {
99
let tempDir;
@@ -66,4 +66,4 @@ describe('parser', () => {
6666
expect(entries[fileName1]).toEqual(fileData);
6767
expect(entries[fileName2]).toEqual(fileData);
6868
});
69-
});
69+
});

tests/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ describe('index', () => {
1111
expect('utils' in tar).toBeTrue();
1212
expect('types' in tar).toBeTrue();
1313
});
14-
});
14+
});

0 commit comments

Comments
 (0)