chore: adopt oxfmt and oxlint incrementally - #4722
Conversation
📝 No Changeset FoundThis PR doesn't include a changeset. A changeset is required to release a new version. How to add a changesetRun this command and follow the prompts: pnpm changesetRemember: Never use |
|
Replay incident risk checkThis diff touches code involved in past incidents. This is a heads-up, not a verdict: read the matched sections of INCIDENTS.md and answer their review questions before merging. For a judgment on whether this diff has the same failure mode, run the |
posthog-node Compliance ReportDate: 2026-09-01 17:28:38 UTC ✅ All Tests Passed!111/111 tests passed Capture_V1 Tests✅ 94/94 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
posthog-js Compliance ReportDate: 2026-09-01 17:37:42 UTC ✅ All Tests Passed!26/26 tests passed Capture Tests✅ 26/26 tests passed View Details
|
|
Reviews (1): Last reviewed commit: "chore: split oxfmt formatting into stack..." | Re-trigger Greptile |
|
Size Change: +8 B (0%) Total Size: 20.8 MB 📦 View Changed
ℹ️ View Unchanged
|
Problem
The workspace uses Prettier for formatting and ESLint for every lint check. Other PostHog SDK repositories already use Oxfmt and Oxlint. We want to adopt the same tools here without dropping repository-specific lint coverage.
Changes
format:fix, the browser package, the MCP package, and the playground lint command.eslint-plugin-posthog-jsrules and plugin rules that do not yet have validated Oxlint equivalents.This is an incremental Oxlint adoption, not a complete ESLint replacement. Fully removing ESLint will require porting or validating the remaining custom, compatibility, React, Jest, and TypeScript rules first. Follow-up migrations can remove ESLint once that rule coverage is equivalent.
No CI workflow changes are needed. The shared setup action runs
pnpm install --frozen-lockfile, which installs Oxfmt, Oxlint, and their Linux bindings from the root development dependencies before the lint job runs.Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Pi Coding Agent implemented the migration in a dedicated worktree. The migration keeps ESLint where Oxlint does not yet provide equivalent validated coverage. The final branch passed the frozen lockfile install, full lint, full build, playground lint, and an isolated autoreview.