0.2.1 • Published 3 months ago

prettier-config-one v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

prettier-config-one

My recommended prettier config

Options

semi: false

Why?

  • Less visual clutter
  • Easier to move code around
  • Semicolons are not needed 99%+ of the time, and Prettier can insert them when they are

singleQuote: true

Why?

  • Slightly less visual clutter
  • Doesn't require pressing "shift"
  • It's in the Google style guide

jsxSingleQuote: true

Why?

  • Consistent with singleQuote

singleAttributePerLine: true

Why?

  • Better git diff. Adding or removing props won't affect unrelated ones
  • More consistent to always have props on new lines

experimentalTernaries: true

Why?

  • Supposedly better readability

How to use - automatic setup

recommended

Use setup-prettier to automatically add prettier and this config

npx setup-prettier@latest

How to use - manual install

npm install --save-dev prettier-config-one

In your package.json or prettier config:

  "prettier": "prettier-config-one"
0.2.1

3 months ago

0.2.0

10 months ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago