-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprettier.config.js
27 lines (26 loc) · 1.42 KB
/
prettier.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* @Date: 2020-06-11 12:57:10
* @LastEditors: Huang canfeng
* @LastEditTime: 2020-06-14 02:16:34
* @Description:
*/
module.exports = {
printWidth: 110, // 超过最大值换行
tabWidth: 2, // 缩进字节数
useTabs: true, // 缩进不使用tab,使用空格
semi: true, // 句尾添加分号
singleQuote: false, // 使用单引号代替双引号
proseWrap: "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
bracketSpacing: true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
endOfLine: "auto", // 结尾是 \n \r \n\r auto
eslintIntegration: false, //不让prettier使用eslint的代码格式进行校验
htmlWhitespaceSensitivity: "ignore",
ignorePath: ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
jsxBracketSameLine: false, // 在jsx中把'>' 是否单独放一行
jsxSingleQuote: false, // 在jsx中使用单引号代替双引号
parser: "typescript", // 格式化的解析器,默认是babylon
requireConfig: false, // Require a 'prettierconfig' to format prettier
stylelintIntegration: false, //不让prettier使用stylelint的代码格式进行校验
trailingComma: "es5", // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
tslintIntegration: false, // 不让prettier使用tslint的代码格式进行校验
};