prettier-config-jaz

0.1.2 • Public • Published

prettier-config-jaz

Usage

Install

pnpm add -D prettier prettier-config-jaz

Edit package.json

{
  "prettier": "prettier-config-jaz"
}

Preview

Name Value Description
printWidth 90 每行最多 多少个字符换行
tabWidth 2 tab 缩进大小
useTabs false 使用 tab 缩进
semi false 使用分号
singleQuote true 使用单引号
jsxSingleQuote true JSX 使用单引号
quoteProps "as-needed" 更改对象中的属性被引号包含的时机
as-needed:仅在需要时在对象属性周围添加引号
consistent:如果对象中至少有一个属性需要引号,则引用所有属性
...
trailingComma "all" 尾随逗号
bracketSpacing true 对象的间距
true - Example: { foo: bar }
false - Example: {foo: bar}
bracketSameLine false 多行HTML时,> 放在最后一行的末尾,而不是单独放在下一行
true - Example:
<button
onClick={ this.handleClick }>
Click Here

false - Example:
<button
onClick={ this.handleClick }
>
Click Here

arrowParens "avoid" 箭头函数只有一个参数时两边加上括号
"always" - Example: (x) => x
"avoid"   - Example:   x => x
endOfLine "lf" 换行符类型

Readme

Keywords

Package Sidebar

Install

npm i prettier-config-jaz

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

6.99 kB

Total Files

5

Last publish

Collaborators

  • jaz-w