From 9d05c0f4c62c16fb1893eb1d1ebfbece256087fd Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Wed, 13 Nov 2024 08:12:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20:recycle:=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=B0=83=E6=95=B4=E4=B8=BA=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc.yaml | 41 ++++++++++++++++++++ eslint.config.mjs | 13 ++++--- prettier.config.mjs | 8 ---- src/api/system/user.ts | 2 +- src/pages/work/user/index.vue | 70 +++++++++++++++++++---------------- 5 files changed, 87 insertions(+), 47 deletions(-) create mode 100644 .prettierrc.yaml delete mode 100644 prettier.config.mjs diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..d9cf0c7 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,41 @@ +# 在单参数箭头函数中始终添加括号 +arrowParens: "always" +# JSX 多行元素的闭合标签另起一行 +bracketSameLine: false +# 对象字面量中的括号之间添加空格 +bracketSpacing: true +# 自动格式化嵌入的代码(如 Markdown 和 HTML 内的代码) +embeddedLanguageFormatting: "auto" +# 忽略 HTML 空白敏感度,将空白视为非重要内容 +htmlWhitespaceSensitivity: "ignore" +# 不插入 @prettier 的 pragma 注释 +insertPragma: false +# 在 JSX 中使用双引号 +jsxSingleQuote: false +# 每行代码的最大长度限制为 100 字符 +printWidth: 100 +# 在 Markdown 中保留原有的换行格式 +proseWrap: "preserve" +# 仅在必要时添加对象属性的引号 +quoteProps: "as-needed" +# 不要求文件开头插入 @prettier 的 pragma 注释 +requirePragma: false +# 在语句末尾添加分号 +semi: true +# 使用双引号而不是单引号 +singleQuote: false +# 缩进使用 2 个空格 +tabWidth: 2 +# 在多行元素的末尾添加逗号(ES5 支持的对象、数组等) +trailingComma: "es5" +# 使用空格而不是制表符缩进 +useTabs: false +# Vue 文件中的