Uh oh!
There was an error while loading. Please reload this page.
Adopt Vite+ toolchain with vendored anti-slop lint rules - #322
Conversation
Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
Vite+ resolves only the root vite.config.ts in a monorepo, so the three workspace-level configs were never loaded (and were invalid if loaded: '..' is not supported in ignorePatterns). Delete them, restore the repo's printWidth 80 in the root config, reformat all packages plus the api/ gateway to converge, add fmt --check to the MCP lint script, and wire api/ into root lint:api/format/check scripts. Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
The sdk job mixed two install regimes behind matrix conditionals. Now the matrix job uniformly uses the standalone SDK lockfile on Node 20/22/24, and a separate sdk-tooling job on Node 24 owns the workspace install, docs freshness check, and Vite+ lint. The mcp job also lints the api/ gateway via the new root lint:api script. Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
Document the local vite-plus/test patch in the vendored README (and at the patch site) so re-vendoring does not silently drop it, and note in AGENTS.md that the vite override alias, vitest pin, coverage package, and @oxlint/plugins must move in lockstep with vite-plus. Also document that workspace-level vite.config.ts files are ignored by Vite+. Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:48f4323e3d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "devDependencies": { | ||
| "@types/node": "^24.10.13", | ||
| "oxfmt": "^0.55.0", | ||
| "oxlint": "^1.70.0", | ||
| "tsx": "^4.22.4", | ||
| "typescript": "^5.6.3", | ||
| "vitest": "^4.1.1" | ||
| "vite-plus": "0.2.9" |
There was a problem hiding this comment.
Add the matching coverage provider to the MCP workspace
The MCP CI step runs this Vite+ test command with --coverage, but this workspace no longer declares @vitest/coverage-v8. The generated root lockfile has the provider only under the SDK and CLI workspace directories—not at the root or under packages/mcp—so Vitest cannot resolve the configured v8 provider and the MCP job fails before running its coverage suite. Add the matching 4.1.10 provider here, as was done for the other test workspaces.
AGENTS.md reference: AGENTS.md:L70-L70
Useful? React with 👍 / 👎.
CI's mcp job runs 'vp test --run --coverage', but packages/mcp never declared @vitest/coverage-v8 — it previously resolved through a hoisted root copy that this PR's lockfile regeneration removed, so a fresh npm ci failed with MISSING DEPENDENCY. Pin it to 4.1.10 (lockstep with the vitest pin) and regenerate the root lockfile with npm 11, matching the npm that CI's setup-node provides. Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Resolves the lockfile conflict created by the Vite+ toolchain adoption on main (#322) and adapts the PostHog test file to the new test-import convention. Conflict resolution: - package-lock.json: took main's version wholesale and re-ran `npm install` under Node 24 / npm 11 (the versions CI uses) rather than hand-merging. The result is 33 insertions and 0 deletions against main, covering only the @posthog/mcp, @posthog/core and @posthog/types entries plus the two packages/mcp manifest lines. posthog-node stays deduped at the single 5.17.2 copy that @mintlify/cli pins, so the ^5.0.0 range in packages/mcp/package.json is preserved and type identity holds. - packages/mcp/src/posthog.test.ts: main's toolchain change swept every test file from `vitest` to `vite-plus/test`, and the new lint gate (`vp lint src`) now errors on the old specifier. This branch's test file was added after that sweep, so it is adapted to the new convention. api/mcp.ts, packages/mcp/package.json and packages/mcp/src/server.ts all auto-merged cleanly with both sides' intent intact.
Summary
Migrates the monorepo's development toolchain from standalone oxlint/oxfmt/vitest to Vite+ 0.2.9 and vendors the anti-slop Oxlint plugin to reject low-evidence TypeScript patterns.
Toolchain
vite.config.tsowns all formatting and lint configuration. Vite+ resolves only the root config in a monorepo, so no workspace-levelvite.config.tsfiles exist (per-package variation would go throughfmt.overrides/lint.overrides). The old.oxlintrc.json/.oxfmtrc.jsonfiles are removed.api/gateway are converged (vp fmt --checkpasses everywhere, and every package'slintscript includes the format check).vitesttovite-plus/test; the rootpackage.jsondocuments-in-config the coupled versions (vitealias override →@voidzero-dev/vite-plus-core, exactvitestpin,@oxlint/plugins) andAGENTS.mdrecords that they move in lockstep withvite-plus.tsconfig.jsonmoved toNodeNextmodule resolution (required forvite-plus/testtypes).anti-slop rules
tools/oxlint/anti-slop/with LICENSE and a README pinning the upstream revision and listing local modifications (one:no-module-mockingalso recognizesvifromvite-plus/test).no-object-parameters,no-reflect-apply,no-reflect-get,no-unknown-type-aliases,no-widen-then-assert.errorwhen its count reaches zero.CI
sdk-toolingjob on Node 24 owns the workspace install, docs freshness check, and Vite+ lint.mcpjob additionally lints the public-facingapi/gateway (npm run lint:api), which previously sat outside every lint/format script.Verification
npm run build,npm run check(lint + fmt + type-check for all workspaces andapi/),npx tsc --noEmit -p tsconfig.json— all pass.npm test— 277 passed, 1 skipped.vp lint/vp fmtresolve only the root config) and thatsdks/typescript-sdk/src/generated/**remains ignored when linting from inside the workspace.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Greptile Summary
Migrates development, test, lint, and formatting workflows from standalone Oxlint/Oxfmt/Vitest commands to Vite+, with a centralized root configuration and vendored anti-slop rules.
Confidence Score: 5/5
The PR appears safe to merge because no concrete blocking or independently actionable non-blocking defect was identified.
The migrated scripts, centralized configuration, package dependencies, CI coverage, documentation paths, and formatting-only application changes remain internally consistent.
Important Files Changed
Reviews (1): Last reviewed commit: "docs: record vendored anti-slop patch an..." | Re-trigger Greptile
Context used (5)
@terminal49/mcp)@terminal49/cli)