-
Notifications
You must be signed in to change notification settings - Fork 0
/
.prettierrc.yaml
26 lines (25 loc) · 1.42 KB
/
.prettierrc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 使用yaml文件的好处就是 各种项目不会遇到以下一些错误
# Instead change the require of .prettierrc.js in /.vscode/extensions/esbenp.prettier-vscode-10.1.0/node_modules/prettier/third-party.js to a dynamic import() which is available in all CommonJS modules.
# .prettierrc.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead rename .prettierrc.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead)
printWidth: 100
tabWidth: 2
useTabs: false # 默认
semi: false
singleQuote: true
quoteProps: "as-needed" # [默认]
jsxSingleQuote: false # [默认]
trailingComma: "es5" # [默认]
bracketSpacing: true # [默认]
bracketSameLine: false # [默认]
arrowParens: "always" # [默认]
# range 包含 rangeStart和rangeEnd
# parser
# filepath
# requirePragma
# insertPragma
# proseWrap
htmlWhitespaceSensitivity: "css" # [默认]html中空格敏感度
vueIndentScriptAndStyle: false # [默认]
endOfLine: "auto" # 默认是lf 一般是unix系统;考虑日常windows和unix共同开发项目,auto是不是更通用一些?有待观察
# embeddedLanguageFormatting
singleAttributePerLine: true