From 6e8dcc459956ee518e1d2a4b303da5871ae6e3d5 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Mon, 26 Sep 2022 15:14:09 -0400 Subject: [PATCH] client: fix various lint issues Mostly adding in missing return types and removing unused imports. --- packages/client/src/pages/api-console.vue | 4 ++-- packages/client/src/pages/auth.form.vue | 4 ++-- packages/client/src/pages/channels.vue | 4 ++-- packages/client/src/pages/follow.vue | 4 ++-- packages/client/src/pages/miauth.vue | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/client/src/pages/api-console.vue b/packages/client/src/pages/api-console.vue index 846912759..fbbdb854c 100644 --- a/packages/client/src/pages/api-console.vue +++ b/packages/client/src/pages/api-console.vue @@ -50,7 +50,7 @@ os.api('endpoints').then(endpointResponse => { endpoints.value = endpointResponse; }); -function send() { +function send(): void { sending.value = true; const requestBody = JSON5.parse(body.value); os.api(endpoint.value as keyof Endpoints, requestBody, requestBody.i || (withCredential.value ? undefined : null)).then(resp => { @@ -62,7 +62,7 @@ function send() { }); } -function onEndpointChange() { +function onEndpointChange(): void { os.api('endpoint', { endpoint: endpoint.value }, withCredential.value ? undefined : null).then(resp => { const endpointBody = {}; for (const p of resp.params) { diff --git a/packages/client/src/pages/auth.form.vue b/packages/client/src/pages/auth.form.vue index 33b29b5c8..d4af3b6db 100644 --- a/packages/client/src/pages/auth.form.vue +++ b/packages/client/src/pages/auth.form.vue @@ -43,7 +43,7 @@ const props = defineProps<{ const app = props.session.app; -function cancel() { +function cancel(): void { os.api('auth/deny', { token: props.session.token, }).then(() => { @@ -51,7 +51,7 @@ function cancel() { }); } -function accept() { +function accept(): void { os.api('auth/accept', { token: props.session.token, }).then(() => { diff --git a/packages/client/src/pages/channels.vue b/packages/client/src/pages/channels.vue index 63612bc57..699a4e003 100644 --- a/packages/client/src/pages/channels.vue +++ b/packages/client/src/pages/channels.vue @@ -23,7 +23,7 @@