Skip to content

Commit 64ca8f4

Browse files
authored
Merge pull request #37 from MatrixAI/feature-fix-linting-errors
Fix up linting errors found by the new js-lint
2 parents d818b83 + e557461 commit 64ca8f4

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

src/LockBox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class LockBox<L extends Lockable = Lockable> implements Lockable {
235235
signal.addEventListener(
236236
'abort',
237237
() => {
238-
waitPs.reverse();
238+
void waitPs.reverse();
239239
for (const waitP of waitPs) {
240240
waitP.cancel(signal.reason);
241241
}

src/Monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class Monitor<RWLock extends RWLockReader | RWLockWriter> implements Lockable {
310310
signal.addEventListener(
311311
'abort',
312312
() => {
313-
waitPs.reverse();
313+
void waitPs.reverse();
314314
for (const waitP of waitPs) {
315315
waitP.cancel(signal.reason);
316316
}

src/RWLockReader.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ class RWLockReader implements Lockable {
218218
} else {
219219
if (typeof params[0] === 'string') {
220220
type = params.shift() as 'read' | 'write';
221-
} else if (typeof params[0] == null) {
222-
params.shift();
223221
}
224222
}
225223
type = type! ?? 'write';
@@ -268,8 +266,6 @@ class RWLockReader implements Lockable {
268266
} else {
269267
if (typeof params[0] === 'string') {
270268
type = params.shift() as 'read' | 'write';
271-
} else if (typeof params[0] == null) {
272-
params.shift();
273269
}
274270
}
275271
type = type! ?? 'write';

src/RWLockWriter.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ class RWLockWriter implements Lockable {
219219
} else {
220220
if (typeof params[0] === 'string') {
221221
type = params.shift() as 'read' | 'write';
222-
} else if (typeof params[0] == null) {
223-
params.shift();
224222
}
225223
}
226224
type = type! ?? 'write';
@@ -269,8 +267,6 @@ class RWLockWriter implements Lockable {
269267
} else {
270268
if (typeof params[0] === 'string') {
271269
type = params.shift() as 'read' | 'write';
272-
} else if (typeof params[0] == null) {
273-
params.shift();
274270
}
275271
}
276272
type = type! ?? 'write';

0 commit comments

Comments
 (0)