.prettierrc.cjs 783 B

123456789101112131415161718192021
  1. module.exports = {
  2. // 一行的字符数,如果超过会进行换行,默认为80
  3. printWidth: 80,
  4. // 一个tab代表几个空格数,默认为80
  5. tabWidth: 4,
  6. // 是否使用tab进行缩进,默认为false,表示用空格进行缩减
  7. useTabs: false,
  8. // 字符串是否使用单引号,默认为false,使用双引号
  9. singleQuote: true,
  10. // 行位是否使用分号,默认为true
  11. semi: false,
  12. // 是否使用尾逗号,有三个可选值"<none|es5|all>"
  13. trailingComma: "none",
  14. // 对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
  15. bracketSpacing: true,
  16. // 代码的解析引擎,默认为babylon,与babel相同
  17. // "parser": "babylon",
  18. arrowParens: 'avoid',
  19. // 开启 eslint 支持
  20. eslintIntegration: true
  21. }