Skip to content

build: lint with oxlint and format with oxfmt - #2047

Open
fb55 wants to merge 5 commits into
masterfrom
build/oxc
Open

fb55 wants to merge 5 commits into
masterfrom
build/oxc

Conversation

@fb55

@fb55 fb55 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Replace ESLint and Biome with type-aware oxlint and oxfmt. Keep TypeScript 6 for TypeDoc and separate project checking from library emit.

  • Scope rule exceptions to the existing parser conventions, including nullable options, positional overloads, DOM getters, and indexed lookups. Preserve module order and the existing Vitest assertion style.
  • Type fixture inputs, compare own fixture keys, and assert strict equality between streaming and one-shot parses.
  • No longer checked — Duplicate JSON keys and strict JSON comment rules, package manifest linting, Node engine compatibility, and plugin-specific checks without a stock equivalent.
  • Enabled since review — Oxfmt sorts imports and package.json. Oxlint enables 12 more rules, including Record style and unsafe assertion checks in library code. The two remaining library assertions use documented disable-next-line comments.
  • All 34 tests, lint, the library build, and TypeDoc passed locally. The library's runtime code is unchanged. Three declaration types now use Record. TypeDoc still reports its existing warning.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated project build, linting, and formatting workflows. Build output now excludes tests and fixtures.
    • Replaced the previous linting and formatting setup with new tools and configurations.
  • Tests
    • Tightened comparisons in parsing and cloning tests, including checks that distinguish strict equality.
  • No user-facing changes
    • These updates do not change the library’s runtime behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 18:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T20:13:22.063723Z 7e40938 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request replaces Biome and ESLint configuration with Oxlint and Oxfmt. It updates package scripts and TypeScript settings, and changes source and test code to align with the lint rules and test conventions.

Changes: Development Tooling Update

Layer / File(s) Summary
Lint and formatting configuration
biome.json, eslint.config.mjs, oxfmt.config.ts, oxlint.config.ts
Removes Biome and ESLint configuration. Adds Oxfmt formatting options and Oxlint rules, import restrictions, and file-specific overrides.
TypeScript configuration and package scripts
tsconfig.build.json, tsconfig.json, tsconfig.eslint.json, package.json
Adds build-specific TypeScript settings, updates shared compiler options and package scripts, and replaces Biome and ESLint-related development dependencies.
Source and test alignment
src/index.spec.ts, src/node.spec.ts, src/index.ts, src/node.ts
Updates fixture tests and equality assertions. Uses Record<string, string> for attribute types and adds targeted Oxlint suppressions for type assertions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: Minimal · up to 0e2ed

This change swaps the lint and format tooling and makes small type and test adjustments, with no runtime behavior change. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "build: lint with oxlint and format with oxfmt" matches the main change in the changeset. The PR replaces ESLint and Biome with Oxlint and Oxfmt. It adds oxlint.config.ts and oxfmt.config.ts…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "build: lint with oxlint and format with oxfmt" matches the main change in the changeset. The PR replaces ESLint and Biome with Oxlint and Oxfmt. It adds oxlint.config.ts and oxfmt.config.ts, and package.json scripts now run oxlint and oxfmt. The title omits the tsconfig.build.json split and the test changes, which is acceptable because the title does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the rules in place,
Then formats lines with steady grace.
Typed fixtures hop through tests anew,
Strict checks keep comparisons true.
Oxlint stamps its tidy trace,
And carrots mark the build’s next phase.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c123d03b-801a-4db3-b962-0347f31f8d11
Commits

Reviewing files that changed from the base of the PR and between 7e40938 and 0e2ed35.

Files selected for processing: 2

  • src/index.ts
  • src/node.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Replaces ESLint and Biome with type-aware Oxlint and Oxfmt.

  • Project checks now use Oxlint and Oxfmt.
  • TypeScript checks and library builds use separate settings.
  • Parser tests now compare fixtures and cloned nodes more strictly.

Reviews (5) · Last reviewed commit: "build: simplify lint suppressions" · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 12 files

View guided diff | Turn on auto-fix | Re-trigger cubic

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the development-tooling migration.

No open issues 🎉

What changed in this PR

Migrates DomHandler’s development tooling from ESLint and Biome to type-aware oxlint and oxfmt, without changing the library’s runtime source.

Changes:

  • Replaces linting and formatting configuration, scripts, and dependencies.
  • Separates TypeScript checking from build output while retaining manifest validation and duplicate JSON key checks.
  • Types fixture inputs and strengthens parser and node-cloning assertions.
File Description
tsconfig.json Enables no-emit checking for source, tests, scripts, and configs.
tsconfig.eslint.json Removes the obsolete ESLint-specific TypeScript config.
tsconfig.build.json Adds a dedicated build config that excludes tests and fixtures.
src/​node.spec.ts Uses strict equality assertions and moves a helper to module scope.
src/​index.spec.ts Types fixtures, compares own keys, and checks strict parse equality.
scripts/​check-json.ts Adds manifest validation and duplicate JSON key checks.
package.json Updates tooling dependencies and lint, format, and build scripts.
package-lock.json Records the replacement tooling dependency tree.
oxlint.config.ts Enables type-aware rules with exceptions for existing conventions.
oxfmt.config.ts Configures formatting while preserving import and manifest order.
eslint.config.mjs Removes the replaced ESLint configuration.
biome.json Removes the replaced Biome configuration.

Review effort: Balanced

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread package.json Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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