Skip to content

Commit 645112b

Browse files
committed
Fix eslint things
1 parent 580cdc7 commit 645112b

6 files changed

Lines changed: 10 additions & 7 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
"author": "Alexandre Rogozine",
4747
"license": "MIT",
4848
"devDependencies": {
49-
"@types/node": "^16.9.4",
50-
"@typescript-eslint/eslint-plugin": "^4.31.2",
51-
"@typescript-eslint/parser": "^4.31.2",
49+
"@types/node": "^17.0.18",
50+
"@typescript-eslint/eslint-plugin": "^5.12.0",
51+
"@typescript-eslint/parser": "^5.12.0",
5252
"eslint": "^8.9.0",
5353
"eslint-plugin-jsdoc": "^37.9.1",
5454
"eslint-plugin-prefer-arrow": "^1.2.3",

src/async/_private/selectMany.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ type SelectManyFunc = {
2424
selector: keyof TSource): IAsyncEnumerable<Y>
2525
}
2626

27+
/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument */
28+
2729
export const selectMany: SelectManyFunc = <TCollection>(
2830
source: AsyncIterable<any>,
2931
selector: any): IAsyncEnumerable<TCollection> => {
3032
if (typeof selector === "function") {
31-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3233
if (selector.length === 1) {
3334
return selectMany1(source, selector)
3435
} else {

src/initializer/bindArrayEnumerable.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const bindArrayEnumerable = <T, TKey extends keyof IEnumerable<T>>() => {
2929
// eslint-disable-next-line no-shadow
3030
let count = 0
3131
for (let i = 0; i < this.length; i ++) {
32+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
3233
if (predicate(this[i]) === true) {
3334
count++
3435
}

src/initializer/bindLinq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import { whereAsync } from "./../sync/_private/whereAsync"
7979
import { zip } from "./../sync/_private/zip"
8080
import { zipAsync } from "./../sync/_private/zipAsync"
8181

82-
/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-assignment */
82+
/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument */
8383

8484
/**
8585
* Binds LINQ methods to an iterable type

src/initializer/bindLinqAsync.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ import { whereAsync } from "./../async/_private/whereAsync"
7878
import { zip } from "./../async/_private/zip"
7979
import { zipAsync } from "./../async/_private/zipAsync"
8080

81-
/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-assignment */
81+
/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument */
8282

8383
/**
8484
* Binds LINQ methods to an iterable type
8585
* @param object Iterable Type
8686
*/
87-
export const bindLinqAsync = <T extends any, Y extends AsyncIterable<T>>(object: IPrototype<Y>) => {
87+
export const bindLinqAsync = <T, Y extends AsyncIterable<T>>(object: IPrototype<Y>) => {
8888
const prototype = object.prototype as IAsyncEnumerable<T>
8989

9090
const bind = <TKey extends Exclude<keyof IAsyncEnumerable<T>, keyof AsyncIterable<T>>, TParams extends Parameters<IAsyncEnumerable<T>[TKey]>>

src/sync/static/flatten.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const flatten: FlattenFunc = <TSource>(
2828
// We exclude it from being flattened
2929
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3030
if (item[Symbol.iterator] !== undefined && typeof item !== "string") {
31+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
3132
yield* shallow ? item : iterator(item)
3233
} else {
3334
yield item

0 commit comments

Comments
 (0)