# 配置(prettier)

前言

了解 vue 项目创建过程以及其目录结构,在开发中需要注意的地方,能够更好地规范前端开发

# 1..prettierrc.json

{
  "$schema": "https://json.schemastore.org/prettierrc",
  "tabWidth": 4,
  "singleQuote": true,
  "printWidth": 120,
  "trailingComma": "none"
}
1
2
3
4
5
6
7

# 2..prettierrc.json

{
    "printWidth": 120,
    "tabWidth": 4,
    "useTabs": false,
    "semi": true,
    "singleQuote": false,
    "quoteProps": "as-needed",
    "jsxSingleQuote": true,
    "trailingComma": "es5",
    "bracketSpacing": true,
    "bracketSameLine": false,
    "arrowParens": "always",
    "proseWrap": "preserve",
    "htmlWhitespaceSensitivity": "css",
    "vueIndentScriptAndStyle": false,
    "endOfLine": "lf",
    "embeddedLanguageFormatting": "auto",
    "singleAttributePerLine": false
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19