Repository navigation
Replace ESLint with oxlint, add oxfmt, upgrade to TypeScript 7 - #54
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Same setup as CashScript/cashscript#480. typescript-eslint relies on TypeScript's JavaScript compiler API, which TypeScript 7 no longer ships, so it blocked the upgrade. - remove eslint, typescript-eslint, eslint-plugin-react-hooks, eslint-plugin-react-refresh and globals - add oxlint and oxfmt, pinned to exact versions (oxfmt is pre-1.0) - .oxlintrc.json keeps the existing rules (rules-of-hooks, exhaustive-deps, only-export-components) with the correctness category off, like #480 - .oxfmtrc.json uses the same options as the cashscript repo - add `format` and `format:check` scripts - TypeScript 6.0 → 7.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Output of `pnpm format` and nothing else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rkalis
approved these changes
Dec 3, 2026
This branch had an error being deployed
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.
Summary
Replaces ESLint with oxlint, adds oxfmt for formatting, and upgrades TypeScript to 7. This uses the same oxlint/oxfmt setup as CashScript/cashscript#480 (one patch version newer); the TypeScript 7 upgrade is specific to this PR. Stacked on #53; review and merge that first.
Why
typescript-eslintrelies on TypeScript's JavaScript compiler API, which TypeScript 7 (the Go-native compiler) no longer ships, so it only supportstypescript <6.1. Without ESLint, nothing holds TypeScript back.pnpm lintandpnpm formateach take about 0.05s (oxlint and oxfmt themselves report under 10ms).eslint,typescript-eslint,eslint-plugin-react-hooks,eslint-plugin-react-refresh,globals) are replaced by two pinned tools.Commits
oxlint1.96.0 andoxfmt0.81.0 (exact pins, since oxfmt is pre-1.0),.oxlintrc.json,.oxfmtrc.json, andpnpm format/pnpm format:check. TypeScript 6.0 → 7.0.pnpm formatand nothing else (34 files: the TypeScript sources plusREADME.md,index.html,package.json,tsconfig.json,pnpm-workspace.yaml,index.scssand the two oxc configs). In the example contracts only the semicolons after the closing backticks change; the contract sources inside the template strings are untouched. Best reviewed by re-running the command rather than reading the diff.What changes in enforcement
rules-of-hooks(error),exhaustive-deps(warn) andonly-export-components(warn,allowConstantExport). These are the only rules the ESLint config had, and oxlint has all three built in.only-export-componentsalso flags 5 helper exports insrc/components/shared/index.tsxthateslint-plugin-react-refreshdid not. They're real: they stop fast refresh from updating those components in place.correctnesscategory is turned off, as in #480. It reports 18 warnings on existing code (no-useless-escape,no-unused-vars,set-state-in-effect,no-wrapper-object-types, and twono-unsafe-optional-chaininghits inTransactionInputs.tsxthat look like real bugs). Worth enabling in a follow-up cleanup..oxfmtrc.jsonuses the same options as cashscript (printWidth: 125, single quotes, trailing commas).Notes for review
typescript@7package no longer shipstsserver, so VS Code's "Use Workspace Version" won't work. Editors use their bundled TypeScript, or the TypeScript native-preview extension for TS 7.format:checkandlintaren't enforced automatically.Verification
pnpm build(TypeScript 7 type-check + Vite build),pnpm lint(0 errors, 14 warnings) andpnpm format:checkpass"Wallets "→"Wallets", " ", and" ", "("→" ("). The rendered text is the same. The production (minified) CSS is byte-identical; reformattingindex.scssandindex.htmlonly changes whitespace and the<!doctype html>casing.pnpm formaton commit 1 reproduces commit 2 exactly🤖 Generated with Claude Code