From e94dbf29a3f5e472f7f0d15151c978e27818b5ed Mon Sep 17 00:00:00 2001 From: R2m1liA <15258427350@163.com> Date: Wed, 17 Sep 2025 15:23:44 +0800 Subject: [PATCH] =?UTF-8?q?chore(styles):=20=E8=B0=83=E6=95=B4=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整prettier.config.mjs,强制css文件与scss文件使用双引号 --- prettier.config.mjs | 62 +++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/prettier.config.mjs b/prettier.config.mjs index 1ecb88d..f52b8fe 100644 --- a/prettier.config.mjs +++ b/prettier.config.mjs @@ -3,28 +3,40 @@ * @type {import("prettier").Config} */ export default { - // 打印宽度 - "printWidth": 80, - // 缩进空格数 - "tabWidth": 2, - // 使用制表符而不是空格缩进 - "useTabs": false, - // 句尾添加分号 - "semi": true, - // 使用单引号 - "singleQuote": true, - // 尾随逗号 - "trailingComma": "es5", - // 对象大括号内的空格 - "bracketSpacing": true, - // 箭头函数参数括号 - "arrowParens": "always", - // 括号行位置 - "bracketSameLine": true, - // 换行符使用 lf - "endOfLine": "lf", - // HTML 空格敏感度 - "htmlWhitespaceSensitivity": "css", - // Vue 文件脚本和样式缩进 - "vueIndentScriptAndStyle": true, -} \ No newline at end of file + // 打印宽度 + printWidth: 80, + // 缩进空格数 + tabWidth: 2, + // 使用制表符而不是空格缩进 + useTabs: false, + // 句尾添加分号 + semi: true, + // 使用单引号 + singleQuote: true, + // 尾随逗号 + trailingComma: "es5", + // 对象大括号内的空格 + bracketSpacing: true, + // 箭头函数参数括号 + arrowParens: "always", + // 括号行位置 + bracketSameLine: true, + // 换行符使用 lf + endOfLine: "lf", + // HTML 空格敏感度 + htmlWhitespaceSensitivity: "css", + // Vue 文件脚本和样式缩进 + vueIndentScriptAndStyle: true, + overrides: [ + { + // 对 CSS 文件使用双引号 + files: "*.css", + options: { singleQuote: false }, + }, + { + // 对 SCSS 文件使用双引号 + files: "*.scss", + options: { singleQuote: false }, + }, + ], +};