Skip to content

chore: bump typescript to v7 and migrate to oxlint and oxfmt - #289

Merged
pavelzw merged 3 commits into
mainfrom
oxc-migration
Oct 1, 2026
Merged

pavelzw merged 3 commits into
mainfrom
oxc-migration

Conversation

@pavelzw

@pavelzw pavelzw commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Bumps TypeScript to v7 and replaces ESLint/typescript-eslint and Prettier with oxlint and oxfmt.

typescript-eslint doesn't support TS 7 yet (it needs the TS 7.1 JS API, see typescript-eslint/typescript-eslint#10940), which is why #288 stayed on TS 6. oxlint's type-aware linting runs on tsgolint (typescript-go) and actually requires TS 7.

  • oxlint (.oxlintrc.json): oxlint's correctness category plus a few rules we relied on before (no-unsafe-*, no-explicit-any, prefer-nullish-coalescing, no-unused-vars with ^_ args). Type-aware linting and type checking (typeCheck) are enabled, so lint also runs a full TS 7 typecheck. This is intentionally lighter than the old strictTypeChecked + stylisticTypeChecked presets.
  • oxfmt (.oxfmtrc.json): migrated from the Prettier config via oxfmt --migrate=prettier; TOML files are ignored to keep the same scope Prettier had.
  • Scripts: lint / fmt apply fixes, lint:check / fmt:check only check; CI runs the :check variants as separate steps.
  • eslint-disable comments renamed to oxlint-disable (two that became unused were removed).
  • Fixed a TS 7 type error in sha256 (BinaryLike includes ArrayBuffer, which hash.update doesn't accept).
  • .vscode/settings.json now uses the oxc extension as formatter.

dist/ is unchanged (tsup builds with esbuild).

- replace eslint + typescript-eslint with oxlint (type-aware via oxlint-tsgolint, with type checking)
- replace prettier with oxfmt
- port the strictTypeChecked + stylisticTypeChecked + eslint recommended rule set
- fix sha256 parameter type flagged by TS 7
@pavelzw
pavelzw merged commit 5fdf4c6 into main Oct 1, 2026
190 checks passed
@pavelzw
pavelzw deleted the oxc-migration branch October 1, 2026 10:31
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