From ae179550bf3247fd65667027e509a9f8e2cf160a Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:27:14 +0530 Subject: [PATCH] more linting --- .vitepress/routes/index.post.ts | 6 +++--- .vitepress/theme/components/Feedback.vue | 23 +++-------------------- .vitepress/theme/components/Feedback2.vue | 19 +++++++------------ .vitepress/types/Feedback.ts | 17 +++++++++++++++++ .vitepress/vue-shim.d.ts | 4 +++- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 7 files changed, 38 insertions(+), 41 deletions(-) diff --git a/.vitepress/routes/index.post.ts b/.vitepress/routes/index.post.ts index 9560f318e..38164174d 100644 --- a/.vitepress/routes/index.post.ts +++ b/.vitepress/routes/index.post.ts @@ -14,8 +14,8 @@ const feedbackOptions = [ }, ]; -function getFeedbackOption(value: string) { - return feedbackOptions.find((option) => option.value === value); +function getFeedbackOption(value: string): string { + return feedbackOptions.find((option) => option.value === value).label; } export default defineEventHandler(async (event) => { @@ -36,7 +36,7 @@ export default defineEventHandler(async (event) => { embeds: [ { color: 3447003, - title: getFeedbackOption(type).label, + title: getFeedbackOption(type), description, }, ], diff --git a/.vitepress/theme/components/Feedback.vue b/.vitepress/theme/components/Feedback.vue index cbf38bdcc..05e047776 100644 --- a/.vitepress/theme/components/Feedback.vue +++ b/.vitepress/theme/components/Feedback.vue @@ -1,7 +1,7 @@