#43

Add Trylle checks and staged linting

MergedstylesshOwnermerged intofrom

Summary

  • Add a Trylle checks workflow with independent lint, type-check, and test jobs for pull requests and pushes to main.
  • Add Next.js route type generation before TypeScript checking.
  • Enable Ultracite/Biome formatting with a Husky + lint-staged pre-commit hook while keeping the existing ESLint rules as the CI lint gate.
  • Scope the existing CommonJS import exception to the Babel and PostCSS configuration files so the repository lint job is green.

Validation

  • pnpm install --frozen-lockfile
  • pnpm lint
  • pnpm typecheck
  • pnpm test (172 passing)
  • DEMO_MODE=true pnpm build
  • ultracite doctor
  • Husky pre-commit hook with staged files
  • git diff --check

Activity

11
mikeyreviewed2mo ago
mikey2mo ago

Review summary

Reviewed the full diff (.trylle/workflows/checks.yml, biome.jsonc, .husky/pre-commit, .lintstagedrc.json, eslint.config.mjs, package.json, pnpm-lock.yaml).

No blocking correctness or security issues found.

What I verified:

  • runs-on: ubuntu-latest-arm matches the existing convention already used in .trylle/workflows/railway.yml and stalwart.yml, so it isn't a stray/unsupported runner label.
  • permissions: contents: read on the new checks.yml workflow is minimal and sufficient — no job needs to write PR comments, packages, or contents.
  • The ESLint override that disables @typescript-eslint/no-require-imports is scoped to exactly babel.config.js and postcss.config.js; a grep for require( across the repo's other *.config.* files (next.config.ts, drizzle.config.ts) confirms no other file needed the same exception, so the lint job won't have an unexpected gap or unnecessary blind spot.
  • package.json / pnpm-lock.yaml specifiers are consistent (@biomejs/biome@2.5.12, husky@9.1.7, lint-staged@17.5.1, ultracite@7.12.0 all match between dependencies and the lockfile resolution).
  • ultracite@7.12.0's eslint: ^10.0.0 peer constraint is unmet by the repo's eslint@^9, but eslint is listed as an optional peer in ultracite's peerDependenciesMeta, and the repo has no .npmrc forcing strict-peer-dependencies, so pnpm install --frozen-lockfile won't fail on it — just a silent, non-fatal peer mismatch.

Non-blocking follow-up:

  • lint-staged@17.5.1 requires node >= 22.22.1 (per its engines field in the lockfile), but package.json sets no engines constraint and the new CI workflow pins node-version: "22" (unpinned patch). A contributor running an older Node 22.x locally will have the new Husky pre-commit hook fail outright when it shells out to lint-staged, blocking every commit with a version-mismatch error rather than a lint failure. Consider adding an engines.node field (or pinning node-version to a specific 22.x that satisfies >=22.22.1) so this fails fast and clearly at pnpm install time instead of at first commit.

Everything else — the three independent CI jobs (lint/typecheck/test), the next typegen && tsc --noEmit typecheck step, and the Husky/lint-staged wiring — looks correctly scoped to the PR's stated goal.

stylessh force-pushed the stylessh/add-ci-checks branch from 13564b4 to 0832cac2mo ago
stylessh force-pushed the stylessh/add-ci-checks branch from 0832cac to d8faa0c2mo ago
stylessh merged commit e213be8 into main2mo ago
Git branch
stylessh deleted stylessh/add-ci-checks branch2mo ago

Branch stylessh/add-ci-checks has been deleted.