From 0fd74864f5b31a18f3c0ad3e25e113cc14d4783f Mon Sep 17 00:00:00 2001 From: zengzhiyao <2876920450@qq.com> Date: Tue, 16 Sep 2025 11:05:22 +0800 Subject: [PATCH] =?UTF-8?q?chore(snowy-admin-web):=20=E4=B8=BA=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=96=B0=E5=A2=9E=E7=BB=9F=E4=B8=80=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96prettier=EF=BC=8C=E5=8E=9F=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E4=B8=8D=E4=BC=9A=E8=87=AA=E5=8A=A8=E7=94=9F?= =?UTF-8?q?=E6=95=88=E9=9C=80=E8=A6=81=E9=85=8D=E7=BD=AE=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=EF=BC=8C=E7=8E=B0=E4=BA=8E.vscode=E6=96=B0=E5=A2=9Epreiiier?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E3=80=82=E6=9B=B4=E6=96=B0=20.gitignore=20?= =?UTF-8?q?=E5=B9=B6=E7=A7=BB=E9=99=A4=20Prettier=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 .gitignore 文件,将 .vscode 目录改为注释 - 删除 prettier.config.js 文件,移除 Prettier 格式化配置 --- snowy-admin-web/.gitignore | 2 +- snowy-admin-web/.prettierrc.json | 17 ++++++++++++ snowy-admin-web/.vscode/settings.json | 5 ++++ snowy-admin-web/prettier.config.js | 40 --------------------------- 4 files changed, 23 insertions(+), 41 deletions(-) create mode 100644 snowy-admin-web/.prettierrc.json create mode 100644 snowy-admin-web/.vscode/settings.json delete mode 100644 snowy-admin-web/prettier.config.js diff --git a/snowy-admin-web/.gitignore b/snowy-admin-web/.gitignore index f5ee3956..10bfe526 100644 --- a/snowy-admin-web/.gitignore +++ b/snowy-admin-web/.gitignore @@ -20,7 +20,7 @@ auto-imports.d.ts # Editor directories and files .idea -.vscode +# .vscode *.suo *.ntvs* *.njsproj diff --git a/snowy-admin-web/.prettierrc.json b/snowy-admin-web/.prettierrc.json new file mode 100644 index 00000000..008cf7f1 --- /dev/null +++ b/snowy-admin-web/.prettierrc.json @@ -0,0 +1,17 @@ +{ + "printWidth": 120, + "tabWidth": 2, + "useTabs": true, + "semi": false, + "singleQuote": true, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "jsxBracketSameLine": true, + "trailingComma": "none", + "bracketSpacing": true, + "arrowParens": "always", + "htmlWhitespaceSensitivity": "css", + "endOfLine": "lf", + "vueIndentScriptAndStyle": true, + "singleAttributePerLine": false +} \ No newline at end of file diff --git a/snowy-admin-web/.vscode/settings.json b/snowy-admin-web/.vscode/settings.json new file mode 100644 index 00000000..90e17e3e --- /dev/null +++ b/snowy-admin-web/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "prettier.configPath": ".prettierrc.json", // 指向根目录的配置文件 + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true +} diff --git a/snowy-admin-web/prettier.config.js b/snowy-admin-web/prettier.config.js deleted file mode 100644 index 3e2d12f2..00000000 --- a/snowy-admin-web/prettier.config.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright [2022] [https://www.xiaonuo.vip] - * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点: - * 1.请不要删除和修改根目录下的LICENSE文件。 - * 2.请不要删除和修改Snowy源码头部的版权声明。 - * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。 - * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip - * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。 - * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip - */ -module.exports = { - // 一行最多 180 字符 - printWidth: 120, - // 使用 2 个tab缩进 - tabWidth: 2, - // 使用tab符缩进,false为空格缩进 - useTabs: true, - // 行尾需要分号 - semi: false, - // 使用单引号 - singleQuote: true, - // 对象的 key 仅在必要时用引号 - quoteProps: 'as-needed', - // jsx 不使用单引号,而使用双引号 - jsxSingleQuote: false, - // 末尾不需要逗号 - trailingComma: 'none', - // 大括号内的首尾需要空格 - bracketSpacing: true, - // jsx 标签的反尖括号不需要换行 - jsxBracketSameLine: true, - // 箭头函数,只有一个参数的时候,也需要括号 - arrowParens: 'always', - // 根据显示样式决定 html 要不要折行 - htmlWhitespaceSensitivity: 'css', - // 换行符使用 lf - endOfLine: 'lf', - // 缩进js跟css - vueIndentScriptAndStyle: true -}