Skip to content

chore: adopt oxlint and oxfmt - #33

Merged
Nsttt merged 1 commit into
mainfrom
chore/adopt-oxlint-oxfmt
Nov 25, 2026
Merged

Nsttt merged 1 commit into
mainfrom
chore/adopt-oxlint-oxfmt

Conversation

@Nsttt

@Nsttt Nsttt commented Nov 25, 2026

Copy link
Copy Markdown
Member

Replaces Prettier with oxfmt and adds oxlint as a new lint gate.

Formatting

.oxfmtrc.json was generated with oxfmt --migrate=prettier. It keeps the previous options (semi, double quotes, trailingComma: all, printWidth: 100) and every ignore pattern, including the release-please CHANGELOG.md and manifest entries, so release PRs still pass format:check. sortPackageJson is off, so package.json key order doesn't change.

Across 112 files, oxfmt and Prettier disagree on only two. Both are multi-line union type casts, which oxfmt now wraps with a leading | (node-entry-loader.ts, server-functions.ts). .prettierrc.json, .prettierignore and the prettier dependency are removed.

Linting

.oxlintrc.json turns on the typescript, unicorn, oxc, import, react, promise and node plugins, with the correctness category set to error and run with --deny-warnings. The current tree has no findings.

I also tried the suspicious category. It reported 251 findings and none were bugs:

  • 218 came from react-in-jsx-scope, which doesn't apply with the automatic JSX runtime.
  • The rest were intentional code: hydration gates, CSS side-effect imports, Node internals like Module._compile, and resolve shadowing in tests.

So suspicious stays off. react/set-state-in-effect is also off, because the example apps use the useEffect(() => setMounted(true)) hydration gate on purpose.

Gates

  • pnpm lint / pnpm lint:fix added. pnpm format / format:check now run oxfmt.
  • pnpm lint runs in the Husky pre-commit hook and in ci.yml and release.yml, right after format:check.
  • test/release-contracts.test.mjs now checks the release-please ignore entries in .oxfmtrc.json instead of .prettierignore.

Verification

pnpm format:check, pnpm lint, pnpm typecheck, pnpm build and pnpm test:core (81/81) pass locally. I didn't run the e2e suite locally; CI covers it.

@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/module-federation/tanstack/@module-federation/tanstack@33

commit: 825431c

@Nsttt Nsttt self-assigned this Nov 25, 2026

@gioboa gioboa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💪

@Nsttt
Nsttt merged commit e64f5b0 into main Nov 25, 2026
6 checks passed
@Nsttt
Nsttt deleted the chore/adopt-oxlint-oxfmt branch November 25, 2026 15:19
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.

2 participants