Skip to content

TypeScript 7, oxlint and oxfmt - #224

Merged
deebov merged 1 commit into
v9from
chore/ts7-oxlint
Oct 9, 2026
Merged

deebov merged 1 commit into
v9from
chore/ts7-oxlint

Conversation

@deebov

@deebov deebov commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Moves the repo's tooling to TypeScript 7 and the oxc toolchain. Dev tooling only: no component file changes.

TypeScript 7

typescript ^6.0.3 → ^7.0.2 (native compiler). With ESLint gone nothing here needs the JS compiler API any more (Storybook 10's default docgen is react-docgen, which uses Babel), so this is a plain bump with no TS 6 alias.

ESLint → oxlint 1.87

Config converted with @oxlint/migrate into .oxlintrc.json, keeping the same rules:

  • typescript: no-explicit-any, no-empty-object-type, consistent-type-imports
  • react: rules-of-hooks, exhaustive-deps, and the React Compiler checks (refs, set-state-in-effect, purity, immutability, …)
  • jsx-a11y alt-text, prefer-const, the @react-types/* / @storybook/react restricted imports
  • eslint-plugin-storybook runs as an oxlint JS plugin. The converter wrote @(...) extglobs, which oxlint doesn't match, so the Storybook rules were silently off. They're switched to brace globs here.
  • Unused imports now come from oxlint's no-unused-vars (the unused-imports plugin is gone). Unused vars are now an error too; there were none.

Checked: ESLint on v9 reported 0 problems in 315 files, and oxlint reports 0 problems in the same 315 files with 47 rules. A probe file with one violation per rule (any, unused import, value import used as a type, empty interface, let never reassigned, restricted import, conditional hook, setState in effect, ref read during render, <img> without alt, a story without a default export) was flagged on every line.

The eslint-disable comments in component code stay: users' ESLint reads them, and oxlint honours them too.

Prettier → oxfmt 0.72

.prettierrc migrated to .oxfmtrc.json: same print width and indent, built-in Tailwind sorting (cx, sortCx, v4 stylesheet), and import sorting configured to the trivago order (react, react-dom, packages, @/, relative). Output is byte-identical to Prettier on every component file. The only change is one blank line inside a code example in CONTRIBUTING.md. Probe-tested: unsorted imports and Tailwind classes inside cx() come out in the same order Prettier produced.

Scripts / CI

  • lint / lint:check → oxlint; prettier / prettier:check → format / format:check
  • CI job renamed "type-check, lint, format" (no ruleset requires the old name)
  • CONTRIBUTING.md and the PR template updated

bun run test (tsc 7 + oxlint + oxfmt --check) passes; Storybook builds. Lockfile: removals plus oxlint/oxfmt/TS 7 only (no other package changed version).

Not in this PR: the starter kits still ship Prettier + ESLint; users' projects are unaffected either way since component output is unchanged.

Related: a-peak-works/untitledui-react (website, v9), untitleduico/cli#14. Supersedes #223.

🤖 Generated with Claude Code

- typescript ^7.0.2 (native compiler). Nothing here needs the JS compiler
  API any more once ESLint is gone; Storybook's default docgen is react-docgen.
- ESLint + typescript-eslint -> oxlint 1.87, config converted with
  @oxlint/migrate: same rules, including the React Compiler checks,
  jsx-a11y, consistent-type-imports and the restricted imports.
  eslint-plugin-storybook runs as an oxlint JS plugin (the converted
  @(...) globs never matched; switched to brace globs). Unused imports
  use oxlint's no-unused-vars (now an error for unused vars too).
- Prettier (+ tailwind and trivago import-sort plugins) -> oxfmt 0.72 with
  built-in Tailwind sorting (cx, sortCx, v4 stylesheet) and import sorting
  configured to the same order. Output is identical to Prettier on every
  component file; only a blank line in a CONTRIBUTING.md example changed.
- Scripts: lint/lint:check -> oxlint, prettier/prettier:check -> format/
  format:check; CI job renamed to "type-check, lint, format".
@deebov
deebov merged commit c2073a9 into v9 Oct 9, 2026
1 check passed
@deebov
deebov deleted the chore/ts7-oxlint branch October 9, 2026 12:41
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