wangrong
2026-08-30 761e5c5fa871959f60e15c971c8d83f2b53d0af5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// prettier的默认配置文件
module.exports = {
    // 一行最多 100 字符
    printWidth: 100,
    // 使用 2 个空格缩进
    tabWidth: 2,
    // 不使用缩进符,而使用空格
    useTabs: false,
    // 不尾随分号
    semi: false,
    // 使用单引号
    singleQuote: true,
    // 多行逗号分割的语法中,最后一行不加逗号
    trailingComma: 'none',
     // 单个参数的箭头函数不加括号 x => x
    arrowParens: 'avoid',     
    // 对象大括号内两边是否加空格 { a:0 }
    bracketSpacing: true,      
  }