mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
Pure-history medication detail page, legacy step consolidation, and the finish of the outbound-fetch migration. - /medications/[id] becomes a read-only history surface; every setting moves into a new advanced-settings sheet, and the edit trigger becomes a two-option picker. The list page is unchanged. - A pg-boss job folds pre-v1.5.0 granular step rows into one canonical daily total per user per day and soft-deletes the originals; migration 0087 adds a partial index for the converging discovery scan. - Every remaining server-side fetch routes through safeFetch (Withings, Codex OAuth + SSE, bug-report, Umami, GlitchTip, Loki); a new healthlog/safe-fetch-required ESLint rule guards the boundary. - Fixes: intake-edit dialog seeded from real values, consolidation skips a unique-constraint day instead of stranding it, avatar upload reads the body once under a bounded cap, egress lint rejects absolute URLs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.8 KiB
JavaScript
46 lines
1.8 KiB
JavaScript
import { defineConfig, globalIgnores } from "eslint/config";
|
|
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
import nextTs from "eslint-config-next/typescript";
|
|
import healthlogPlugin from "./eslint-plugins/healthlog/index.js";
|
|
|
|
const eslintConfig = defineConfig([
|
|
...nextVitals,
|
|
...nextTs,
|
|
// Override default ignores of eslint-config-next.
|
|
globalIgnores([
|
|
// Default ignores of eslint-config-next:
|
|
".next/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
// v1.4.41 — ignore Claude Code session worktrees so a mid-marathon
|
|
// worktree on an older commit can't poison `pnpm lint` locally.
|
|
// CI never sees this path; the rule is for the dev environment.
|
|
".claude/**",
|
|
// The project-local ESLint rule plugin is CommonJS (require/module
|
|
// .exports) by ESLint convention; it is not application source and
|
|
// is not linted by the app's TypeScript ruleset.
|
|
"eslint-plugins/**",
|
|
]),
|
|
// v1.4.41 W-PROCESS-DOCS — custom rule that flags any bare-array
|
|
// `queryKey: [ … ]` / `mutationKey: [ … ]` declaration inside the
|
|
// files the queryKeys factory currently guards. Promotes the
|
|
// test-guard substitute from v1.4.40 W-RSC to a real ESLint rule
|
|
// so IDE + CI both fail fast on a factory bypass. See
|
|
// `eslint-plugins/healthlog/queryKey-factory.js` for the
|
|
// whitelist + rationale.
|
|
{
|
|
plugins: { healthlog: healthlogPlugin },
|
|
rules: {
|
|
"healthlog/queryKey-factory": "error",
|
|
// v1.5.6 — every outbound fetch under src/lib + src/app must route
|
|
// through the safeFetch wrapper (manual-redirect + timeout, and the
|
|
// requirePublicHost connect-time pin). The wrapper internals and
|
|
// test files are exempt; see the rule file for the allowlist.
|
|
"healthlog/safe-fetch-required": "error",
|
|
},
|
|
},
|
|
]);
|
|
|
|
export default eslintConfig;
|