chore: replace Biome with oxlint, oxfmt and Knip - #39
Open
Thomasims wants to merge 5 commits into
Open
Conversation
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 moduleResolution moves off the removed node10 to node16 and baseUrl gives way to rootDir. Breaks the index -> middlewares/cors -> index cycle by moving the module config state into its own file, and drops an unused exported type.
Under module=node16 tsc stops downlevelling `await import(...)` and emits a native ESM dynamic import, which bypasses the CJS resolver detour the ajs runtime installs and loads interface packages twice. tsgolint only rejects the explicit, removed node10 `moduleResolution` option, so dropping the field and leaving module=commonjs alone satisfies type-aware linting while keeping the emit byte-compatible.
Thomasims
marked this pull request as draft
September 7, 2026 10:36
Thomasims
marked this pull request as ready for review
September 7, 2026 16:10
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 free
to 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.
Moves the repository onto the shared
@antelopejs/tooling-configspresets: oxlint with the vendored anti-slop rules, oxfmt for formatting, and Knip for dead code.Tooling
biome.jsonand@biomejs/biomeare gone, replaced byoxlint.config.ts,oxfmt.config.tsandknip.config.ts.lint,lint:fixandformatpoint at the new tools, andformat:checkandknipare new.tsconfig
Type-aware linting runs through tsgolint, which rejects
moduleResolution: "node"because TypeScript 7 removes the node10 resolver. Only the explicit option is rejected, so the field is simply dropped andmodule: "commonjs"is left alone — the emit stays byte-compatible.Raising
moduletonode16was tried first and is not safe here: tsc then stops downlevellingawait import(...)and emits a native ESM dynamic import, which bypasses the CommonJS resolver detour theajsruntime installs and loads interface packages twice.baseUrlgives way to an explicitrootDir.Code changes the linter asked for
import/no-cycle:index.ts→middlewares/cors.ts→index.ts. The module config state moves intosrc/module-config.ts, which both import;index.tsre-exportsconfigure,getConfigandsetCorsConfigso the public surface is unchanged.promise/no-callback-in-promiseincontinueExecutionis a deliberate continuation-passing helper that keeps the synchronous fast path allocation-free, so it carries a targeted disable with that reason rather than a rewrite.oxlint --fix.IdentifiableRouteCallbackwas exported but only used insideserver.ts; Knip caught it and it is now file-local.The 28 remaining findings are warnings the preset raises deliberately (complexity thresholds and anti-slop) and do not fail the build. They are a backlog to work through, not a gate.
Knip
reflect-metadataand@types/mochaare recorded as ignored with the reason:emitDecoratorMetadatamakes tsc emitReflect.metadatacalls that need the polyfill at runtime even though nothing imports it, and@types/mochasupplies the globals for the suitesajs module testruns.ajsitself is ignored because CI installs@antelopejs/coreglobally.Verification
pnpm build,pnpm lintandpnpm knipare clean.pnpm testis 174 passing / 0 failing — identical to untouchedmain, verified by building and running the suite from anorigin/mainworktree.The formatting pass is its own commit and is recorded in
.git-blame-ignore-revs.The
.github/ISSUE_TEMPLATE/**entry inoxfmt.config.tsis temporary and can be dropped once AntelopeJS/tooling-configs#5 ships.