Skip to content

Commit

Permalink
Rewrite README
Browse files Browse the repository at this point in the history
Run prettier on repo
  • Loading branch information
bokub committed Apr 1, 2021
1 parent 210a25c commit 31dccf2
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 40 deletions.
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
# @bokub / prettier-config

> My personal [Prettier](https://prettier.io) config.
[![Code style][style-src]][style-href]
[![Downloads][downloads-src]][downloads-href]

## Usage
> My personal [Prettier](https://prettier.io) config / workflow
**Install**:
#### Install

```bash
# Just the config
npm i -D @bokub/prettier-config

# Whole package
npm i -D prettier pretty-quick husky @bokub/prettier-config
npm i -D prettier @bokub/prettier-config
```

**Add the following to your `package.json`**:
#### Add the following to your `package.json`:

```jsonc
```json
{
"scripts": {
"pretty-quick": "pretty-quick"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"prettier": "@bokub/prettier-config"
"prettier": "@bokub/prettier-config"
}
```

#### _Optional:_ Setup pre-commit hook

```bash
npx husky-init
npm i -D pretty-quick
npx husky set .husky/pre-commit 'pretty-quick --staged'
```

#### _Optional:_ Run prettier on old code

```bash
npx prettier --write .
```

[style-src]: https://flat.badgen.net/badge/code%20style/prettier/ff69b4
[style-href]: https://github.com/prettier/prettier
[downloads-src]: https://flat.badgen.net/npm/dt/@bokub/prettier-config
[downloads-href]: https://www.npmjs.com/package/@bokub/prettier-config
8 changes: 4 additions & 4 deletions index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"singleQuote": true,
"tabWidth": 2,
"printWidth": 120,
"vueIndentScriptAndStyle": true
"singleQuote": true,
"tabWidth": 2,
"printWidth": 120,
"vueIndentScriptAndStyle": true
}
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "@bokub/prettier-config",
"version": "2.0.0",
"description": "bokub's favorite prettier config",
"author": "bokub",
"license": "MIT",
"homepage": "https://github.com/bokub/prettier-config",
"main": "index.json",
"files": [
"package.json",
"index.json",
"README.md"
],
"keywords": [
"prettier",
"config",
"prettier-config"
]
"name": "@bokub/prettier-config",
"version": "2.0.1",
"description": "bokub's favorite prettier config",
"author": "bokub",
"license": "MIT",
"homepage": "https://github.com/bokub/prettier-config",
"main": "index.json",
"files": [
"package.json",
"index.json",
"README.md"
],
"keywords": [
"prettier",
"config",
"prettier-config"
]
}

0 comments on commit 31dccf2

Please sign in to comment.