@lokiverse/prettier-config-experimental
v0.0.0
Published
Prettier configuration
Downloads
82
Readme
Prettier configuration with minimal rules.
Installation
pnpm add -D @lokicoule/prettier-config
Usage
Update package.json
:
{
"prettier": "@lokicoule/prettier-config"
}
Configuration
{
// Use official Prettier schema for validation
"$schema": "https://json.schemastore.org/prettierrc",
// Line length before wrapping
// Default: 80
"printWidth": 100,
// Use single quotes instead of double quotes
// true => const x = 'test'
// false => const x = "test"
"singleQuote": true,
// If you quote a property, quote all properties
// "as-needed" => { foo: "bar", "quotedFoo": "bar" }
// "consistent" => { "foo": "bar", "quotedFoo": "bar" }
// "preserve" => { foo: "bar", "quotedFoo": "bar" }
"quoteProps": "consistent",
// Put each HTML attribute on a new line
// true:
// <button
// class="btn"
// onClick={click}>
// Button
// </button>
"singleAttributePerLine": true,
// Control whitespace sensitivity in HTML
// "css" => Respect CSS display property
// "strict" => Whitespace is considered significant
// "ignore" => Whitespace is considered insignificant
"htmlWhitespaceSensitivity": "ignore"
}