chore: 基础 prettier
This commit is contained in:
21
prettier.config.js
Normal file
21
prettier.config.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/** 配置项文档:https://prettier.io/docs/en/configuration.html */
|
||||
module.exports = {
|
||||
/** 每一行的宽度 */
|
||||
printWidth: 120,
|
||||
/** tab 健的空格数 */
|
||||
tabWidth: 2,
|
||||
/** 在对象中的括号之间用空格来间隔 */
|
||||
bracketSpacing: true,
|
||||
/** 箭头函数的参数无论有几个,都要括号包裹 */
|
||||
arrowParens: 'always',
|
||||
/** 换行符的使用 */
|
||||
endOfLine: 'auto',
|
||||
/** 采用单引号 */
|
||||
singleQuote: true,
|
||||
/** 对象或者数组的最后一个元素后面是否要加逗号 */
|
||||
trailingComma: 'all',
|
||||
/** 不加分号 */
|
||||
semi: false,
|
||||
/** 不使用 tab 格式化 */
|
||||
useTabs: false,
|
||||
}
|
||||
Reference in New Issue
Block a user