check / check (push) Successful in 3m54s
script/lint ran prettier --check, the same check script/fmt-check runs, so the JavaScript had no linter. eslint now runs with its recommended rules, set in eslint.config.js, in a new frontend-lint stage of Dockerfile built from the pinned node image and the lockfile. The frontend stage copies a file from it, as the builder stage does from the Go lint stage, so the image cannot build unless eslint passed. script/lint builds both lint stages with --no-cache and runs no linter on the host; script/fmt-check keeps prettier on the host, and script/frontend-check drops its lint step. The viewport harness fixes the two kinds of finding eslint made. bootstrap wants node 22.13.0, as eslint 10 does. Also covers item 2 of #28. Model: opus-5-5
49 lines
1.0 KiB
Makefile
49 lines
1.0 KiB
Makefile
.PHONY: bootstrap setup dev test lint fmt fmt-check check frontend-check \
|
|
frontend-viewport-test docker hooks
|
|
|
|
# Standard targets are thin shims; the implementations live in script/
|
|
# per the scripts-to-rule-them-all pattern (see the Entrypoints section
|
|
# of README.md). test, lint, fmt, fmt-check and check cover the whole
|
|
# repo: the frontend here and the Go backend in backend/.
|
|
|
|
bootstrap:
|
|
@script/bootstrap
|
|
|
|
setup:
|
|
@script/setup
|
|
|
|
dev:
|
|
yarn dev
|
|
|
|
test:
|
|
@script/test
|
|
|
|
lint:
|
|
@script/lint
|
|
|
|
fmt:
|
|
@script/fmt
|
|
|
|
fmt-check:
|
|
@script/fmt-check
|
|
|
|
check:
|
|
@script/check
|
|
|
|
# The frontend tests and format check, for Dockerfile's frontend stage,
|
|
# which has neither Go nor Docker. Use check everywhere else.
|
|
frontend-check:
|
|
@script/frontend-check
|
|
|
|
# Responsive-layout verification in a containerised browser. Kept out of
|
|
# check: it needs Docker and takes minutes, where make test has to stay
|
|
# under 20 seconds.
|
|
frontend-viewport-test:
|
|
@script/frontend-viewport-test
|
|
|
|
docker:
|
|
@script/docker
|
|
|
|
hooks:
|
|
@script/install-precommit
|