Skip to content

Commit fc59575

Browse files
authored
Merge pull request #538 from sasaplus1/fix/test
fix lint
2 parents 3a35717 + 7a9332a commit fc59575

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Diff for: karma.conf.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable */
2+
13
const path = require('path');
24

35
const typescript = require('rollup-plugin-typescript');

Diff for: test/nodejs_stream.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as fs from 'node:fs';
22
import * as path from 'node:path';
33
import * as url from 'node:url';
44
import { assert, describe, it } from 'vitest';
5-
65
import { createLtsvToJsonStream } from '../src/nodejs_stream';
6+
import { type LtsvRecord } from '../src/types';
77

88
const __filename = url.fileURLToPath(import.meta.url);
99
const __dirname = path.dirname(__filename);
@@ -73,7 +73,7 @@ describe('nodejs_stream', function () {
7373
it('should convert to Object from LTSV', function () {
7474
return new Promise<void>((resolve) => {
7575
const stream = createLtsvToJsonStream({ objectMode: true });
76-
const buffer: string[] = [];
76+
const buffer: LtsvRecord[] = [];
7777

7878
stream.on('readable', function () {
7979
for (let buf = stream.read(); buf != null; buf = stream.read()) {

Diff for: test/whatwg_stream.test.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { assert, describe, it } from 'vitest';
2-
32
import { createLtsvToJsonStream } from '../src/whatwg_stream';
43

54
/**
@@ -34,7 +33,7 @@ function createReadableStream(
3433
): ReadableStream {
3534
const underlyingSink: UnderlyingSource<string> = {
3635
start(controller): void {
37-
enqueue(strings, controller);
36+
enqueue(strings, controller as ReadableStreamDefaultController<string>);
3837
},
3938
...overrides
4039
};
@@ -161,7 +160,9 @@ describe('whatwg_stream', function () {
161160
assert.deepStrictEqual(chunks, [
162161
{ label1: 'value1', label2: 'value2' },
163162
{ label3: 'value3', label4: 'value4' }
164-
]);
163+
// TODO: use LtsvRecord type
164+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
165+
] as any);
165166
resolve();
166167
}
167168
});

Diff for: tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"extends": "@tsconfig/strictest/tsconfig.json",
2+
"extends": "@tsconfig/strictest",
33
"compilerOptions": {
44
"module": "ESNext",
5+
"moduleResolution": "Bundler",
56
"target": "ESNext"
67
},
78
"include": ["src/**/*", "test/**/*"]

0 commit comments

Comments
 (0)