🛠️
Dev
Tools
首页
›
.prettierrc生成
.prettierrc 生成器
生成 Prettier 代码格式化配置文件,实时预览格式化效果。
🔧 默认配置
📐 Standard
📦 紧凑
📖 宽松
📝 格式化选项
打印宽度 (printWidth)
缩进大小 (tabWidth)
使用 Tab (useTabs)
false - 使用空格
true - 使用 Tab
分号 (semi)
true - 末尾加分号
false - 不加分号
单引号 (singleQuote)
true - 单引号
false - 双引号
对象引号 (quoteProps)
as-needed
consistent
preserve
JSX 引号 (jsxSingleQuote)
false - 双引号
true - 单引号
尾逗号 (trailingComma)
all - 全部
es5 - ES5兼容
none - 无
花括号空格 (bracketSpacing)
true - 有空格
false - 无空格
多行 HTML > 位置 (bracketSameLine)
false - 换行
true - 同行
箭头函数括号 (arrowParens)
always - 总是
avoid - 避免
换行符 (endOfLine)
lf - Linux/Mac
crlf - Windows
cr
auto - 自动
单属性换行 (singleAttributePerLine)
false
true
👁️ 实时预览
📄 生成结果
📋 复制