Skip to content

Commit 66c5841

Browse files
committed
style: lint
1 parent 7d0e33a commit 66c5841

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

src/AsyncDisposeAggregator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export class AsyncDisposeAggregator {
6161
if (disposeTarget instanceof Promise) {
6262
try {
6363
disposeTarget = await disposeTarget;
64-
} catch (err) { /* c8 ignore start */
64+
} catch (err) {
65+
/* c8 ignore start */
6566
console.error(err);
6667
continue;
6768
} /* c8 ignore stop */

src/MultiKeyMap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ export class MultiKeyMap<const Key extends readonly any[], const V> {
100100
if (valueKey == null)
101101
return false;
102102

103-
map.delete(valueSymbol)
103+
map.delete(valueSymbol);
104104
this._keys.delete(valueKey);
105105

106106
for (let i = stack.length - 1; i >= 0; i--) {
107-
const [accessMap, accessKey] = stack[i];
107+
const [accessMap, accessKey] = stack[i]!;
108108

109109
if (map.size !== 0)
110110
break;

src/State.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class State<T> {
142142
} = {}
143143
) {
144144
let changeEventMicrotaskQueued = false;
145-
const getState = () => states.map(state => state.state) as StateTypes;
145+
const getState = () => states.map((state) => state.state) as StateTypes;
146146
let lastDispatchState = getState();
147147

148148
const dispatchEvent = (onlyIfChanged: boolean = true, includeLastState: boolean = true) => {
@@ -185,12 +185,12 @@ export class State<T> {
185185
}
186186
};
187187

188-
const handlers = states.map(state => state.createChangeListener(onChange, false));
188+
const handlers = states.map((state) => state.createChangeListener(onChange, false));
189189

190190
if (callInstantlyWithCurrentState)
191191
dispatchEvent(false, false);
192192

193-
return StateChangeListenerHandle._create(() => handlers.forEach(handler => handler.dispose()));
193+
return StateChangeListenerHandle._create(() => handlers.forEach((handler) => handler.dispose()));
194194
}
195195
}
196196

test/EventRelay.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-unused-expressions */
12
import {describe, expect, expectTypeOf, test, vi} from "vitest";
23
import {EventRelay, DisposedError} from "../src/index.js";
34

test/withLock.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ describe("withLock", () => {
209209

210210
async function addRow(index: number) {
211211
await withLock(scope1, key1, async () => {
212-
await new Promise(resolve => setTimeout(resolve, 1));
212+
await new Promise((resolve) => setTimeout(resolve, 1));
213213
res.push(index);
214214
});
215215
}
@@ -315,7 +315,7 @@ describe("withLock", () => {
315315
const key = "key";
316316

317317
let calls = 0;
318-
await withLock(scope, key, async function (){
318+
await withLock(scope, key, async function () {
319319
expect(this).toBe(scope);
320320
calls++;
321321
});

0 commit comments

Comments
 (0)