1
1
module . exports = {
2
- "printWidth" : 100 , // 指定代码长度,超出换行
3
- "tabWidth" : 2 , // tab 键的宽度
4
- "useTabs" : false , // 不使用tab
5
- "semi" : true , // 结尾加上分号
6
- "singleQuote" : false , // 使用单引号
7
- "quoteProps" : "preserve" , // 不要求对象字面量属性是否使用引号包裹
8
- "jsxSingleQuote" : false , // jsx 语法中使用单引号
9
- "trailingComma" : "es5" , // 确保对象的最后一个属性后有逗号
10
- "bracketSpacing" : true , // 大括号有空格 { name: 'rose' }
11
- "arrowParens" : "avoid" , // 箭头函数,单个参数不强制添加括号
12
- "requirePragma" : false , // 是否严格按照文件顶部的特殊注释格式化代码
13
- "insertPragma" : false , // 是否在格式化的文件顶部插入Pragma标记,以表明该文件被prettier格式化过了
14
- "proseWrap" : "preserve" , // 按照文件原样折行
15
- "htmlWhitespaceSensitivity" : "ignore" , // html文件的空格敏感度,控制空格是否影响布局
16
- "endOfLine" : "lf" // 结尾是 \n \r \n\r auto
17
- }
2
+ "printWidth" : 100 ,
3
+ "tabWidth" : 2 ,
4
+ "useTabs" : false ,
5
+ "semi" : true ,
6
+ "singleQuote" : false ,
7
+ "quoteProps" : "preserve" ,
8
+ "jsxSingleQuote" : false ,
9
+ "trailingComma" : "es5" ,
10
+ "bracketSpacing" : true ,
11
+ "arrowParens" : "avoid" ,
12
+ "requirePragma" : false ,
13
+ "insertPragma" : false ,
14
+ "proseWrap" : "preserve" ,
15
+ "htmlWhitespaceSensitivity" : "ignore" ,
16
+ "endOfLine" : "lf" ,
17
+ } ;
0 commit comments