Files
fengjie-datascreen/.prettierrc.cjs
2024-12-12 10:30:11 +08:00

34 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
module.exports = {
// 一行最多 100 字符
printWidth: 100,
// tab 健的空格数
tabWidth: 2,
// 不使用 tab 格式化
useTabs: false,
// 不加分号
semi: false,
jsxSingleQuote: true,
// vue script和style标签中是否缩进,开启可能会破坏编辑器的代码折叠
vueIndentScriptAndStyle: true,
// 单引号
singleQuote: true,
//object对象中key值是否加引号
quoteProps: 'as-needed',
//object对象里面的key和value值和括号间的空格
bracketSpacing: true,
//尾部逗号设置es5是尾部逗号兼容es5none就是没有尾部逗号all是指所有可能的情况需要node8和es2017以上的环境
trailingComma: 'none',
//箭头函数单个参数的情况是否省略括号默认always是总是带括号avoid是单个参数不带括号
arrowParens: 'always',
//自当插入pragma到已经完成的format的文件开头
insertPragma: false,
//格式化有特定开头编译指示的文件 比如下面两种
requirePragma: false,
//文章换行,默认情况下会对你的markdown文件换行进行format会控制在printwidth以内
proseWrap: 'never',
// html中的空格敏感性
htmlWhitespaceSensitivity: 'strict',
//行尾换行符,默认是lf
endOfLine: 'auto'
}