diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..adbcd12 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,12 @@ +module.exports = { + singleQuote: true, // 使用单引号 + semi: true, // 使用分号 + trailingComma: 'es5', // 在对象或数组的最后一个元素后添加逗号 + printWidth: 100, // 每行的最大字符数 + tabWidth: 4, // 缩进宽度 + useTabs: true, // 使用制表符缩进 + jsxSingleQuote: false, // JSX 中使用单引号 + bracketSpacing: true, // 对象字面量的括号是否换行 + jsxBracketSameLine: false, // JSX 的闭合括号是否在同一行 + endOfLine: 'auto', // 自动处理换行符 +};