Skip to content

Commit 9ec9256

Browse files
committed
chore: updated linting
1 parent 7e233bb commit 9ec9256

5 files changed

Lines changed: 10 additions & 15 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ export function bufferedAsyncMap (input, callback, options) {
9494
);
9595

9696
// TODO: Could we use an AbortController to improve this? See eg. https://github.com/mcollina/hwp/pull/10
97-
bufferedPromises.splice(0, bufferedPromises.length);
98-
subIterators.splice(0, subIterators.length);
97+
bufferedPromises.splice(0);
98+
subIterators.splice(0);
9999

100100
if (throwAnyError && hasError) {
101101
throw hasError;

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@
2929
"index.d.ts.map"
3030
],
3131
"scripts": {
32+
"build": "run-s build:*",
3233
"build:0": "run-s clean",
3334
"build:1-declaration": "tsc -p declaration.tsconfig.json",
34-
"build": "run-s build:*",
35+
"check": "run-s clean && run-p check:*",
3536
"check:installed-check": "installed-check -i @voxpelli/eslint-config -i eslint",
3637
"check:knip": "knip",
3738
"check:lint": "eslint --report-unused-disable-directives .",
3839
"check:tsc": "tsc",
3940
"check:type-coverage": "type-coverage --detail --strict --at-least 95 --ignore-files 'test/*.spec.js'",
40-
"check": "run-s clean && run-p check:*",
41-
"clean:declarations": "rm -rf $(find . -maxdepth 2 -type f -name '*.d.ts*')",
4241
"clean": "run-p clean:*",
42+
"clean:declarations": "rm -rf $(find . -maxdepth 2 -type f -name '*.d.ts*')",
4343
"prepare": "husky",
4444
"prepublishOnly": "run-s build",
45+
"test": "run-s check test:*",
4546
"test:mocha": "c8 --reporter=lcov --reporter text mocha 'test/**/*.spec.js'",
46-
"test-ci": "run-s test:*",
47-
"test": "run-s check test:*"
47+
"test-ci": "run-s test:*"
4848
},
4949
"devDependencies": {
5050
"@types/chai": "^4.3.19",
@@ -54,13 +54,13 @@
5454
"@types/node": "^18.19.50",
5555
"@types/sinon": "^17.0.3",
5656
"@types/sinon-chai": "^3.2.12",
57-
"@voxpelli/eslint-config": "^22.1.0",
57+
"@voxpelli/eslint-config": "^25.0.1",
5858
"@voxpelli/tsconfig": "^14.0.0",
5959
"c8": "^10.1.2",
6060
"chai": "^4.5.0",
6161
"chai-as-promised": "^7.1.2",
6262
"chai-quantifiers": "^1.0.18",
63-
"eslint": "^9.10.0",
63+
"eslint": "^9.39.4",
6464
"husky": "^9.1.6",
6565
"installed-check": "^9.3.0",
6666
"knip": "^5.30.2",

test/return.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import sinonChai from 'sinon-chai';
99
import {
1010
bufferedAsyncMap,
1111
} from '../index.js';
12-
1312
import {
1413
yieldValuesOverTime,
1514
} from './utils.js';

test/throw.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import sinonChai from 'sinon-chai';
77
import {
88
bufferedAsyncMap,
99
} from '../index.js';
10-
1110
import {
1211
yieldValuesOverTime,
1312
} from './utils.js';

test/values.spec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
bufferedAsyncMap,
1111
mergeIterables,
1212
} from '../index.js';
13-
1413
import {
1514
isAsyncGenerator,
1615
nestedYieldValuesOverTime,
@@ -353,9 +352,7 @@ describe('bufferedAsyncMap() values', () => {
353352
/** @type {AsyncIterable<string>[]} */
354353
const rawResult = [];
355354

356-
for await (const value of bufferedAsyncMap(baseAsyncIterable, async function (item) {
357-
return yieldValuesOverTimeWithPrefix(2, (i) => i % 2 === 1 ? 2000 : 100, 'prefix-' + item + '-');
358-
})) {
355+
for await (const value of bufferedAsyncMap(baseAsyncIterable, async (item) => yieldValuesOverTimeWithPrefix(2, (i) => i % 2 === 1 ? 2000 : 100, 'prefix-' + item + '-'))) {
359356
rawResult.push(value);
360357
}
361358

0 commit comments

Comments
 (0)