Uh oh!
There was an error while loading. Please reload this page.
chore(repo): move oxlint and oxfmt to native root configs - #6311
Merged
jgoux merged 7 commits intoAug 25, 2026
Conversation
Preparation for enabling `oxlint --type-aware` repo-wide: fix the findings from the valuable type-aware rules (no-floating-promises, no-base-to-string, no-redundant-type-constituents, no-useless-default-assignment, no-duplicate-type-constituents, require-array-sort-compare), modernize tools/nx-plugins/tsconfig.json for TypeScript 7 (tsgolint rejects the removed node10 module resolution), and replace the Function-constructor dynamic import in test.plugin.ts with a plain import() (Node 24 runs the plugins with native type stripping, so the transpile workaround is obsolete). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mechanical one-time pass from `oxfmt` at the repo root, covering files that the per-package targets never reached: docs markdown, workflow YAML, root and binary-wrapper package manifests, apps/docs, and tools/release. Generated docs outputs (apps/docs/public, apps/docs/content/docs/commands) are excluded to stay byte-identical with their generator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the per-package nx-inferred lint/format targets with tool-native configuration at the repo root, so oxlint and oxfmt work standalone (`pnpm exec oxlint`, `pnpm exec oxfmt`) and the oxc VSCode extension sees the same rules CI enforces: - Add root `.oxlintrc.json` (type-aware linting via `options.typeAware`, ignores, Effect-idiom rule exclusions, a legacy-scoped `no-base-to-string` override) and `.oxfmtrc.json` (ignores, replacing apps/cli-e2e/.prettierignore). Type-aware linting is now repo-wide instead of packages/api-only; the whole-repo run takes ~3.5s. - Declare `lint:check`/`lint:fix`/`fmt:check`/`fmt:fix` as plain, uncached command targets on the `@supabase/root` project and delete oxlint.plugin.ts and oxfmt.plugin.ts. `pnpm check:all`/`fix:all` are unchanged; each package's `check:all`/`fix:all` adds `@supabase/root` to its `--projects` list so the repo-wide lint/format checks run alongside the package-scoped ones. - Drop the oxfmt/oxlint/oxlint-tsgolint devDependencies, knip ignores, and the `oxlint.typeAware` package.json channel from every package — the tools are root devDependencies only. - Update CONTRIBUTING, AGENTS.md, docs/nx-inference-plugins.md, and api-package-sync.yml. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…epo-task-runner-alternatives-bb6b48 # Conflicts: # CONTRIBUTING.md # apps/cli/package.json # docs/adr/0013-live-e2e-bypasses-replay-server.md # docs/adr/README.md
kanadgupta
marked this pull request as ready for review
August 24, 2026 14:59
Contributor
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@7b8a1b205f7cb7526e266a342fa2a4a86784f2d5Preview package for commit |
avallete
approved these changes
Aug 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
jgoux
deleted the
kanad-claude/monorepo-task-runner-alternatives-bb6b48
branch
August 25, 2026 08:49
Coly010 added a commit
that referenced
this pull request
Aug 25, 2026
…nitialized CI never hits this (fresh clones leave submodules uninitialized), but any local tree after `pnpm repos:install` fails the new root targets from #6311/#6312: oxlint's nested-config discovery loads .repos/effect/.oxlintrc.json and dies on its uninstalled JS plugin (ignorePatterns does not gate config discovery — this repo is single-root-config by design, so disable nested configs), and knip reports ~1.1k .repos files as unused (submodule contents are invisible to git status but not to knip's project glob).
pullBot
pushed a commit
to chizee/cli
that referenced
this pull request
Aug 25, 2026
## What Stacked on supabase#6311. Applies the same exercise to knip: replaces the per-package nx-inferred knip targets with knip's native monorepo support, so `pnpm exec knip-bun` from the repo root just works and knip gains cross-workspace awareness. ## Why Same rationale as supabase#6311 — knip configuration lived in per-package `package.json` `knip` objects wired together by an nx plugin, and per-package runs couldn't see across workspace boundaries. The root run immediately proved the point: knip itself flagged ~15 pieces of now-dead config that the per-package setup required, including every `ignoreBinaries: ["nx"]` entry (per-package runs couldn't resolve the root `nx` devDependency; a root run can), four stale `ignoreDependencies` in `apps/cli`, and `packages/api` entry patterns its own package.json `exports` already imply. `packages/config` needs no knip config at all anymore. ## Key changes - Root `knip.json` using the `workspaces` map, absorbing each package's former `knip` object; the `--exclude catalogReferences` CLI flag moves into the config (`exclude`). - New root-workspace surface configured explicitly: `.github/scripts` and `tools/release` as entries, `apps/cli-go/**` ignored, `verdaccio`/`go` ignored (referenced via spawn paths knip cannot trace), and `apps/docs`'s `mdx-components.tsx` convention entry. - `knip:check`/`knip:fix` are plain command targets on `@supabase/root`; `knip.plugin.ts` is deleted; the `knip` devDependency and config object are removed from every package (root devDependency only). - `docs/nx-inference-plugins.md` now documents only the remaining typescript/test/go plugins. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Julien Goux <hi@jgoux.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the per-package nx-inferred lint/format targets with tool-native configuration at the repo root, so oxlint and oxfmt work standalone (
pnpm exec oxlint,pnpm exec oxfmt) and the oxc VSCode extension sees the exact rules CI enforces.Three commits, meant to be reviewed separately:
chore: fix type-aware oxlint findings across the monorepo— the ~30 findings that block enabling type-aware linting repo-wide (no-floating-promises,no-base-to-string, redundant union constituents,= undefinedoptional params, …), plus two TS7 modernizations tsgolint forced intools/nx-plugins(dropnode10module resolution; replace theFunction('return import(...)')transpile workaround with a plainimport(), obsolete under Node 24 type stripping).chore: format the full repo surface with oxfmt— mechanical one-time pass over surface the per-package targets never covered: docs markdown, workflow YAML, root/wrapper manifests,tools/,apps/docs. Generated docs outputs are excluded so they stay byte-identical with their generator.chore: move oxlint and oxfmt to native root configs— the actual restructuring (details below).Why
--deny-warnings,--type-awarevia a package.json side-channel) where only nx could see it; the oxlint VSCode extension had no config to discover at all.packages/apionly. Repo-wide it costs ~3.5s and immediately caught real issues (e.g. floating promises) — it is now on everywhere viaoptions.typeAware/options.denyWarningsin.oxlintrc.json.Key changes
.oxlintrc.json: type-aware + deny-warnings, ignore list (.repos,apps/cli-go, fixtures, generated output), Effect-idiom rule exclusions (no-misused-spread,unbound-method— both false-positive onData.Classcopy-with-update and.pipe(sem.withPermit)patterns), and a legacy-scopedno-base-to-stringoverride..oxfmtrc.json: ignore list only (style defaults unchanged); replacesapps/cli-e2e/.prettierignore, which only worked when oxfmt ran from that cwd.lint:*/fmt:*are now plain command targets on@supabase/root(declared in the root package.jsonnxfield);oxlint.plugin.tsandoxfmt.plugin.tsare deleted. Rootpnpm check:all/fix:alland CI entrypoints are unchanged; per-packagecheck:all/fix:alladd@supabase/rootto their--projectslist.oxlint.typeAwarepackage.json channel are removed from every package — the tools are root devDependencies only.tools/,apps/docs, root scripts, docs markdown, and workflow YAML.🤖 Generated with Claude Code