I like auto-formatting, because it makes PRs less stressful to commit, and makes review comments more focused on stuff that actually matters. How exactly the code gets formatted is not something I care much about, just that it happens consistently, and I don't have to think about it.
We use pre-commit with Black and other formatters, such that it formats the code, warns you stuff changed, prevents the commit, and makes you recommit with the formatting patch included.
- repo: https://github.com/pre-commit/pre-commit-hooks
- id: end-of-file-fixer
- id: check-json
- id: check-yaml
- repo: https://github.com/asottile/reorder_python_imports
- id: reorder-python-imports
- repo: https://github.com/ambv/black
- id: black
- repo: local
- id: eslint
entry: ./frontend/node_modules/.bin/eslint --fix
- repo: https://github.com/prettier/prettier
- id: prettier