https://github.com/sajmoni/prettier-config-one
My recommended prettier config
https://github.com/sajmoni/prettier-config-one
prettier prettier-config
Last synced: 7 months ago
JSON representation
My recommended prettier config
- Host: GitHub
- URL: https://github.com/sajmoni/prettier-config-one
- Owner: sajmoni
- License: mit
- Created: 2021-05-06T08:42:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T10:41:29.000Z (over 1 year ago)
- Last Synced: 2024-08-10T09:14:33.994Z (about 1 year ago)
- Topics: prettier, prettier-config
- Language: JavaScript
- Homepage:
- Size: 688 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prettier-config-one
> My recommended prettier config
## Options
```yml
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---
```yml
singleQuote: true
```_Why?_
- Slightly less visual clutter
- Doesn't require pressing "shift"
- It's in the [Google style guide](https://google.github.io/styleguide/jsguide.html#features-strings-use-single-quotes)---
```yml
jsxSingleQuote: true
```_Why?_
- Consistent with `singleQuote`
---
```yml
singleAttributePerLine: true
```_Why?_
- Better git diff. Adding or removing props won't affect unrelated ones
- More consistent to always have props on new lines---
```yml
experimentalTernaries: true
```_Why?_
- Supposedly better readability
---
## How to use
### Automatic setup (recommended)
Use [setup-prettier](https://github.com/sajmoni/setup-prettier) to automatically add `prettier` and this config
```console
npx setup-prettier@latest
```### Manual install
```console
npm install --save-dev prettier-config-one
```In your package.json or prettier config:
```json
"prettier": "prettier-config-one"
```