prettier-config-one
v0.2.1
Published
My recommended prettier config
Readme
prettier-config-one
My recommended prettier config
Options
semi: falseWhy?
- 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: trueWhy?
- Slightly less visual clutter
- Doesn't require pressing "shift"
- It's in the Google style guide
jsxSingleQuote: trueWhy?
- Consistent with
singleQuote
singleAttributePerLine: trueWhy?
- Better git diff. Adding or removing props won't affect unrelated ones
- More consistent to always have props on new lines
experimentalTernaries: trueWhy?
- Supposedly better readability
How to use - automatic setup
recommended
Use setup-prettier to automatically add prettier and this config
npx setup-prettier@latestHow to use - manual install
npm install --save-dev prettier-config-oneIn your package.json or prettier config:
"prettier": "prettier-config-one"