Add pre-commit framework

- Install pre-commit
- Configure .pre-commit-config.yaml with:
  - ruff (lint + format) for Python
  - bandit for Python security
  - eslint for TypeScript
  - prettier for TypeScript
  - shared constants validation
- Add Makefile targets: pre-commit, lint
This commit is contained in:
counterweight 2025-12-21 22:01:38 +01:00
parent 521848217d
commit d55382d16f
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 49 additions and 1 deletions

View file

@ -1,4 +1,4 @@
.PHONY: install-backend install-frontend install setup-hooks backend frontend db db-stop db-ready db-seed dev test test-backend test-frontend test-e2e typecheck generate-types generate-types-standalone check-types-fresh check-constants lint-backend format-backend fix-backend security-backend lint-frontend fix-frontend format-frontend
.PHONY: install-backend install-frontend install setup-hooks backend frontend db db-stop db-ready db-seed dev test test-backend test-frontend test-e2e typecheck generate-types generate-types-standalone check-types-fresh check-constants lint-backend format-backend fix-backend security-backend lint-frontend fix-frontend format-frontend pre-commit lint
-include .env
export
@ -114,3 +114,9 @@ fix-frontend:
format-frontend:
cd frontend && npm run format
pre-commit:
cd backend && uv run pre-commit run --all-files
lint: lint-backend lint-frontend security-backend
@echo "All linting passed!"