46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
repos:
|
|
# Python: ruff lint + format
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.4.10
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix]
|
|
files: ^packages/(engine|api)/
|
|
- id: ruff-format
|
|
files: ^packages/(engine|api)/
|
|
|
|
# Python: mypy strict (engine)
|
|
- repo: local
|
|
hooks:
|
|
- id: mypy-engine
|
|
name: mypy (engine)
|
|
language: system
|
|
entry: bash -c 'cd packages/engine && poetry run mypy src/'
|
|
pass_filenames: false
|
|
files: ^packages/engine/
|
|
types: [python]
|
|
|
|
- id: mypy-api
|
|
name: mypy (api)
|
|
language: system
|
|
entry: bash -c 'cd packages/api && poetry run mypy src/'
|
|
pass_filenames: false
|
|
files: ^packages/api/
|
|
types: [python]
|
|
|
|
# JS/TS: prettier
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v4.0.0-alpha.8
|
|
hooks:
|
|
- id: prettier
|
|
files: ^packages/web/
|
|
exclude: ^packages/web/(node_modules|\.next|pnpm-lock\.yaml)/
|
|
|
|
# General
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-merge-conflict
|