Skip to content

Adopt Vite+ toolchain with vendored anti-slop lint rules - #322

Merged
dodeja merged 6 commits into
mainfrom
cursor/adopt-vite-plus-anti-slop-9fba
Aug 15, 2026
Merged

Adopt Vite+ toolchain with vendored anti-slop lint rules#322
dodeja merged 6 commits into
mainfrom
cursor/adopt-vite-plus-anti-slop-9fba

Conversation

@dodeja

@dodejadodeja commented Aug 15, 2026

Copy link
Copy Markdown
Member

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

  • Single root vite.config.ts owns all formatting and lint configuration. Vite+ resolves only the root config in a monorepo, so no workspace-level vite.config.ts files exist (per-package variation would go through fmt.overrides/lint.overrides). The old .oxlintrc.json/.oxfmtrc.json files are removed.
  • Formatting stays at the repo's established 80-column width; all packages plus the api/ gateway are converged (vp fmt --check passes everywhere, and every package's lint script includes the format check).
  • Test imports moved from vitest to vite-plus/test; the root package.json documents-in-config the coupled versions (vite alias override → @voidzero-dev/vite-plus-core, exact vitest pin, @oxlint/plugins) and AGENTS.md records that they move in lockstep with vite-plus.
  • Root tsconfig.json moved to NodeNext module resolution (required for vite-plus/test types).

anti-slop rules

  • Vendored at tools/oxlint/anti-slop/ with LICENSE and a README pinning the upstream revision and listing local modifications (one: no-module-mocking also recognizes vi from vite-plus/test).
  • 5 rules enforced as errors (clean baseline): no-object-parameters, no-reflect-apply, no-reflect-get, no-unknown-type-aliases, no-widen-then-assert.
  • 10 rules baselined as warnings (~870 pre-existing findings) for incremental cleanup; each gets promoted to error when its count reaches zero.

CI

  • The SDK matrix job is now uniform: standalone lockfile, build/type-check/test on Node 20/22/24.
  • A separate sdk-tooling job on Node 24 owns the workspace install, docs freshness check, and Vite+ lint.
  • The mcp job additionally lints the public-facing api/ 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 and api/), npx tsc --noEmit -p tsconfig.json — all pass.
  • npm test — 277 passed, 1 skipped.
  • Verified empirically that deleting the workspace configs changes nothing (vp lint/vp fmt resolve only the root config) and that sdks/typescript-sdk/src/generated/** remains ignored when linting from inside the workspace.
  • Frozen-install dry runs pass for both the root and standalone SDK lockfiles.
Open in WebOpen in Cursor

View with [code]smithAutofix with [code]smith
Need help on this PR? Tag @codesmith-bot with 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.

  • Updates workspace scripts, test imports, TypeScript module resolution, dependency pins, and lockfiles.
  • Reorganizes CI to separate standalone SDK compatibility testing from workspace tooling and documentation checks.
  • Applies formatting-only updates across the MCP gateway, server, CLI, and SDK test suites.

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

FilenameOverview
vite.config.tsCentralizes formatting, ignore patterns, Vite+ lint rules, and vendored anti-slop plugin configuration without an identified coverage gap.
package.jsonAdds Vite+ scripts and coupled dependency overrides while preserving workspace build, test, and type-check entry points.
.github/workflows/ci.ymlSeparates standalone SDK compatibility checks from workspace tooling and retains build, test, lint, and generated-document verification.
tsconfig.jsonMoves the root API/MCP type-check configuration to NodeNext to resolve the new Vite+ test type imports.
tools/oxlint/anti-slop/index.tsRegisters the vendored anti-slop rules consumed by the centralized Vite+ lint configuration.
sdks/typescript-sdk/package.jsonReplaces direct Vitest/Oxlint/Oxfmt commands with Vite+ while retaining standalone test and coverage dependencies.
packages/mcp/package.jsonMigrates MCP tests, evals, linting, and formatting to Vite+ with no concrete command failure identified.

Reviews (1): Last reviewed commit: "docs: record vendored anti-slop patch an..." | Re-trigger Greptile

Context used (5)

Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
@vercel

vercelBot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
apiReadyReadyPreviewAug 15, 2026 4:19am

Request Review

Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
cursoragentand others added 3 commits August 15, 2026 01:29
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>
@cursorcursorBot changed the title chore: adopt Vite+ and anti-slop toolingAdopt Vite+ toolchain with vendored anti-slop lint rulesAug 15, 2026
@dodeja
dodeja marked this pull request as ready for review August 15, 2026 04:11
@cursor
cursorBot requested a review from SylvainGravejatAugust 15, 2026 04:13

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 33 to +37
"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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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>
@dodeja
dodeja merged commit d935609 into mainAug 15, 2026
14 checks passed
claudeBot pushed a commit that referenced this pull request Aug 15, 2026
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.
Sign up for freeto 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.

2 participants

@dodeja@cursoragent