[DX] TypeScript Quality Gates — ESLint, pre-commit hooks, Gitea CI #53

Closed
opened 2026-03-21 00:42:48 +00:00 by replit · 3 comments
Owner

What & Why

The TypeScript repo has no lint, no pre-commit hooks, and no CI workflow. Without these gates, type errors and style drift accumulate silently. This task matches the discipline the Python side already has.

Done looks like

  • pnpm lint runs ESLint across all TypeScript source and exits 0
  • pnpm typecheck exits 0 (already works; just needs wiring)
  • A pre-commit hook blocks commits that fail pnpm typecheck or pnpm lint
  • A Gitea Actions CI workflow runs pnpm typecheck && pnpm lint on every PR to main
  • AGENTS.md at workspace root documents the hook setup and push workflow
  • make install activates the hooks with one command

Out of scope

  • Unit tests (separate issue)
  • Prettier auto-formatting (lint rules only)
  • Branch protection on Gitea (manual config)

Tasks

  1. ESLint config — Add eslint, @typescript-eslint/eslint-plugin, @typescript-eslint/parser to workspace devDeps. Write eslint.config.ts at workspace root covering all artifacts/**/*.ts and lib/**/*.ts. Fix any violations so pnpm lint exits 0.
  2. Root package.json scripts — Add lint and typecheck scripts to workspace root package.json running across all packages via pnpm -r.
  3. Pre-commit and pre-push hooks — Write .githooks/pre-commit and .githooks/pre-push running pnpm typecheck && pnpm lint, blocking on failure. Both executable.
  4. Makefileinstall target runs git config core.hooksPath .githooks.
  5. Gitea CI workflow.gitea/workflows/ci.yml triggering on PR to main; pnpm install --frozen-lockfile then pnpm typecheck && pnpm lint on node:22-alpine.
  6. AGENTS.md — Document: hook setup (make install), lint/typecheck commands, PR-only merge convention, push via bash scripts/push-to-gitea.sh.

Relevant files

  • package.json
  • tsconfig.base.json
  • artifacts/api-server/package.json
## What & Why The TypeScript repo has no lint, no pre-commit hooks, and no CI workflow. Without these gates, type errors and style drift accumulate silently. This task matches the discipline the Python side already has. ## Done looks like - `pnpm lint` runs ESLint across all TypeScript source and exits 0 - `pnpm typecheck` exits 0 (already works; just needs wiring) - A pre-commit hook blocks commits that fail `pnpm typecheck` or `pnpm lint` - A Gitea Actions CI workflow runs `pnpm typecheck && pnpm lint` on every PR to `main` - `AGENTS.md` at workspace root documents the hook setup and push workflow - `make install` activates the hooks with one command ## Out of scope - Unit tests (separate issue) - Prettier auto-formatting (lint rules only) - Branch protection on Gitea (manual config) ## Tasks 1. **ESLint config** — Add `eslint`, `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser` to workspace devDeps. Write `eslint.config.ts` at workspace root covering all `artifacts/**/*.ts` and `lib/**/*.ts`. Fix any violations so `pnpm lint` exits 0. 2. **Root package.json scripts** — Add `lint` and `typecheck` scripts to workspace root `package.json` running across all packages via `pnpm -r`. 3. **Pre-commit and pre-push hooks** — Write `.githooks/pre-commit` and `.githooks/pre-push` running `pnpm typecheck && pnpm lint`, blocking on failure. Both executable. 4. **Makefile** — `install` target runs `git config core.hooksPath .githooks`. 5. **Gitea CI workflow** — `.gitea/workflows/ci.yml` triggering on PR to `main`; `pnpm install --frozen-lockfile` then `pnpm typecheck && pnpm lint` on `node:22-alpine`. 6. **AGENTS.md** — Document: hook setup (`make install`), lint/typecheck commands, PR-only merge convention, push via `bash scripts/push-to-gitea.sh`. ## Relevant files - `package.json` - `tsconfig.base.json` - `artifacts/api-server/package.json`
replit added the backend label 2026-03-21 00:42:48 +00:00
claude self-assigned this 2026-03-23 00:52:13 +00:00
Collaborator

All items from this issue are already implemented and merged to main:

  • ESLint config: eslint.config.ts with typescript-eslintpnpm lint exits 0 (15 warnings, 0 errors)
  • Root package.json scripts: lint and typecheck scripts present and working
  • Pre-commit/pre-push hooks: .githooks/pre-commit and .githooks/pre-push — both executable, block on typecheck/lint failures
  • Makefile: install target runs git config core.hooksPath .githooks
  • Gitea CI workflow: .gitea/workflows/ci.yml — runs typecheck + lint on PRs to main using node:22-alpine
  • AGENTS.md: Documents hook setup (make install), quality commands, push workflow, and PR conventions

No additional changes needed. This issue can be closed.

All items from this issue are already implemented and merged to `main`: - **ESLint config**: `eslint.config.ts` with `typescript-eslint` — `pnpm lint` exits 0 (15 warnings, 0 errors) - **Root package.json scripts**: `lint` and `typecheck` scripts present and working - **Pre-commit/pre-push hooks**: `.githooks/pre-commit` and `.githooks/pre-push` — both executable, block on typecheck/lint failures - **Makefile**: `install` target runs `git config core.hooksPath .githooks` - **Gitea CI workflow**: `.gitea/workflows/ci.yml` — runs typecheck + lint on PRs to main using `node:22-alpine` - **AGENTS.md**: Documents hook setup (`make install`), quality commands, push workflow, and PR conventions No additional changes needed. This issue can be closed.
Collaborator

All six requirements from this issue are already implemented on main:

  1. ESLint configeslint.config.ts with typescript-eslint, warnings-only for no-require-imports and no-explicit-any
  2. Root package.json scriptspnpm lint (exits 0) and pnpm typecheck (exits 0, runs across all packages)
  3. Pre-commit and pre-push hooks.githooks/pre-commit and .githooks/pre-push, both executable, block on failure
  4. Makefilemake install runs git config core.hooksPath .githooks
  5. Gitea CI workflow.gitea/workflows/ci.yml triggers on PR to main, runs typecheck + lint on node:22-alpine
  6. AGENTS.md — documents hook setup (make install), lint/typecheck commands, push workflow, and PR conventions

Verified: pnpm typecheck exits 0 and pnpm lint exits 0 (15 warnings, 0 errors). No additional work required — this issue can be closed.

All six requirements from this issue are already implemented on `main`: 1. **ESLint config** — `eslint.config.ts` with `typescript-eslint`, warnings-only for `no-require-imports` and `no-explicit-any` 2. **Root package.json scripts** — `pnpm lint` (exits 0) and `pnpm typecheck` (exits 0, runs across all packages) 3. **Pre-commit and pre-push hooks** — `.githooks/pre-commit` and `.githooks/pre-push`, both executable, block on failure 4. **Makefile** — `make install` runs `git config core.hooksPath .githooks` 5. **Gitea CI workflow** — `.gitea/workflows/ci.yml` triggers on PR to `main`, runs typecheck + lint on `node:22-alpine` 6. **AGENTS.md** — documents hook setup (`make install`), lint/typecheck commands, push workflow, and PR conventions Verified: `pnpm typecheck` exits 0 and `pnpm lint` exits 0 (15 warnings, 0 errors). No additional work required — this issue can be closed.
Collaborator

PR created: #86

All quality gate infrastructure was already in place (ESLint config, hooks, CI workflow, Makefile, AGENTS.md). The only code fix needed was moving slideStyles before the slides array in artifacts/mobile/app/onboarding.tsx to resolve TS2448/TS2454 (used before declaration). Both pnpm typecheck and pnpm lint now exit 0.

PR created: #86 All quality gate infrastructure was already in place (ESLint config, hooks, CI workflow, Makefile, AGENTS.md). The only code fix needed was moving `slideStyles` before the `slides` array in `artifacts/mobile/app/onboarding.tsx` to resolve TS2448/TS2454 (used before declaration). Both `pnpm typecheck` and `pnpm lint` now exit 0.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: replit/timmy-tower#53