Skip to content

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

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

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

Conversation

@Thomasims

Copy link
Copy Markdown
Contributor

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

Tooling

biome.json and @biomejs/biome are gone, replaced by oxlint.config.ts, oxfmt.config.ts and knip.config.ts. lint, lint:fix and format point at the new tools, and format:check and knip are new.

tsconfig

Type-aware linting runs through tsgolint, which rejects options TypeScript 7 removes and auto-discovers each file's own tsconfig.json, so both the root and the playground config change. moduleResolution: "node" (node10) is removed in TS7 and goes; baseUrl gives way to an explicit rootDir. module deliberately stays on commonjs: under node16 TypeScript stops downlevelling await import(...) and emits a native ESM dynamic import, which does not go through the AntelopeJS CJS resolver detour. Leaving module alone and simply dropping moduleResolution satisfies tsgolint and keeps the emit byte-compatible, so type-aware linting is fully enabled.

Code changes the linter asked for

Nothing beyond the import ordering that oxlint --fix applies. The two remaining findings are anti-slop warnings (no-unknown-type-aliases on AuthPayload, no-object-parameters on jwt.ts) which the preset raises deliberately and which do not fail the build. They are backlog items, not a gate.

Knip

mocha was declared as a runtime dependency and nothing imports it — the mocha the suites run under comes from the test runner, not from this package. Removing it leaves pnpm test at 4 passing, so it goes.

chai, @types/chai and @types/mocha look equally unused from the source but are not removable: the auth conformance suite ships compiled inside @antelopejs/interface-auth and require("chai") out of this module's own node_modules. They are recorded in ignoreDependencies with that reason. ajs is ignored because CI installs @antelopejs/core globally rather than pulling the whole CLI into the dependency tree.

Verification

pnpm build, pnpm lint and pnpm knip are clean. pnpm test is 4 passing / 0 failing — identical to untouched main, measured in a throwaway worktree before any of this landed.

The formatting pass is its own commit and is recorded in .git-blame-ignore-revs.

The .github/ISSUE_TEMPLATE/** entry in oxfmt.config.ts is temporary and can be dropped once AntelopeJS/tooling-configs#5 ships.

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 option goes away and baseUrl gives way to rootDir,
in the playground as well. The module stays on commonjs so the emit keeps
using require, which is what the AntelopeJS resolver hooks.

Drops mocha, which was declared as a runtime dependency but is supplied by
the test runner.
@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
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