Add TypeScript quality gates: ESLint, Prettier, pre-commit hook, Gitea CI #13

Open
opened 2026-03-18 22:20:58 +00:00 by replit · 0 comments
Owner

Context

The Python dashboard repo enforces tox -e lint before every commit and runs the full suite on every PR via Gitea Actions. The TypeScript repo has no equivalent. There is no ESLint config, no Prettier config, no pre-commit hook, and no CI workflow. Code has been pushed directly to main with only "does it start" as the gate.

Requirements

  1. Add eslint + @typescript-eslint/* to artifacts/api-server and root workspace devDeps
  2. Add prettier config (.prettierrc) at workspace root
  3. Add eslint.config.ts at workspace root covering all artifacts/** TypeScript
  4. Add .githooks/pre-commit that runs:
    • pnpm typecheck (already exists)
    • pnpm lint (new)
    • Blocks commit on failure, no bypass
  5. Add .githooks/pre-push that runs pnpm typecheck && pnpm lint
  6. Add Makefile target install that runs git config core.hooksPath .githooks
  7. Add .gitea/workflows/ci.yml that runs pnpm typecheck and pnpm lint on every PR to main
  8. Document the setup in a CLAUDE.md and AGENTS.md at workspace root (mirroring the Python repo pattern)

Acceptance Criteria

  • pnpm lint passes on current codebase with zero errors
  • pnpm typecheck passes on current codebase with zero errors
  • Pre-commit hook blocks a commit that introduces a TypeScript type error
  • Pre-commit hook blocks a commit that introduces an ESLint violation
  • Gitea CI workflow runs on every open PR and reports pass/fail
  • make install activates hooks (documented in AGENTS.md)
  • No direct pushes to main succeed (branch protection enabled on Gitea)

Files

  • .githooks/pre-commit (new)
  • .githooks/pre-push (new)
  • Makefile (new)
  • eslint.config.ts (new)
  • .prettierrc (new)
  • .gitea/workflows/ci.yml (new)
  • CLAUDE.md (new)
  • AGENTS.md (new)
  • package.json (add lint script)
  • artifacts/api-server/package.json (add lint script)
## Context The Python dashboard repo enforces `tox -e lint` before every commit and runs the full suite on every PR via Gitea Actions. The TypeScript repo has no equivalent. There is no ESLint config, no Prettier config, no pre-commit hook, and no CI workflow. Code has been pushed directly to `main` with only "does it start" as the gate. ## Requirements 1. Add `eslint` + `@typescript-eslint/*` to `artifacts/api-server` and root workspace devDeps 2. Add `prettier` config (`.prettierrc`) at workspace root 3. Add `eslint.config.ts` at workspace root covering all `artifacts/**` TypeScript 4. Add `.githooks/pre-commit` that runs: - `pnpm typecheck` (already exists) - `pnpm lint` (new) - Blocks commit on failure, no bypass 5. Add `.githooks/pre-push` that runs `pnpm typecheck && pnpm lint` 6. Add `Makefile` target `install` that runs `git config core.hooksPath .githooks` 7. Add `.gitea/workflows/ci.yml` that runs `pnpm typecheck` and `pnpm lint` on every PR to `main` 8. Document the setup in a `CLAUDE.md` and `AGENTS.md` at workspace root (mirroring the Python repo pattern) ## Acceptance Criteria - [ ] `pnpm lint` passes on current codebase with zero errors - [ ] `pnpm typecheck` passes on current codebase with zero errors - [ ] Pre-commit hook blocks a commit that introduces a TypeScript type error - [ ] Pre-commit hook blocks a commit that introduces an ESLint violation - [ ] Gitea CI workflow runs on every open PR and reports pass/fail - [ ] `make install` activates hooks (documented in AGENTS.md) - [ ] No direct pushes to `main` succeed (branch protection enabled on Gitea) ## Files - `.githooks/pre-commit` (new) - `.githooks/pre-push` (new) - `Makefile` (new) - `eslint.config.ts` (new) - `.prettierrc` (new) - `.gitea/workflows/ci.yml` (new) - `CLAUDE.md` (new) - `AGENTS.md` (new) - `package.json` (add lint script) - `artifacts/api-server/package.json` (add lint script)
replit added the hermes label 2026-03-19 19:33:32 +00:00
gemini was assigned by Rockachopa 2026-03-22 23:38:30 +00:00
This repo is archived. You cannot comment on issues.