Skip to content

chore: replace Biome with oxlint, oxfmt and Knip - #7

Open
Thomasims wants to merge 4 commits into
mainfrom
chore/oxc-tooling
Open

chore: replace Biome with oxlint, oxfmt and Knip#7
Thomasims wants to merge 4 commits into
mainfrom
chore/oxc-tooling

Conversation

@Thomasims

@Thomasims Thomasims commented Sep 7, 2026

Copy link
Copy Markdown

Replaces @biomejs/biome with the shared @antelopejs/tooling-configs presets: oxlint (type-aware, via oxlint-tsgolint) for linting, oxfmt for formatting, and Knip for dead-code and dependency analysis.

Tooling swap

  • biome.json deleted, @biomejs/biome removed.
  • Added oxlint.config.ts, oxfmt.config.ts, knip.config.ts, each extending the shared preset with no repo-specific overrides — this repo needed none.
  • oxlint is pinned to exactly 1.81.0 — the JS plugin API is alpha and has to match the version tooling-configs builds against.
  • Scripts: lintoxlint, lint:fixoxlint --fix, formatoxfmt ., format:checkoxfmt --check ., plus a new knip. .github/workflows/ci.yml gains pnpm format:check and pnpm knip steps next to the existing pnpm lint, in a separate ci: commit. This package has no test suite, so there is no pnpm test step.
  • oxfmt.config.ts carries a temporary .github/ISSUE_TEMPLATE/** ignore — those are Markdown templates with a .yml extension that oxfmt cannot parse. It goes away with tooling-configs#5.

tsconfig

Type-aware linting runs tsgolint, which rejects options TypeScript 7 removed and auto-discovers each file's tsconfig.json (so pointing it at a separate config does not help). One change: "moduleResolution": "node" is deleted. tsgolint only rejects the explicit removed node10 value, so dropping the field satisfies it while the emit stays byte-compatible.

"module": "commonjs" is deliberately left alone. Raising it to node16 looks like the tidier fix and is a runtime break: tsc then stops downlevelling await import(...) and emits a native ESM dynamic import, which bypasses the CommonJS resolver detour the ajs runtime installs. There was no baseUrl to remove and rootDir was already set, so this is the whole tsconfig diff.

What the linter forced

Nothing. pnpm lint reports zero errors and zero warnings across the single source file, and oxlint --fix had no import order to correct. Nothing is disabled anywhere in the repo — there are no oxlint-disable comments in this PR.

What Knip needed

Nothing. No unused files, exports or dependencies, and no ignore entries were required, so knip.config.ts is the bare preset. pnpm knip exits 0 (the remaining "configuration hints" are preset globs — nuxt-layer/**, playground/**, scripts/** — that simply do not match this repo).

Worth stating explicitly for an interface package: Knip flagged no exported symbol as unused, so nothing was deleted on its advice. RunQuery and the re-exported r are the published contract. Note the scope of that check: src/index.ts is this repo's only source file and it is Knip's entry point, so Knip does not evaluate its exports at all — by design, since an interface's entry exports are the contract. Knip does catch unused files and unused exports in any non-entry module (verified with a planted dead export); there simply are none here.

Verification

The public surface of a versioned interface must not move, so it was checked against a build from an untouched origin/main worktree:

  • package.json exports declares . and ./package.json. The runtime export keys of . are identical: RunQuery and r.
  • The entire dist tree is byte-identical to the origin/main build — index.js, index.d.ts and the source map — both before and after the oxfmt pass.
  • pnpm lint, pnpm knip and pnpm format:check all exit 0.

Test baseline: this package has no test suite. There is no test script and no antelopeJs.test entry on origin/main, and CI does not run one. So there is no pass/fail to compare — the verification above rests on the byte-identical build, not on tests.

The oxfmt pass is a separate commit recorded in .git-blame-ignore-revs to keep git blame readable. It normalizes package.json key order and reflows Markdown code blocks in AGENTS.md, CHANGELOG.md and docs/; no source file changed.

Swaps @biomejs/biome for the shared @antelopejs/tooling-configs presets:
oxlint (type-aware, via oxlint-tsgolint) for linting, oxfmt for formatting
and Knip for dead-code and dependency analysis. The lint / format scripts
are repointed and a `knip` script is added; CI already runs `pnpm lint`.

tsconfig: tsgolint rejects the `moduleResolution: "node"` (node10) value
TypeScript 7 removed, and it discovers each file's tsconfig itself, so the
field is dropped rather than raised — `module: "commonjs"` is untouched so
the emit stays byte-compatible. There was no `baseUrl` to remove and
`rootDir` was already set.

The linter forced no changes at all: `pnpm lint` reports zero errors and
zero warnings on the single source file, nothing is disabled, and
`pnpm knip` reports no unused files, exports or dependencies.

Verified: the whole of dist is byte-identical to the origin/main build and
the runtime export keys of the `.` subpath match (RunQuery, r). This
package has no test suite — `ajs module test` is not wired up here and
there is no `test` script on origin/main either — so there is no test
result to compare.
@Thomasims
Thomasims marked this pull request as ready for review September 7, 2026 16:10
Sign up for free to 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.

1 participant