.prettierrc.js 699 B

12345678910111213141516171819202122
  1. module.exports = {
  2. //单行长度
  3. printWidth: 100,
  4. //在对象前后添加空格-eg: { foo: bar }
  5. bracketSpacing: true,
  6. //使用单引号
  7. singleQuote: true,
  8. // avoid 能省略括号的时候就省略 例如x => x
  9. arrowParens: 'avoid',
  10. //多行时尽可能打印尾随逗号
  11. trailingComma: 'all',
  12. //句末使用分号
  13. semi: true,
  14. //不对vue中的script及style标签缩进
  15. vueIndentScriptAndStyle: true,
  16. // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
  17. proseWrap: 'never',
  18. //对HTML全局空白不敏感
  19. htmlWhitespaceSensitivity: 'strict',
  20. //结束行形式
  21. endOfLine: 'auto'
  22. };