[skip ci] Re-add removed lint rules

This commit is contained in:
schroda
2026-03-14 02:11:03 +01:00
parent 0a643655ad
commit 80829febb2
10 changed files with 18 additions and 16 deletions
+2 -2
View File
@@ -79,9 +79,9 @@ export class Queue {
}
private getNextItemToProcess<T>(): { key: Key; fn: QueueItemFunction<T>; promise: ControlledPromise<T> } {
const [key] = [...this.pendingKeyToPriorityMap.entries()].toSorted(
const [[key]] = [...this.pendingKeyToPriorityMap.entries()].toSorted(
([, priorityA], [, priorityB]) => priorityB - priorityA,
)[0];
);
const fn = this.pendingKeyToFnMap.get(key) as () => PromiseLike<T> | T;
const promise = this.pendingKeyToPromiseMap.get(key) as ControlledPromise<T>;
+2 -2
View File
@@ -45,7 +45,7 @@ export class ZustandUtil {
const fn = args[0] as (state: unknown) => unknown;
selector = sliceKey !== undefined ? (state: State) => fn(state[sliceKey]) : fn;
} else if (args.length === 1) {
const key = args[0];
const [key] = args;
selector =
sliceKey !== undefined
? (state: State) => (state[sliceKey] as Record<PropertyKey, unknown>)[key as PropertyKey]
@@ -66,7 +66,7 @@ export class ZustandUtil {
static createActionName(...names: string[]) {
const storeAndSlices = names.slice(0, -1);
const action = names.slice(-1)[0];
const [action] = names.slice(-1);
return `${storeAndSlices.join(':')}/${action}`;
}