chore(styles): 为项目添加开发依赖
- 添加Prettier、ESLint用于规范代码风格 - 添加Prettier配置文件
This commit is contained in:
30
prettier.config.mjs
Normal file
30
prettier.config.mjs
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @see https://prettier.io/docs/en/configuration.html
|
||||
* @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,
|
||||
}
|
||||
Reference in New Issue
Block a user