@peker/prettier-config
v1.1.1
Published
Peker's prettier config for Javascript Projects
Downloads
6
Readme
prettier-config
Peker's prettier config for Javascript Projects
Installation
npm install prettier @peker/prettier-config --save-dev
Usage
In your package.json
:
{
"name": "my-library",
"version": "1.0.0",
"prettier": "@peker/prettier-config"
}
If you don't want to use your package.json
, you can create a .prettierrc.json
file in your projects root directory.
"@peker/prettier-config"
If you would like to extend or modify these properties, create a .prettierrc.js
file in your projects root directory and export your desired modifications.
module.exports = {
...require('@peker/prettier-config'),
printWidth: 120
};
Properties
Use Airbnb as base
Base
Imports airbnb.
...require("prettier-airbnb-config")
Overwrite the following props
Max Line width
Set max line width to 100 characters
"printWidth": 80
Tab width
Set tab width to use 2 spaces
"tabWidth": 2
Semicolons
Print semicolon at the end of statements
"semi": true
Quotes
Use single quotes instead of double quotes.
"singleQuote": true
trailingComma
Add a trailing comma at the end of all comma-separated syntactic structures
"trailingComma": "all"
bracketSpacing
Add spaces between content and brackets in object literals
"bracketSpacing": "all"