.prettierrc 478 B

123456789
  1. module.exports = {
  2. printWidth: 120, // 超过最大值换行
  3. semi: false, // 结尾使用分号
  4. singleQuote: true, // 使用单引号
  5. tabWidth: 2, // 缩进字节数
  6. trailingComma: 'es5', // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
  7. arrowParens: 'avoid', // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
  8. endOfLine: 'auto', // 结尾换行 (\n|\r|\n\r) : 'lf' | 'crlf' | 'auto'
  9. }