12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /**
- * prettier.config.js
- * @ref https://prettier.io/
- */
- 'use strict';
- module.exports = {
- // 单行长度
- printWidth: 120,
- // 缩进长度
- tabWidth: 4,
- // 是否使用制表符
- useTabs: false,
- // 单引号
- singleQuote: true,
- // 分号
- semi: true,
- // 对象包裹空格
- // { foo: bar }
- bracketSpacing: true,
- // 箭头函数参数括号
- arrowParens: 'always',
- // 尾随逗号
- trailingComma: 'none',
- // HTML 空格敏感
- // css:遵守 css 中 display 属性
- htmlWhitespaceSensitivity: 'css',
- // vue 中 script 和 style 内第一层不缩进
- vueIndentScriptAndStyle: false,
- // 末尾行换行格式
- endOfLine: 'lf'
- };
|