https://github.com/will-stone/prettier-config
https://github.com/will-stone/prettier-config
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/will-stone/prettier-config
- Owner: will-stone
- Created: 2023-10-08T15:39:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T12:20:07.000Z (about 2 years ago)
- Last Synced: 2024-05-02T06:00:38.319Z (about 2 years ago)
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Prettier Config
My personal [Prettier](https://prettier.io) config.
## Usage
### Install
```bash
pnpm add -D prettier @will-stone/prettier-config
```
### Use config
```js
// prettier.config.js (or .mjs if in CJS env)
export { default } from '@will-stone/prettier-config'
```
### Lint Staged
If you would like to apply formatting before every commit, you can add the
following to your `package.json`:
```json
{
"lint-staged": {
"*.{css,json,md}": ["prettier --write"]
}
}
```
and then
```bash
pnpm add -D husky lint-staged
pnpm husky init
echo "lint-staged" > .husky/pre-commit
```