Files
vim-ale/prettier
2021-04-26 07:03:47 +00:00
..
2020-08-01 04:30:46 -04:00

title, homepage, tagline
title homepage tagline
Prettier https://prettier.io/ Prettier is an opinionated code formatter.

Updating prettier

npm install -g prettier@latest

Cheat Sheet

The core value of Prettier is not in what it gives, but in what it takes away: countless hours of bikeshedding over code style choices. Also, it makes git merges much nicer.

Prettify all web files in a project, recursively:

prettier --write '**/*{.md,.js,.html,.css}'

Tell Prettier which files to ignore every time

echo "dist/" >> .prettierignore

Tell Prettier which settings to use - do NOT use package.json when it's not necessary!

.prettierrc:

{
  "trailingComma": "none",
  "tabWidth": 2,
  "singleQuote": true,
  "proseWrap": "always"
}