Skip to content

build: pin the type-aware lint backend in vite.config.ts and configure Pi for the repo - #755

Open
ian-pascoe wants to merge 2 commits into
mainfrom
tsrs-lint-for-agents
Open

ian-pascoe wants to merge 2 commits into
mainfrom
tsrs-lint-for-agents

Conversation

@ian-pascoe

Copy link
Copy Markdown
Owner

Summary

any Vite+ lint (vp lint · vp check · vp staged · vp lint --lsp)
  loads root vite.config.ts
    OXLINT_TSGOLINT_PATH = <this checkout>/tools/tsrs-lint-shim/bin/tsgolint.js   ← now always, was: only if unset
  oxlint → shim → tsrs --lint headless (this checkout's tsrs)

.pi/settings.json (new; replaces the owner's global defs for this repo)
  formatter oxfmt   → pnpm exec vp fmt                       root: pnpm-workspace.yaml
  lsp oxlint        → pnpm exec vp lint --lsp                root: pnpm-workspace.yaml
  lsp typescript    → pnpm exec effect-tsgo tsrs --lsp       root: package tsconfig.json

Docs: ADR-0055 → Consequences, the shim's header, dependencies.md's upgrade check (also lint with the variable set to a missing file). Same fix as ian-pascoe/pi-extensions#553.

Evidence

  • Before: an agent's inherited OXLINT_TSGOLINT_PATH=/nonexistent/tsgolint → vp lint fails: Failed to find tsgolint executable. Inherited pi-extensions' tsrs-lint → lint ran on pi-extensions' tsrs.
  • After: unset, missing file, or another checkout's path: vp lint on a probe reports typescript(TS2322) and no-floating-promises, and the process tree shows node …/cloudpid/tools/tsrs-lint-shim/bin/tsgolint.js headless → tsrs --lint headless. OXLINT_TSGOLINT_PATH=/nonexistent vp check vite.config.ts … passes. Both language-server commands answer initialize.

Merge Danger

Door: two-way

Blast Radius: tooling

A shell can no longer choose the lint backend through OXLINT_TSGOLINT_PATH. Pi picks up .pi/settings.json after /reload, in trusted projects only.

Plan

Port pi-extensions 4da05d7 to cloudpid: assign the lint backend in the root vite.config.ts (to the existing shim), add a project .pi/settings.json running the formatter and language servers through pnpm exec (the project's own vp, and the typecheck's Effect-patched tsrs), and document it.

…e Pi for the repo

Vite+ sets OXLINT_TSGOLINT_PATH only when it is unset, so agents and
worktrees that inherited another checkout's (or a stale) value linted on
another tsrs or failed. The root vite.config.ts now assigns it to the
tsrs-lint shim. .pi/settings.json runs Pi's formatter and language
servers on the project's vp and Effect-patched tsrs.
@ian-pascoe

Copy link
Copy Markdown
Owner Author

Review report — head 510bf56

Reviewed git diff origin/main...510bf561 (Standards and Spec reviewers in parallel; 510bf56 is a one-sentence docs fix on top of the reviewed 3d172e6, reviewed by the author).

Spec: matches the plan. No missing requirements, no scope creep. Fixed: the Windows wording in ADR-0055 and dependencies.md now says oxlint cannot start the .js the variable names.

Standards: no hard violations. Advisory, not taken:

  • "Pi" capitalised / "owner's global definitions" in ADR-0055: kept; Pi is the harness's name, and the owner is the same person.
  • .pi/settings.json bullet in an ADR rather than a dev doc: kept next to the lint-backend rationale it depends on.
  • The "set only when unset" rationale appears in config, shim, ADR and dependencies.md: each is the place a reader of that file needs it.
  • process.env side effect in the config: deliberate, as in pi-extensions#553; only oxlint reads the variable.
  • Formatter extension list: copied from pi-extensions; vp fmt skips unmatched files anyway.
  • Repo root has no tsconfig.json, so root vite.config.ts gets no TypeScript server: same as the typecheck, which doesn't cover it.

@github-actions

Copy link
Copy Markdown

Preview deployed

URL: https://cloudpid-server-pr-755.ian-g-pascoe.workers.dev

Built from 06f4122 (stage pr-755, behind Access). It is destroyed when the
pull request is closed.


This comment updates on each push.

This branch is being deployed

1 in progress deployment
preview — 510bf561 Deployed Nov 13, 2026 by ian-pascoe via Preview #1395
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