.prettierrc.js 433 B

12345678910
  1. module.exports = {
  2. printWidth: 220,
  3. singleQuote: true, // 使用单引号而不是双引号
  4. semi: true, // 句尾是否加;
  5. proseWrap: 'preserve',
  6. tabWidth: 4,
  7. trailingComma: 'es5', // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
  8. bracketSpacing: true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
  9. htmlWhitespaceSensitivity: 'ignore', // > 不乱换行
  10. };