| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
release channels | 8 个月前 | |
chore(repo): move oxlint and oxfmt to native root configs (#6311) ## 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: 1. **`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, `= undefined` optional params, …), plus two TS7 modernizations tsgolint forced in `tools/nx-plugins` (drop `node10` module resolution; replace the `Function('return import(...)')` transpile workaround with a plain `import()`, obsolete under Node 24 type stripping). 2. **`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. 3. **`chore: move oxlint and oxfmt to native root configs`** — the actual restructuring (details below). ## Why - Tool configuration lived in nx plugin code (`--deny-warnings`, `--type-aware` via a package.json side-channel) where only nx could see it; the oxlint VSCode extension had no config to discover at all. - Type-aware linting was scoped to `packages/api` only. Repo-wide it costs ~3.5s and immediately caught real issues (e.g. floating promises) — it is now on everywhere via `options.typeAware`/`options.denyWarnings` in `.oxlintrc.json`. - Spawning 7 per-package processes through nx for millisecond-fast Rust tools cost more than one whole-repo pass (~1s fmt, ~3.5s type-aware lint). ## Key changes - Root `.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 on `Data.Class` copy-with-update and `.pipe(sem.withPermit)` patterns), and a legacy-scoped `no-base-to-string` override. - Root `.oxfmtrc.json`: ignore list only (style defaults unchanged); replaces `apps/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.json `nx` field); `oxlint.plugin.ts` and `oxfmt.plugin.ts` are deleted. Root `pnpm check:all`/`fix:all` and CI entrypoints are unchanged; per-package `check:all`/`fix:all` add `@supabase/root` to their `--projects` list. - The oxc devDependencies, knip ignores for them, and the `oxlint.typeAware` package.json channel are removed from every package — the tools are root devDependencies only. - Lint/format now also cover previously unchecked surface: `tools/`, `apps/docs`, root scripts, docs markdown, and workflow YAML. 🤖 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> | 2 个月前 |