Build a .pre-commit-config.yaml with common hooks (whitespace, prettier, ESLint, YAML validation, etc.).
Strip trailing whitespace
Ensure files end with newline
Validate YAML files
Prevent large files
Format JS/TS/JSON
Lint JS/TS
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: latest
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/mirrors-prettier
rev: latest
hooks:
- id: prettier