@peker/prettier-config

1.1.1 • Public • Published

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"

Readme

Keywords

none

Package Sidebar

Install

npm i @peker/prettier-config

Weekly Downloads

1

Version

1.1.1

License

ISC

Unpacked Size

2.32 kB

Total Files

3

Last publish

Collaborators

  • marcosilva