Repository navigation
chore: migrate to oxlint, oxfmt and typescript 7 - #1927
Merged
joshunrau merged 2 commits intoNov 19, 2026
Merged
Conversation
Replace ESLint with oxlint and Prettier with oxfmt, and move every workspace but apps/outreach from TypeScript 6 to the native TypeScript 7 compiler. Linting. The base rule set and the repo's custom rules move into the new packages/oxlint-config workspace; the custom rules run as an oxlint JS plugin named opendatacapture, so their ids change from odc/<rule> to opendatacapture/<rule>. The root oxlint.config.ts extends that config and holds the path-scoped overrides. typescript-eslint is dropped for oxlint's native typescript rules with oxlint-tsgolint; react, jsx-a11y, import and vitest rules are oxlint's own; perfectionist and eslint-plugin-playwright still run, as JS plugins. no-restricted-syntax has no oxlint equivalent: the process.env and axios.create bans become no-restricted-properties entries, and the @RouteAccess check becomes opendatacapture/require-route-access. .astro frontmatter is now linted with the JS and TypeScript rules. Formatting. oxfmt takes over import sorting from perfectionist/sort-imports, and sorts package.json keys and Tailwind classes. The pre-commit hook formats staged files with it; nothing checks formatting in lint or CI. TypeScript. typescript@7 has no classic compiler API, so apps/outreach keeps a TypeScript 6 devDependency for astro check and typedoc, and prisma-json-types-generator is patched to load the API from @typescript/typescript6. libnest moves to 11, whose loader no longer depends on the TypeScript API. The hand-written declarations of runtime-internal and runtime-meta are renamed to types.d.ts, since TypeScript 7 resolves a JSDoc import of ./index.d.ts to the sibling index.js. React's forwardRef is removed from the apps, where ref is a prop under React 19. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…adix The combobox pointed aria-controls at an id set on the cmdk list, which cmdk overwrites with its own, so the attribute named an element that never rendered. It also displaced the aria-controls that Radix's PopoverTrigger sets to the popover content. Remove the explicit attribute and suppress jsx-a11y/role-has-required-aria-props there, which cannot see the runtime one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Replaces ESLint with oxlint and Prettier with oxfmt, and moves every workspace except
apps/outreachfrom TypeScript 6 to the native TypeScript 7 compiler. On the maintainer's machinepnpm lintwent from 53s to 23s andpnpm formatfrom 11s to 2s.Changes
pnpm lintrunstsc && oxlint --fixper workspace, with type-aware rules throughoxlint-tsgolint. The effective rule set per file kind is the one ESLint applied, except for the rules listed under Decisions and Risks.packages/oxlint-config. The rootoxlint.config.tsextends it and holds the path-scoped overrides.odc/<rule>toopendatacapture/<rule>, and they are now type-checked and unit-tested.no-restricted-syntaxis gone: theprocess.envban inapps/apiand theaxios.createban inapps/webandpackages/react-coreareno-restricted-propertiesentries, and the check that every controller handler carries@RouteAccessis the new ruleopendatacapture/require-route-access.require-disable-reasonalso requires a reason onoxlint-disablecomments..astrofrontmatter is linted with the JS and TypeScript rules, which ESLint never applied to it.pnpm formatand the pre-commit hook run oxfmt. It also sorts imports,package.jsonkeys and Tailwind classes;vendor/is excluded.pnpm lintor CI: import order is only enforced by the pre-commit hook.typescriptis 7.0.x at the root,@douglasneuroinformatics/tsconfigis 3.0.0, and the rootpnpm.overrides.typescriptis removed.apps/outreachcarries its owntypescript6.0.x, whichastro checkand typedoc resolve.prisma-json-types-generator3.6.2 is patched to load the compiler API from@typescript/typescript6.@douglasneuroinformatics/libnestmoves from 10 to 11 and@douglasneuroinformatics/libpasswdfrom 0.0.3 to 0.0.4;type-fest@6.0.1, which the latter needs, is exempted fromminimumReleaseAge.prettierbecomes a declared dependency ofapps/playground, which imports it at runtime as Monaco's formatter and had been resolving it through the root.packages/runtime-internal/src/index.d.tsandpackages/runtime-meta/src/index.d.tsare renamed totypes.d.ts. The published runtime still serves@opendatacapture/runtime-internal/index.d.ts.forwardRefis removed fromapps/playgroundandapps/web; those components takerefas a prop.Decisions
prisma-json-types-generatorrather than upgrade it. Under TypeScript 7 version 3.6.2 exits 0 and rewrites nothing. Its 6.x line drops TypeScript altogether and produced identical types here, but it requires Prisma 7 and prints a warning on everyprisma generateunder Prisma 6. A scopedpnpm.overridesorpackageExtensionsentry cannot redirect a peer dependency, so the alternative to a patch was aliasingtypescriptto TypeScript 6 for all ofapps/api.eslint-plugin-perfectionistis pinned to 5.9.0, the version ESLint ran. 5.13.0 reports a class inapps/outreachthat 5.9.0 accepts; taking it is a separate change.eslint-plugin-jsx-a11y. They were not compared with the original rule by rule. Every existing jsx-a11y disable comment still suppresses a diagnostic. The one new diagnostic, a combobox withoutaria-controlsin the playground's instrument selector, is suppressed with its reason: Radix sets the attribute to the popover when it renders the trigger.no-undef,no-useless-assignment,typescript/prefer-optional-chainandreact/require-render-return.eslint-disablecomments are left as they are; oxlint honours them, including@typescript-eslint/<rule>names. Four no longer suppress anything, because oxlint does not report an unused type parameter on a mergeddeclare moduleinterface, orno-misleading-character-classon aRegExpbuilt from a template literal.package.jsonkey order. Files Prettier had never formatted are left for the hook to format when they are next staged.peerDependencyRules.allowedVersionsentries, each with its reason, rather than by allowing TypeScript 7 globally.settings.react.versionis19. The ESLint config said18; the apps are on 19.Risks
oxlint,oxlint-tsgolint,@oxlint/pluginsandoxfmtare pinned to exact versions, so a break can only arrive with a deliberate bump.no-dupe-args,no-octal,react/jsx-uses-react,react/no-deprecated.import/enforce-node-protocol-usagebecomesunicorn/prefer-node-protocol. Several rules miss a case ESLint caught, such astypescript/prefer-optional-chainonfoo?.bar && foo.bar.bazandreact/jsx-no-literalson{'a' + 'b'}. Accepted.prisma generateexits 0 and onlytscinapps/apinotices. The patch names version 3.6.2 exactly and the catalog pins it, so a bump cannot skip the patch unnoticed.libnest11 is a major release.apps/apitype-checks, and its unit and end-to-end tests run against it.Notes
The oxlint rule set was compared with ESLint's by resolving both configs for 21 representative file paths: the sets match except for the rules named above. The patched generator writes the same 71
PrismaJsonreferences into the Prisma client as it did under TypeScript 6.turbo prunecarriespatches/andpackages/oxlint-configinto the Docker build context.Adversarial review
Reviewed at commit 8542432. pnpm check: green.
Findings
aria-controls={listId}points the combobox at an id that never reaches the DOM, and it replaces the correctaria-controlsRadix was already setting. — Moveid={listId}fromCommand.ListtoPopover.Content, or dropuseIdand the explicitaria-controlsand let Radix supply it, with a reasoned disable for the lint.Fixed
aria-controlsand itsuseId, and suppressed the rule with the reason that Radix sets the attribute at runtime; libui'sPopover.Contentdoes not accept anid.Attestation
I, Claude Fable 5.2, attest that the review block above reports the adversarial review as it ran on the commit named, with every finding it returned.
🤖 Generated with Claude Code