2025-07-29 14:38:27 -04:00
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
|
rev: v4.5.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
- id: check-yaml
|
|
|
|
|
- id: check-added-large-files
|
2025-07-29 16:33:49 -04:00
|
|
|
- id: check-json
|
|
|
|
|
- id: pretty-format-json
|
|
|
|
|
args: ['--autofix']
|
2025-07-29 14:38:27 -04:00
|
|
|
|
2025-07-29 16:33:49 -04:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
|
|
|
rev: v3.1.0
|
2025-07-29 14:38:27 -04:00
|
|
|
hooks:
|
2025-07-29 16:33:49 -04:00
|
|
|
- id: prettier
|
|
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
|
|
|
rev: v8.56.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: eslint
|
|
|
|
|
files: \.js$
|
2025-07-29 17:07:15 -04:00
|
|
|
args: ['--fix']
|
2025-07-29 17:21:43 -04:00
|
|
|
|
|
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: build-dist
|
|
|
|
|
name: Build dist
|
|
|
|
|
entry: npm run build
|
|
|
|
|
language: system
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
files: ^(index\.js|lib/.*\.js)$
|
|
|
|
|
- id: check-dist
|
|
|
|
|
name: Check dist is up to date
|
|
|
|
|
entry: bash -c 'if [ -n "$(git status --porcelain dist)" ]; then echo "dist is out of date. Run npm run build and commit the changes."; exit 1; fi'
|
|
|
|
|
language: system
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
always_run: true
|