[skip ci] Re-add removed lint rules
This commit is contained in:
+2
-2
@@ -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>;
|
||||
|
||||
|
||||
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user