1.0.0 • Published 3 years ago

prettier-config-airbnb v1.0.0

Weekly downloads
26
License
MIT
Repository
github
Last release
3 years ago

prettier-config-airbnb

A Prettier configuration based on the Airbnb JavaScript style guide

Installation

npm install prettier-config-airbnb --save-dev

or

yarn add prettier-config-airbnb --dev

Usage

Create a .prettierrc.json file in your project root directory with a value:

"prettier-config-airbnb"

If you need to overwrite some properties, create a .prettierrc.js file in your project root directory, import the configuration and export the modifications:

module.exports = {
  ...require('prettier-config-airbnb'),
  printWidth: 120,
};

Properties

printWidth

100 (reference)

tabWidth

2 (reference)

useTabs

false (reference)

semi

true (reference)

singleQuote

true (reference)

quoteProps

"as-needed" (reference)

jsxSingleQuote

false (reference)

trailingComma

"all" (reference)

bracketSpacing

true (reference)

jsxBracketSameLine

false (reference)

arrowParens

"always" (reference)