chore(styles): 调整格式化配置文件
- 调整prettier.config.mjs,强制css文件与scss文件使用双引号
This commit is contained in:
@ -3,28 +3,40 @@
|
|||||||
* @type {import("prettier").Config}
|
* @type {import("prettier").Config}
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
// 打印宽度
|
// 打印宽度
|
||||||
"printWidth": 80,
|
printWidth: 80,
|
||||||
// 缩进空格数
|
// 缩进空格数
|
||||||
"tabWidth": 2,
|
tabWidth: 2,
|
||||||
// 使用制表符而不是空格缩进
|
// 使用制表符而不是空格缩进
|
||||||
"useTabs": false,
|
useTabs: false,
|
||||||
// 句尾添加分号
|
// 句尾添加分号
|
||||||
"semi": true,
|
semi: true,
|
||||||
// 使用单引号
|
// 使用单引号
|
||||||
"singleQuote": true,
|
singleQuote: true,
|
||||||
// 尾随逗号
|
// 尾随逗号
|
||||||
"trailingComma": "es5",
|
trailingComma: "es5",
|
||||||
// 对象大括号内的空格
|
// 对象大括号内的空格
|
||||||
"bracketSpacing": true,
|
bracketSpacing: true,
|
||||||
// 箭头函数参数括号
|
// 箭头函数参数括号
|
||||||
"arrowParens": "always",
|
arrowParens: "always",
|
||||||
// 括号行位置
|
// 括号行位置
|
||||||
"bracketSameLine": true,
|
bracketSameLine: true,
|
||||||
// 换行符使用 lf
|
// 换行符使用 lf
|
||||||
"endOfLine": "lf",
|
endOfLine: "lf",
|
||||||
// HTML 空格敏感度
|
// HTML 空格敏感度
|
||||||
"htmlWhitespaceSensitivity": "css",
|
htmlWhitespaceSensitivity: "css",
|
||||||
// Vue 文件脚本和样式缩进
|
// Vue 文件脚本和样式缩进
|
||||||
"vueIndentScriptAndStyle": true,
|
vueIndentScriptAndStyle: true,
|
||||||
}
|
overrides: [
|
||||||
|
{
|
||||||
|
// 对 CSS 文件使用双引号
|
||||||
|
files: "*.css",
|
||||||
|
options: { singleQuote: false },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// 对 SCSS 文件使用双引号
|
||||||
|
files: "*.scss",
|
||||||
|
options: { singleQuote: false },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user