0.0.1 • Published 4 years ago
@chaos-kit/format-prettier v0.0.1
@chaos-kit/format-prettier
Usage
install:
// use yarn for example
yarn add -D @chaos-kit/format-prettierconfig:
// in package.json
{
// ...
"prettier": "@chaos-kit/format-prettier"
}Rule Default
printWidth: 80: 单行字符数量上限为80tabWidth: 4: 字符缩进4个字符useTabs: false: 使用空格代替tab缩进semi: true: 尾分号跟随singleQuote: true: 强制单引号quoteProps: consistent: 只要有一个属性需要引号, 则所有属性增加引号jsxSingleQuote: true: jsx保持单引号trailingComma: all: 尾逗号总是跟随bracketSpacing: true: 对象的括号总是带空格jsxBracketSameLine: false: jsx的最后一行总是另起一行arrowParens: always: 箭头函数的参数括号总是存在endOfLine: lf: 行尾的换行符格式
Rule should Provide
parser: 提供格式化的解析器, 选项在此
0.0.1
4 years ago