@bit-ocean/prettier-config
Version:
Universal Prettier configuration.
59 lines (40 loc) • 1.06 kB
Markdown
# @bit-ocean/prettier-config

> Universal Prettier configuration.
We use [`Prettier`](https://prettier.io/) for code formatting. This package provides a universal configuration for all our projects.
## Installation
```bash
pnpm add -D prettier @bit-ocean/prettier-config
```
## Configuration
Create a `.prettierrc` file in the root of your project and add the following:
```json
"@bit-ocean/prettier-config"
```
Use Astro:
```json
"@bit-ocean/prettier-config/astro"
```
Or add the following prettier property to your `package.json`:
```json
{
"prettier": "@bit-ocean/prettier-config"
}
```
Use Astro:
```json
{
"prettier": "@bit-ocean/prettier-config/astro"
}
```
Add the `prettier` scripts to your `package.json`:
```json
{
"scripts": {
"prettier:check": "prettier --check --cache --ignore-unknown .",
"prettier:fix": "prettier --write --cache --ignore-unknown ."
}
}
```
## License
[MIT](/LICENSE) License © 2024 Bit Ocean