From cae0fe371b544df82a8ecbf604d6b1e7c54a635f Mon Sep 17 00:00:00 2001 From: Marcus <1922576605@qq.com> Date: Sun, 29 Jun 2025 08:32:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=95=E5=85=A5prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/.prettierignore | 3 + web/.prettierrc.json | 8 ++ web/eslint.config.js | 71 ++++++++--------- web/index.html | 27 ++++--- web/package.json | 3 + web/pnpm-lock.yaml | 50 +++++++++++- web/src/App.vue | 20 ++--- web/src/assets/Icons/index.ts | 8 +- web/src/components/avatar.vue | 10 ++- web/src/components/markdown.vue | 12 +-- web/src/interfaces/index.ts | 10 +-- web/src/layouts/BasicLayout.vue | 22 ++++-- web/src/main.ts | 20 ++--- web/src/router/index.ts | 38 ++++----- web/src/services/base_service.ts | 44 ++++++----- web/src/services/chat_service.ts | 29 +++---- web/src/services/index.ts | 6 +- web/src/services/websocket.ts | 5 +- web/src/stores/asr_store.ts | 30 ++++--- web/src/stores/chat_store.ts | 132 +++++++++++++++++++------------ web/src/stores/user_store.ts | 4 +- web/src/style.css | 4 +- web/src/utils/context.ts | 14 ++-- web/src/utils/index.ts | 12 +-- web/src/utils/media.ts | 23 ++---- web/src/utils/pcm.ts | 14 ++-- web/src/utils/title.ts | 15 ++-- web/src/utils/url.ts | 14 ++-- web/src/views/CommunityView.vue | 115 ++++++++++++++++++--------- 29 files changed, 447 insertions(+), 316 deletions(-) create mode 100644 web/.prettierignore create mode 100644 web/.prettierrc.json diff --git a/web/.prettierignore b/web/.prettierignore new file mode 100644 index 0000000..53c6465 --- /dev/null +++ b/web/.prettierignore @@ -0,0 +1,3 @@ +# .prettierignore +auto-imports.d.ts +components.d.ts diff --git a/web/.prettierrc.json b/web/.prettierrc.json new file mode 100644 index 0000000..c4b2197 --- /dev/null +++ b/web/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/prettierrc", + "tabWidth": 2, + "singleQuote": false, + "printWidth": 80, + "trailingComma": "none", + "ignorePath": ".prettierignore" +} diff --git a/web/eslint.config.js b/web/eslint.config.js index 9e5e7f3..6eca3f6 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -1,39 +1,36 @@ -import antfu from "@antfu/eslint-config" +import antfu from "@antfu/eslint-config"; -export default antfu( - { - formatters: { - /** - * Format CSS, LESS, SCSS files, also the `