mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-13 16:22:58 +02:00
Fix lint warnings: redundant type and floating promises
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import { useRpcQuery } from "./useRpcQuery";
|
|||||||
*/
|
*/
|
||||||
export function useRpcQueryWithEvent<
|
export function useRpcQueryWithEvent<
|
||||||
K extends keyof RpcSchema,
|
K extends keyof RpcSchema,
|
||||||
E extends keyof RpcEventSchema & string,
|
E extends keyof RpcEventSchema,
|
||||||
>(cmd: K, payload: Req<K>, event: E, opts?: Omit<UseQueryOptions<Res<K>>, "queryKey" | "queryFn">) {
|
>(cmd: K, payload: Req<K>, event: E, opts?: Omit<UseQueryOptions<Res<K>>, "queryKey" | "queryFn">) {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const query = useRpcQuery(cmd, payload, opts);
|
const query = useRpcQuery(cmd, payload, opts);
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result.type === "uncommitted_changes") {
|
if (result.type === "uncommitted_changes") {
|
||||||
callbacks
|
void callbacks
|
||||||
.promptUncommittedChanges()
|
.promptUncommittedChanges()
|
||||||
.then(async (strategy) => {
|
.then(async (strategy) => {
|
||||||
if (strategy === "cancel") return;
|
if (strategy === "cancel") return;
|
||||||
@@ -205,13 +205,13 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
|
|||||||
return invoke<PullResult>("cmd_git_pull", { dir });
|
return invoke<PullResult>("cmd_git_pull", { dir });
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
onSuccess();
|
await onSuccess();
|
||||||
await callbacks.forceSync();
|
await callbacks.forceSync();
|
||||||
}, handleError);
|
}, handleError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.type === "diverged") {
|
if (result.type === "diverged") {
|
||||||
callbacks
|
void callbacks
|
||||||
.promptDiverged(result)
|
.promptDiverged(result)
|
||||||
.then((strategy) => {
|
.then((strategy) => {
|
||||||
if (strategy === "cancel") return;
|
if (strategy === "cancel") return;
|
||||||
@@ -231,7 +231,7 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
onSuccess();
|
await onSuccess();
|
||||||
await callbacks.forceSync();
|
await callbacks.forceSync();
|
||||||
}, handleError);
|
}, handleError);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user