From 7ab263ae2d740f1602a434a72ee6b6a7bd48412b Mon Sep 17 00:00:00 2001
From: mkelvers
Date: Sun, 21 Jun 2026 01:48:48 +0200
Subject: [PATCH] style: format dev docs and hook config
---
.air.toml | 28 ++++------------------------
README.md | 23 ++++++++++++++++++-----
lefthook.yml | 20 +++++++++++++++-----
3 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/.air.toml b/.air.toml
index ff2ccec..37e3745 100644
--- a/.air.toml
+++ b/.air.toml
@@ -6,32 +6,12 @@ cmd = "just build-dev"
entrypoint = "./tmp/server"
full_bin = "./tmp/server"
delay = 300
-exclude_dir = [
- ".git",
- ".mise",
- "dist",
- "node_modules",
- "tmp",
-]
-exclude_file = [
- "mal.db",
- "mal.db-shm",
- "mal.db-wal",
-]
-exclude_regex = [
- "_test\\.go",
-]
+exclude_dir = [".git", ".mise", "dist", "node_modules", "tmp"]
+exclude_file = ["mal.db", "mal.db-shm", "mal.db-wal"]
+exclude_regex = ["_test\\.go"]
exclude_unchanged = true
follow_symlink = false
-include_ext = [
- "css",
- "go",
- "gohtml",
- "html",
- "sql",
- "toml",
- "ts",
-]
+include_ext = ["css", "go", "gohtml", "html", "sql", "toml", "ts"]
kill_delay = "500ms"
log = "air-build.log"
send_interrupt = true
diff --git a/README.md b/README.md
index 23b9830..bfba264 100644
--- a/README.md
+++ b/README.md
@@ -12,13 +12,20 @@
-MyAnimeList is a small self-hosted anime tracker and playback app. It keeps the catalog, watchlist, progress tracking, and player in one place, backed by a single SQLite database and a single Go server.
+MyAnimeList is a small self-hosted anime tracker and playback app. It keeps the catalog, watchlist,
+progress tracking, and player in one place, backed by a single SQLite database and a single Go
+server.
-Most of the UI is rendered on the server. HTMX handles lightweight updates like pagination and watchlist changes, while TypeScript is kept for the parts that need real browser state: the video player, search page, theme handling, and skip segment editor. The app also includes local users, API tokens, subtitle support, playlist rewriting, provider integrations, migrations, and startup data fixes.
+Most of the UI is rendered on the server. HTMX handles lightweight updates like pagination and
+watchlist changes, while TypeScript is kept for the parts that need real browser state: the video
+player, search page, theme handling, and skip segment editor. The app also includes local users, API
+tokens, subtitle support, playlist rewriting, provider integrations, migrations, and startup data
+fixes.
## Running
-Requires [`mise`](https://mise.jdx.dev/), a C compiler for SQLite, and the tools managed in `.mise.toml`.
+Requires [`mise`](https://mise.jdx.dev/), a C compiler for SQLite, and the tools managed in
+`.mise.toml`.
```bash
mise install
@@ -28,11 +35,17 @@ go run ./cmd/user
just dev
```
-The app starts on `http://localhost:3000` by default. Configuration comes from environment variables, and a local `.env` file is loaded automatically. The most useful options are `PORT`, `DATABASE_FILE`, `PLAYBACK_PROXY_SECRET`, `EPISODE_AVAILABILITY_MODE`, and `ANIMESCHEDULE_API_TOKEN`.
+The app starts on `http://localhost:3000` by default. Configuration comes from environment
+variables, and a local `.env` file is loaded automatically. The most useful options are `PORT`,
+`DATABASE_FILE`, `PLAYBACK_PROXY_SECRET`, `EPISODE_AVAILABILITY_MODE`, and
+`ANIMESCHEDULE_API_TOKEN`.
## Development
-The codebase is split between Go feature packages, external integrations, server-rendered templates, and a small frontend asset pipeline. `cmd/server` starts the web app, `cmd/user` contains local admin tools, `internal` holds the application modules, `integrations` holds provider clients, and `templates`, `static`, and `dist` contain the UI.
+The codebase is split between Go feature packages, external integrations, server-rendered templates,
+and a small frontend asset pipeline. `cmd/server` starts the web app, `cmd/user` contains local
+admin tools, `internal` holds the application modules, `integrations` holds provider clients, and
+`templates`, `static`, and `dist` contain the UI.
The common development commands are in the `justfile`.
diff --git a/lefthook.yml b/lefthook.yml
index 7b16af9..5fa5be2 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -14,29 +14,39 @@
"lint:ts":
{
"glob": "*.{ts,js,tsx,jsx}",
- "run": "bunx oxlint --ignore-path .oxlintignore {staged_files} --max-warnings 0 --tsconfig ./tsconfig.json --type-aware",
+ "run":
+ "bunx oxlint --ignore-path .oxlintignore {staged_files} --max-warnings 0 --tsconfig
+ ./tsconfig.json --type-aware",
},
"go-fmt":
{
"glob": "*.go",
- "run": 'files=$(gofmt -l {staged_files}); test -z "$files" || (printf "go files need formatting:\n%s\n" "$files"; exit 1)',
+ "run":
+ 'files=$(gofmt -l {staged_files}); test -z "$files" || (printf "go files need
+ formatting:\n%s\n" "$files"; exit 1)',
},
"go-lint":
{
"glob": "*.go",
- "run": 'printf "%s\n" {staged_files} | xargs -n1 dirname | sort -u | xargs -I{} golangci-lint run --new-from-rev=HEAD ./{}',
+ "run":
+ 'printf "%s\n" {staged_files} | xargs -n1 dirname | sort -u | xargs -I{}
+ golangci-lint run --new-from-rev=HEAD ./{}',
},
"go-test":
{
"glob": "*.go",
- "run": 'printf "%s\n" {staged_files} | xargs -n1 dirname | sort -u | xargs -I{} go test -count=1 ./{}',
+ "run":
+ 'printf "%s\n" {staged_files} | xargs -n1 dirname | sort -u | xargs -I{} go test
+ -count=1 ./{}',
},
"ts-typecheck": { "glob": "*.ts", "run": "bunx tsc -p tsconfig.json --noEmit" },
"build-assets": { "glob": "*.{ts,css}", "run": "bun run build:assets" },
"go-build":
{
"glob": "*.go",
- "run": 'printf "%s\n" {staged_files} | xargs -n1 dirname | sort -u | xargs -I{} go build -o /dev/null ./{}',
+ "run":
+ 'printf "%s\n" {staged_files} | xargs -n1 dirname | sort -u | xargs -I{} go build -o
+ /dev/null ./{}',
},
},
},