Skip to content

build: adopt Oxfmt and enforce TypeScript formatting in CI - #1825

Open
eitsupi wants to merge 3 commits into
mainfrom
build/oxfmt-formatting
Open

eitsupi wants to merge 3 commits into
mainfrom
build/oxfmt-formatting

Conversation

@eitsupi

@eitsupi eitsupi commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow up on #1818 and the toolchain review in #1732 by introducing a shared formatter and checking formatting in CI. After the ESLint migration, contributors had no formatting command or CI check; this PR provides both and formats the existing TypeScript sources consistently.

To keep the diff reviewable, formatting is limited to TypeScript files (.ts, .tsx, .mts, .cts) for now. Other file types can be enabled in follow-up PRs.

  • Pin Oxfmt to 0.73.0 and add pnpm run format / pnpm run format:check.
  • Share .oxfmtrc.jsonc between the CLI and the already recommended Oxc editor extension. Restrict the scope to TypeScript via ignorePatterns, use four-space indentation and single quotes, and disable import and package metadata sorting. Generated output (out/, dist/) is skipped through the existing Git ignore rules.
  • Format 173 TypeScript files (169 under src/, 4 under html/) in a dedicated mechanical commit. Move one no-control-regex suppression comment next to the regular expression after line wrapping moved it to another line.
  • Add an independent format CI job with Node.js 24, frozen-lockfile installation, and pnpm run format:check. Enable format on save for TypeScript and document the contributor commands.

@eitsupi
eitsupi force-pushed the build/oxfmt-formatting branch from 7eaa161 to 1c7d01d Compare October 18, 2026 15:23
@eitsupi eitsupi changed the title build: adopt Oxfmt and enforce repository formatting in CI build: adopt Oxfmt and enforce TypeScript formatting in CI Oct 18, 2026
@eitsupi
eitsupi marked this pull request as ready for review October 18, 2026 15:23
@eitsupi
eitsupi requested a review from renkun-ken October 18, 2026 15:23
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