Skip to content

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

Merged
Upd4ting merged 4 commits into
mainfrom
chore/oxc-tooling
Sep 11, 2026
Merged

Upd4ting merged 4 commits into
mainfrom
chore/oxc-tooling

Conversation

@Thomasims

Copy link
Copy Markdown
Contributor

Replaces Biome with the shared @antelopejs/tooling-configs presets: oxlint
(type-aware, with the vendored anti-slop rules), oxfmt for formatting and Knip
for dead-code detection. oxlint is pinned to 1.81.0 because the JS plugin API
is still alpha and has to match the version tooling-configs builds against.

tsconfig

Type-aware linting runs through tsgolint, which rejects options TypeScript 7
removed, so moduleResolution: "node" and baseUrl are gone and the
self-referential @antelopejs/interface-api-util path mapping the test suite
uses is now written relative (./src/index.ts), which is what the compiler
wants once baseUrl is absent.

module stays commonjs on purpose. Raising it to node16 would look like the
tidier fix and is a runtime break: tsc stops downlevelling dynamic imports and
emits native ESM ones, which bypass the CommonJS resolver detour the ajs
runtime installs.

pnpm build succeeds with no source change.

Code changes the linter forced

Only import ordering, applied by oxlint --fix
(perfectionist(sort-imports)) in src/rate-limit.ts and
src/tests/rate-limit.test.ts. Nothing was disabled, and no public export was
touched: this package is a versioned contract, so its surface is deliberately
unchanged.

pnpm lint exits 0.

Knip

The suites live in src/tests/ and src/antelope.test.ts is read by
ajs module test from package.json#antelopeJs.test; the preset only knows the
src/test/ spelling, so both are declared as entry points. Without that, Knip
reads the whole suite as dead code. ajs itself is ignored as a binary because
CI installs @antelopejs/core globally instead of adding the CLI to every
package.

Nothing was deleted. Knip reports no unused files, exports or dependencies.

Verification

pnpm build, pnpm lint, pnpm knip, pnpm format:check all exit 0.
pnpm test: 19 passing, identical to the baseline measured on an untouched
main worktree.

The oxfmt pass is a separate commit and is recorded in .git-blame-ignore-revs
so git blame stays readable. It also normalizes Markdown, YAML and the
package.json key order, which accounts for most of the diff.

Adopts the shared @antelopejs/tooling-configs presets: oxlint with the
vendored anti-slop rules, oxfmt for formatting and Knip for dead code.

Type-aware linting needs a tsconfig tsgolint accepts, so the removed
moduleResolution node10 and baseUrl options go away and the self-referential
path mapping the tests use becomes relative. The module stays on commonjs so
the emit keeps using require, which is what the AntelopeJS resolver hooks.

Knip needs the suites declared as entry points: they live under src/tests and
are run from the compiled output by `ajs module test`, which the preset's
src/test glob does not match. No export changes: this package is a contract,
so its surface is reachable only from consumers Knip cannot see.
@Thomasims
Thomasims marked this pull request as draft September 7, 2026 10:37
@Thomasims
Thomasims marked this pull request as ready for review September 7, 2026 16:10
@Upd4ting
Upd4ting merged commit 0e8ce13 into main Sep 11, 2026
2 checks passed
@Upd4ting
Upd4ting deleted the chore/oxc-tooling branch September 11, 2026 19:29
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.

2 participants