chore: prettier配置
This commit is contained in:
33
.prettierrc.js
Normal file
33
.prettierrc.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/** @type {import('prettier').Config} */
|
||||
module.exports = {
|
||||
// 打印宽度
|
||||
printWidth: 100,
|
||||
// 使用 4 空格缩进
|
||||
tabWidth: 4,
|
||||
// 使用 4 空格缩进,不使用制表符
|
||||
useTabs: true,
|
||||
// 行尾使用 LF (Unix 风格)
|
||||
endOfLine: 'lf',
|
||||
// 语句末尾使用分号
|
||||
semi: false,
|
||||
// 使用单引号
|
||||
singleQuote: false,
|
||||
// 对象和数组末尾不添加尾随逗号
|
||||
trailingComma: 'none',
|
||||
// JSX 引号使用单引号
|
||||
jsxSingleQuote: false,
|
||||
// 括号内侧空格
|
||||
bracketSpacing: true,
|
||||
// JSX 标签不换行
|
||||
bracketSameLine: false,
|
||||
// 箭头函数参数始终使用括号
|
||||
arrowParens: 'always',
|
||||
// HTML、Vue、Angular 和 Markdown 使用 LF
|
||||
htmlWhitespaceSensitivity: 'css',
|
||||
// Vue 文件脚本和样式缩进
|
||||
vueIndentScriptAndStyle: false,
|
||||
// 行注释位置在注释上方,不加空格
|
||||
proseWrap: 'preserve',
|
||||
// 根据文件类型自动推断
|
||||
embeddedLanguageFormatting: 'auto',
|
||||
};
|
||||
Reference in New Issue
Block a user