.prettierrc.js 727 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * prettier.config.js
  3. * @ref https://prettier.io/
  4. */
  5. 'use strict';
  6. module.exports = {
  7. // 单行长度
  8. printWidth: 120,
  9. // 缩进长度
  10. tabWidth: 4,
  11. // 是否使用制表符
  12. useTabs: false,
  13. // 单引号
  14. singleQuote: true,
  15. // 分号
  16. semi: true,
  17. // 对象包裹空格
  18. // { foo: bar }
  19. bracketSpacing: true,
  20. // 箭头函数参数括号
  21. arrowParens: 'always',
  22. // 尾随逗号
  23. trailingComma: 'none',
  24. // HTML 空格敏感
  25. // css:遵守 css 中 display 属性
  26. htmlWhitespaceSensitivity: 'css',
  27. // vue 中 script 和 style 内第一层不缩进
  28. vueIndentScriptAndStyle: false,
  29. // 末尾行换行格式
  30. endOfLine: 'lf'
  31. };