Skip to content

Professionalize repo: linting, tests, CI, and docs#19

Merged
perandre merged 8 commits into
mainfrom
chore/professionalize
May 28, 2026
Merged

Professionalize repo: linting, tests, CI, and docs#19
perandre merged 8 commits into
mainfrom
chore/professionalize

Conversation

@perandre
Copy link
Copy Markdown
Owner

Summary

Brings the repo up to the standard of frontkom/frisk — a real, enforced quality toolchain so any senior dev can contribute with confidence.

CTO review findings addressed

  • Linting didn't worklint called next lint but ESLint wasn't installed and there was no config. Now: ESLint flat config (eslint-config-next) wired into npm run lint, green on the current baseline.
  • Zero tests despite vitest being declared (and uninstalled). Now: 22 Vitest unit tests for the pure domain logic.
  • No CI, hooks, fallow, or dependabot. Now: CI gate + git hooks + advisory audits + automated dependency updates.
  • Thin CLAUDE.md with broken doc links. Now: canonical AGENTS.md (frisk convention) + CONTRIBUTING.md.

What changed

  • Linting: eslint.config.mjs (flat config). Pre-existing any at API boundaries and react-hooks/exhaustive-deps are warnings (tracked tech-debt), so lint blocks only on real errors. Escaped JSX entities on the about page to clear the baseline.
  • Tests: aggregator (bucketing, spanning, email dedup, summaries), ai/parse (clean/markdown/truncated JSON, rounding, defaults), ai/preprocess (titles, lunch/gap detection), cn(). Timezone-stable fixtures; suite pins TZ=Europe/Oslo.
  • Hooks: husky pre-commit (lint-staged) + pre-push (typecheck + test).
  • CI (ci.yml): lint, typecheck, test on Node 22, plus advisory Semgrep. fallow.yml advisory audit. dependabot.yml weekly updates.
  • Docs: AGENTS.md is now the single source of truth; CLAUDE.md@AGENTS.md; CONTRIBUTING.md; README CI badge + Development section.
  • Hygiene: gitignore firebase-debug.log / stray logs. Version bumped to 2.2.0.

Deliberately not done (noted for follow-up)

  • Typing the any boundaries and fixing exhaustive-deps (tracked as warnings in AGENTS.md).
  • Renumbering the duplicate-numbered ADRs (two 0001, two 0002) — left alone to avoid merging genuinely distinct decisions.
  • No Prettier (matches frisk; avoids a repo-wide reformat diff).

Test plan

  • npm run lint — 0 errors
  • npm run typecheck — passes
  • npm test — 22/22 pass
  • npm run build — compiles
  • CI green on this PR

🤖 Generated with Claude Code

perandre and others added 6 commits May 25, 2026 18:09
Removed in a39bf85, the absence of this rule lets the model emit one
suggestion per source activity (commit/email/event), producing 50+
duplicate entries on the same project and blowing past the 11h cap.

Bump 2.1.1 → 2.1.2.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Introduce a working lint/typecheck/test toolchain:
- ESLint flat config (eslint-config-next) wired into `npm run lint`
- `typecheck` script (tsc --noEmit)
- Vitest config for unit tests
- husky pre-commit (lint-staged) + pre-push (typecheck + test)
- Escape JSX entities on the about page to make the lint baseline clean

Pre-existing `any` usage and react-hooks deps are downgraded to warnings
to track as follow-ups rather than blocking CI on legacy patterns.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Cover the pure, high-value modules with Vitest:
- aggregator: hour bucketing, multi-hour spanning, email thread dedup,
  calendar-notification filtering, and day summary tallies
- ai/parse: clean/markdown-wrapped/truncated JSON salvage, hour rounding,
  confidence normalization, and field defaulting
- ai/preprocess: flattening, title derivation, lunch/gap detection
- cn(): tailwind class merging

22 tests, timezone-stable fixtures.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- ci.yml: lint, typecheck, and test on push/PR (Node 22) plus an
  advisory (non-blocking) Semgrep security scan
- fallow.yml: advisory dead-code / reachability audit on PRs
- dependabot.yml: weekly npm + github-actions updates, dev deps grouped
- gitignore: stop tracking firebase-debug.log and stray *.log files

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- AGENTS.md: single source of truth for humans and agents — tech stack,
  commands, quality gates, workflow, conventions, testing, scope/git/approval
  rules, and a tracked tech-debt list
- CLAUDE.md now imports AGENTS.md (matches the frontkom/frisk convention),
  replacing the thinner standalone rules and its broken doc links
- CONTRIBUTING.md: concise setup + PR workflow for new contributors
- README: CI badge and a Development section (lint/typecheck/test, hooks)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tooling, tests, and docs — minor release.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worklog-xeqe Ready Ready Preview, Comment May 28, 2026 10:41am

semgrep's deps import pkg_resources, which Python 3.12 no longer bundles —
install setuptools alongside it (as frisk does) so the advisory scan runs.
Also make the step explicitly non-blocking with `|| true`. Bump to 2.2.1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace placeholder Vercel domains with the real production domain in the
README env/deploy steps and CALLBACK-URLS reference; add a custom-domain +
DNS step. Bump to 2.2.2.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@perandre perandre merged commit dc6d90e into main May 28, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant