mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Add new hook pretty-format-json
This new hook allows to standardize one's JSON files (sorted key/4 spaces indent). By default it just fails if any file is not complying with the standard, but you can also pass the arg `--autofix` and the hook will pretty-format the file itself. Good in use combined with the `check-json` hook.
This commit is contained in:
parent
cf550fcab3
commit
55bf22dc4a
7 changed files with 134 additions and 2 deletions
|
|
@ -45,6 +45,7 @@ Add this to your `.pre-commit-config.yaml`
|
|||
- `name-tests-test` - Assert that files in tests/ end in `_test.py`.
|
||||
- Use `args: ['--django']` to match `test*.py` instead.
|
||||
- `pyflakes` - Run pyflakes on your python files.
|
||||
- `pretty-format-json` - Checks that all your JSON files are pretty
|
||||
- `requirements-txt-fixer` - Sorts entries in requirements.txt
|
||||
- `trailing-whitespace` - Trims trailing whitespace.
|
||||
- Markdown linebreak trailing spaces preserved for `.md` and`.markdown`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue