chore(styles): 添加代码格式化依赖 #12

Manually merged
remilia merged 8 commits from style/prettier into master 2025-09-17 16:58:30 +08:00
3 changed files with 58 additions and 5 deletions
Showing only changes of commit e94dbf29a3 - Show all commits

View File

@ -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,
}
// 打印宽度
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 },
},
],
};