Repository navigation
TypeScript 7, oxlint and oxfmt - #224
Merged
Merged
Conversation
- 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".
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.
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 isreact-docgen, which uses Babel), so this is a plain bump with no TS 6 alias.ESLint → oxlint 1.87
Config converted with
@oxlint/migrateinto.oxlintrc.json, keeping the same rules:no-explicit-any,no-empty-object-type,consistent-type-importsrefs,set-state-in-effect,purity,immutability, …)alt-text,prefer-const, the@react-types/*/@storybook/reactrestricted importseslint-plugin-storybookruns 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.no-unused-vars(theunused-importsplugin is gone). Unused vars are now an error too; there were none.Checked: ESLint on
v9reported 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,letnever 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-disablecomments in component code stay: users' ESLint reads them, and oxlint honours them too.Prettier → oxfmt 0.72
.prettierrcmigrated 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 insidecx()come out in the same order Prettier produced.Scripts / CI
lint/lint:check→ oxlint;prettier/prettier:check→format/format:checkbun 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