Make lint report instead of rewriting, and stop verify guessing the domain
`make lint-frontend` was `biome check --write --unsafe ./` — a lint target that reformatted the whole tree rather than checking it, which is why every parallel change in this repo has had to work around it. `lint` checks now and a new `format` writes. The pre-commit hook and CI needed no edit at all: both call `bun run lint`, so they became checks the moment its meaning changed. `app/Makefile` assigned DOMAIN from .env, and a plain assignment beats an inherited environment variable and is not exported — so `cd app && make dev-local` served localhost while the same checkout's tests targeted the configured domain. `export DOMAIN ?=` gives the lattice that was intended: command line, then environment, then .env. Alongside: the backend's htmlcov bind mount created that directory as root, so `make test-backend` died on the coverage step after every test had passed, which reads like a test failure and is not one. The alerts screen's copy of ALERTING_EVENTS is now checked by a test rather than trusted. And the shard comment claimed two spec files where there are nine. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uq8mtNb97A7praJLyeEYgs
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
.PHONY: dev-utils dev dev-local up down update install dev-backend dev-frontend \
|
||||
generate-client seed-example seed-demo seed-house seed-aircon seed-hosted-demo test test-backend test-frontend soak bench-startup lint lint-backend \
|
||||
lint-frontend umami clean help
|
||||
lint-frontend format-frontend umami clean help
|
||||
|
||||
COMPOSE_ROOT := $(CURDIR)
|
||||
# Explicit project name keeps this stack isolated from the sibling website
|
||||
@@ -133,7 +133,7 @@ test-backend: ## Run backend tests (pytest + coverage)
|
||||
# deployment carries the deployment's domain, and *.fluksio.com resolves to the
|
||||
# live instance from here — which is why the run below maps both names onto the
|
||||
# local Traefik by address and never lets DNS decide.
|
||||
DOMAIN = $(shell sed -n 's/^DOMAIN=//p' $(COMPOSE_ROOT)/.env | head -1)
|
||||
export DOMAIN ?= $(shell sed -n 's/^DOMAIN=//p' $(COMPOSE_ROOT)/.env | head -1)
|
||||
PW_VERSION = $(shell sed -n 's/.*"@playwright\/test": "[^0-9]*\([0-9.]*\)".*/\1/p' frontend/package.json | head -1)
|
||||
|
||||
test-frontend: ## Run frontend tests (Playwright e2e) against the local stack
|
||||
@@ -174,6 +174,9 @@ lint-backend: ## Lint backend with ruff + mypy
|
||||
lint-frontend: ## Lint frontend with biome
|
||||
cd frontend && bun run lint
|
||||
|
||||
format-frontend: ## Apply biome's fixes to the frontend (what `lint-frontend` only reports)
|
||||
cd frontend && bun run format
|
||||
|
||||
# ── Cleanup ───────────────────────────────────────────────────────
|
||||
|
||||
clean: ## Remove build artifacts and caches
|
||||
|
||||
Reference in New Issue
Block a user