chore: setup markdown formatting (#3224)
* chore(deps): upgrade prettier to v1.8.2 * chore: setup lint-docs script * docs: add `<!-- prettier-ignore -->`s * docs: format docs * Revert "docs: format docs" This reverts commit 6dba903987dddc498cb589ca311905f25b6aee53. * chore(prettierrc): set `--no-prose-wrap` * docs: format docs * Revert "docs: format docs" This reverts commit 139bd744b6921916be8fac4fa3bab83bae5d12df. * docs: tweak * docs: format docs * chore: rename .prettierrc * chore: rename back to .prettierrc * chore: split out third-party * refactor: fix linting * chore: do not split out third-party on website
This commit is contained in:
1 parent
a0c95cf862
commit
76efb33e75
35 files changed
+525
-436
No files matched your search
+2
-7
@@ -21,29 +21,24 @@ and add this config to your `package.json`:
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,json,css}": [
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
"*.{js,json,css}": ["prettier --write", "git add"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
There is a limitation where if you stage specific lines this approach will stage the whole file after regardless. See this [issue](https://github.com/okonet/lint-staged/issues/62) for more info.
|
||||
|
||||
See https://github.com/okonet/lint-staged#configuration for more details about how you can configure lint-staged.
|
||||
|
||||
|
||||
## Option 2. [pre-commit](https://github.com/pre-commit/pre-commit)
|
||||
|
||||
Copy the following config into your `.pre-commit-config.yaml` file:
|
||||
|
||||
```yaml
|
||||
|
||||
- repo: https://github.com/prettier/prettier
|
||||
sha: '' # Use the sha or tag you want to point at
|
||||
hooks:
|
||||
- id: prettier
|
||||
|
||||
```
|
||||
|
||||
Find more info from [here](http://pre-commit.com).
|
||||
|
||||
Reference in new issue
Block a user