Milestone 3
This commit is contained in:
46
.pre-commit-config.yaml
Normal file
46
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
# Run `pre-commit install` after cloning. CI should run `pre-commit run --all-files`.
|
||||
repos:
|
||||
- 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-json
|
||||
- id: check-added-large-files
|
||||
args: ["--maxkb=512"]
|
||||
- id: detect-private-key
|
||||
|
||||
# Backend — ruff (lint + format)
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.4.10
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix"]
|
||||
files: ^backend/.*\.py$
|
||||
- id: ruff-format
|
||||
files: ^backend/.*\.py$
|
||||
|
||||
# Frontend — eslint + tsc via local hooks (must be run from frontend/)
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: eslint
|
||||
name: eslint (frontend)
|
||||
entry: bash -c 'cd frontend && npm run lint'
|
||||
language: system
|
||||
files: ^frontend/.*\.(ts|tsx)$
|
||||
pass_filenames: false
|
||||
|
||||
- id: tsc-noemit
|
||||
name: tsc --noEmit (frontend)
|
||||
entry: bash -c 'cd frontend && npm run typecheck'
|
||||
language: system
|
||||
files: ^frontend/.*\.(ts|tsx)$
|
||||
pass_filenames: false
|
||||
|
||||
- id: prettier
|
||||
name: prettier --check (frontend)
|
||||
entry: bash -c 'cd frontend && npm run format:check'
|
||||
language: system
|
||||
files: ^frontend/.*\.(ts|tsx|css|json|html)$
|
||||
pass_filenames: false
|
||||
Reference in New Issue
Block a user