58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
default_install_hook_types: [pre-commit, pre-push]
|
|
|
|
minimum_pre_commit_version: "3.6.0"
|
|
|
|
exclude: ^dist/
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: mixed-line-ending
|
|
- id: check-yaml
|
|
- id: check-json
|
|
- id: check-merge-conflict
|
|
- id: check-added-large-files
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: check-no-bom
|
|
name: Check text files encoding (UTF-8, no BOM)
|
|
entry: python scripts/check_no_bom.py mjr_am_backend mjr_am_shared tests scripts docs .github README.md CHANGELOG.md __init__.py pyproject.toml mypy.ini pytest.ini tox.ini .pre-commit-config.yaml
|
|
language: system
|
|
pass_filenames: false
|
|
|
|
- id: ruff-fix
|
|
name: Ruff autofix
|
|
entry: python scripts/run_repo_python.py -m ruff check --fix --exit-non-zero-on-fix
|
|
language: system
|
|
types: [python]
|
|
|
|
- id: eslint-fix
|
|
name: ESLint autofix
|
|
entry: npm exec eslint --fix
|
|
language: system
|
|
files: ^ui/.*\.(ts|js|mjs)$
|
|
|
|
- id: prettier-write
|
|
name: Prettier write
|
|
entry: npm exec prettier --write
|
|
language: system
|
|
files: ^ui/.*\.(ts|js|mjs|vue)$
|
|
|
|
- id: mypy
|
|
name: Mypy (manual)
|
|
entry: python scripts/run_repo_python.py -m mypy --config-file mypy.ini
|
|
language: system
|
|
pass_filenames: false
|
|
stages: [manual]
|
|
|
|
- id: quality-gate
|
|
name: Changed-file quality gate (pre-push / manual)
|
|
entry: python scripts/run_repo_python.py scripts/run_changed_quality_gate.py
|
|
language: system
|
|
pass_filenames: false
|
|
stages: [pre-push, manual]
|