.prettierrc.js 584 B

1234567891011121314151617181920
  1. module.exports = {
  2. singleQuote: true, // 使用单引号代替双引号
  3. printWidth: 200, // 超过最大值换行
  4. semi: false, // 结尾不用分号
  5. useTabs: true, // 缩进使用tab, 不使用空格
  6. tabWidth: 4, // tab 样式宽度
  7. bracketSpacing: true, // 对象数组, 文字间加空格 {a: 1} => { a: 1 }
  8. arrowParens: "avoid", // 如果可以, 自动去除括号 (x) => x 变为 x => x
  9. proseWrap: "preserve",
  10. htmlWhitespaceSensitivity: "ignore",
  11. trailingComma: "all",
  12. overrides: [
  13. {
  14. files: '*.scss',
  15. options: {
  16. parser: 'scss',
  17. },
  18. },
  19. ],
  20. };