dx: add frontend format step to `pre-commit` config

pull/9051/head
Reinier van der Leer 2025-01-17 15:24:28 +01:00
parent 6229883cf1
commit 19bbbc6833
No known key found for this signature in database
GPG Key ID: BEB9E26CB6F21336
1 changed files with 20 additions and 0 deletions

View File

@ -170,6 +170,16 @@ repos:
files: ^classic/benchmark/(agbenchmark|tests)/((?!reports).)*[/.]
args: [--config=classic/benchmark/.flake8]
- repo: local
hooks:
- id: prettier
name: Format (Prettier) - AutoGPT Platform - Frontend
alias: format-platform-frontend
entry: bash -c 'cd autogpt_platform/frontend && npx prettier --write $(echo "$@" | sed "s|autogpt_platform/frontend/||g")' --
files: ^autogpt_platform/frontend/
types: [file]
language: system
- repo: local
# To have watertight type checking, we check *all* the files in an affected
# project. To trigger on poetry.lock we also reset the file `types` filter.
@ -221,6 +231,16 @@ repos:
language: system
pass_filenames: false
# - repo: local
# hooks:
# - id: tsc
# name: Typecheck - AutoGPT Platform - Frontend
# entry: bash -c 'cd autogpt_platform/frontend && npm run type-check'
# files: ^autogpt_platform/frontend/
# types: [file]
# language: system
# pass_filenames: false
- repo: local
hooks:
- id: pytest