UNPKG

@tianyio/quality-helper

Version:

A comprehensive quality helper tool for project scaffolding and management

67 lines (66 loc) 1.47 kB
/** * @see https://prettier.io/docs/configuration.html * @type {import("prettier").Config} */ export default { // 每行最大字符数 printWidth: 100, // 使用空格而不是制表符 useTabs: false, // 制表符宽度 tabWidth: 2, // 使用单引号 singleQuote: true, // 对象属性引号策略 quoteProps: 'as-needed', // 大括号内空格 bracketSpacing: true, // 行尾字符 endOfLine: 'lf', // 不使用分号 semi: false, // 多行元素的 > 放在最后一行的末尾 bracketSameLine: false, // JSX 中使用单引号 jsxSingleQuote: true, // 箭头函数参数括号 arrowParens: 'avoid', // 尾随逗号 trailingComma: 'es5', // 嵌入式语言格式化 embeddedLanguageFormatting: 'auto', // 不插入 @format pragma insertPragma: false, // 每个属性单独一行 singleAttributePerLine: false, // HTML 空白敏感性 htmlWhitespaceSensitivity: 'css', // Vue 文件中缩进 script 和 style 标签 vueIndentScriptAndStyle: false, // 散文换行 proseWrap: 'preserve', // 插件配置 plugins: [], // 覆盖特定文件的配置 overrides: [ { files: '*.md', options: { printWidth: 80, proseWrap: 'always', }, }, { files: ['*.json', '*.jsonc'], options: { trailingComma: 'none', }, }, { files: '*.vue', options: { vueIndentScriptAndStyle: true, }, }, ], }