Skip to content

chore: adopt type-aware Oxc toolchain - #65

Merged
edhor1608 merged 2 commits into
mainfrom
t3code/add-oxlint-type-aware-linting
Jul 22, 2026
Merged

edhor1608 merged 2 commits into
mainfrom
t3code/add-oxlint-type-aware-linting

Conversation

@edhor1608

@edhor1608 edhor1608 commented Jul 22, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • replace Biome with the Oxc toolchain: type-aware Oxlint 1.75 and Oxfmt 0.60
  • add oxlint-tsgolint matched to the pinned TypeScript 7.0.2 compiler
  • enforce no-explicit-any, no-misused-promises, and the type-aware recommended rules
  • add Oxfmt writing and verification commands, with formatting verification in bun run check
  • normalize the eight files that differed from the committed Oxfmt configuration
  • document the toolchain decisions and quality-gate behavior

Why

Oxlint's stable type-aware engine now targets the same TypeScript 7.0.2 version used by this repository. Moving formatting to Oxfmt removes the remaining duplicate parser/tooling path and gives the project one explicit Oxc-based lint-and-format setup.

The independent tsc --noEmit step remains because Oxlint's compiler-diagnostic typeCheck option is still marked experimental. Import sorting remains disabled to keep ordering policy outside this migration.

Impact

bun run lint now performs semantic TypeScript linting. bun run format writes Oxfmt output, and the complete quality gate rejects formatting drift through bun run format:check.

Validation

  • bun install --frozen-lockfile
  • bun run check
    • TypeScript 7 typecheck
    • type-aware Oxlint
    • Oxfmt check across 29 files
    • 10 unit tests
    • 10 FFmpeg integration tests
  • bun run prepare-image --help
  • git diff --check

Note

Replace Biome with type-aware Oxlint and Oxfmt toolchain

  • Removes Biome and adds oxlint 1.75.0, oxfmt 0.60.0, and oxlint-tsgolint with type-aware linting enabled via .oxlintrc.json.
  • Adds typescript/no-explicit-any and typescript/no-misused-promises as errors; maxWarnings is set to 0 so any warning fails the build.
  • Adds a format:check script (non-mutating) and includes it in the check pipeline alongside typechecking and linting.
  • Reformats several source files to comply with the new 100-character print width and style rules in .oxfmtrc.json; no logic changes.
  • Behavioral Change: lint and format scripts now invoke oxlint/oxfmt instead of Biome; existing Biome config is deleted.

Macroscope summarized b5fb824.

Summary by CodeRabbit

  • Tooling

    • Replaced Biome with Oxc tools for linting and formatting.
    • Added stricter type-aware lint checks and format verification to the quality checks.
    • Standardized formatting rules, including line width, quotes, semicolons, trailing commas, and package metadata ordering.
  • Documentation

    • Updated project guidance and README quality-gate descriptions.
    • Added decision-log entries documenting the updated validation and formatting standards.
  • Maintenance

    • Reformatted CLI, image-processing, and test code without changing behavior.

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The repository replaces Biome with Oxlint and Oxfmt, adds formatter and linter configuration, and extends bun run check with format verification. Documentation and decision records describe the updated TypeScript, lint, formatting, and test gates. Existing source and test files receive formatting-only changes with behavior and assertions preserved.

Possibly related PRs


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Docstring Coverage ❌ Error Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title accurately summarizes the main change: adopting the type-aware Oxc linting and formatting toolchain.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/add-oxlint-type-aware-linting
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch t3code/add-oxlint-type-aware-linting

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

Comment @coderabbitai help to get the list of available commands.

cursor[bot]
cursor Bot approved these changes Jul 22, 2026 •
coderabbitai[bot]
coderabbitai Bot previously requested changes Jul 22, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 27-28: Pin the oxlint dependency in package.json to an exact
version matching the intended type-aware toolchain, replacing the caret range on
oxlint while preserving the existing exact versions for oxlint-tsgolint and
TypeScript.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5dff5778-c9ce-4543-b992-8599b94c0113

📥 Commits

Reviewing files that changed from the base of the PR and between fc02a18 and 7c6bfe7.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • .oxfmtrc.json
  • .oxlintrc.json
  • AGENTS.md
  • README.md
  • biome.json
  • docs/plans/decisions-log.md
  • index.ts
  • package.json
  • src/cli/prepare_image.ts
  • src/domain/media_process.ts
  • src/domain/prepare_image.ts
  • src/domain/prepare_image_layout.ts
  • tests/integration/prepare_image.integration.test.ts
  • tests/output_path.test.ts
💤 Files with no reviewable changes (1)
  • biome.json
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Cursor Approval Agent: Pull Request Approver
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{js,ts,jsx,tsx}: Prioritize using plain JavaScript/TypeScript instead of libraries for fundamental algorithms (e.g., use Array methods instead of lodash)
Use functional programming patterns and immutable data structures in JavaScript/TypeScript code

Files:

  • tests/output_path.test.ts
  • src/domain/media_process.ts
  • src/domain/prepare_image.ts
  • src/domain/prepare_image_layout.ts
  • index.ts
  • src/cli/prepare_image.ts
  • tests/integration/prepare_image.integration.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Implement the production command as bun run prepare-image <input> --out <file-path-or-directory> [--border-px <integer>]; support PNG, JPEG, and TIFF files or directories, place each image on a white canvas, and export high-quality baseline sRGB JPEGs.
Honor the documented image-processing behavior, including .jpg output normalization, parent-directory creation, and output suffixing.
Use Bun and TypeScript tooling, including Bun test APIs and typechecking through bunx tsc; integration fixture helpers may depend on system ffmpeg and ffprobe.

Files:

  • tests/output_path.test.ts
  • src/domain/media_process.ts
  • src/domain/prepare_image.ts
  • src/domain/prepare_image_layout.ts
  • index.ts
  • src/cli/prepare_image.ts
  • tests/integration/prepare_image.integration.test.ts
**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Maintain separate unit tests for pure layout and output-path logic, plus the v1 CLI/FFmpeg integration test; the full test suite must use an explicit 30-second timeout.

Files:

  • tests/output_path.test.ts
  • tests/integration/prepare_image.integration.test.ts
src/domain/media_process.ts

📄 CodeRabbit inference engine (AGENTS.md)

Keep the packaged FFmpeg/ffprobe process boundary in src/domain/media_process.ts.

Files:

  • src/domain/media_process.ts
src/domain/prepare_image.ts

📄 CodeRabbit inference engine (AGENTS.md)

Keep source probing, layout selection, and FFmpeg export in src/domain/prepare_image.ts.

Files:

  • src/domain/prepare_image.ts
src/domain/prepare_image_layout.ts

📄 CodeRabbit inference engine (AGENTS.md)

Keep pure target, border, crop, and contain calculations in src/domain/prepare_image_layout.ts.

Files:

  • src/domain/prepare_image_layout.ts
src/cli/prepare_image.ts

📄 CodeRabbit inference engine (AGENTS.md)

Keep command parsing and stdout/stderr behavior in src/cli/prepare_image.ts.

Files:

  • src/cli/prepare_image.ts
package.json

📄 CodeRabbit inference engine (AGENTS.md)

Preserve the documented Bun scripts, including check, test:unit, test:integration, test:fast, and test:all.

Files:

  • package.json
docs/plans/**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

For feature branches, update the relevant plan document with the problem, decisions, commands run, and lessons learned.

Files:

  • docs/plans/decisions-log.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: edhor1608/passepartout

Timestamp: 2026-07-22T17:19:12.476Z
Learning: Use the repository’s Linear issue/subissue workflow for executable work, and store durable planning knowledge in Linear Documents.
Learnt from: CR
Repo: edhor1608/passepartout

Timestamp: 2026-07-22T17:19:12.476Z
Learning: Use the repository triage mapping with Linear `AFK` for agent-ready work and `HITL` for human-led work.
Learnt from: CR
Repo: edhor1608/passepartout

Timestamp: 2026-07-22T17:19:12.476Z
Learning: For domain-sensitive work, read the root `CONTEXT.md` and root decision documents first.
Learnt from: CR
Repo: edhor1608/passepartout

Timestamp: 2026-07-22T17:19:12.476Z
Learning: Run `bun run check` before pull requests; it must cover TypeScript typechecking, type-aware Oxlint, Oxfmt verification, unit tests, and the v1 integration test.
🪛 LanguageTool
docs/plans/decisions-log.md

[style] ~908-~908: Consider replacing this word to strengthen your wording.
Context: ...rting is an independent ordering policy and remains disabled by default, avoiding s...

(AND_THAT)

🔇 Additional comments (14)
.oxfmtrc.json (1)

1-11: LGTM!

.oxlintrc.json (1)

1-11: LGTM!

package.json (2)

9-9: 📐 Maintainability & Code Quality

Verify that the package entry point is covered by linting.

package.json declares index.ts as the module entry point on Line 5, but the lint command only passes src and tests on Line 9. Unless index.ts is intentionally a declaration-only shim, include it in the type-aware lint gate.

Suggested gate update
-    "lint": "oxlint src tests",
+    "lint": "oxlint index.ts src tests",

4-8: LGTM!

Also applies to: 10-26, 29-29

docs/plans/decisions-log.md (1)

868-919: LGTM!

AGENTS.md (1)

27-27: LGTM!

README.md (1)

70-70: LGTM!

src/cli/prepare_image.ts (1)

5-6: LGTM!

Also applies to: 114-118

src/domain/media_process.ts (1)

25-27: LGTM!

src/domain/prepare_image.ts (1)

120-123: LGTM!

src/domain/prepare_image_layout.ts (1)

61-65: LGTM!

Also applies to: 146-149

tests/integration/prepare_image.integration.test.ts (1)

191-197: LGTM!

Also applies to: 225-251, 286-292, 307-313, 325-331, 342-348

tests/output_path.test.ts (1)

26-28: LGTM!

index.ts (1)

1-1: LGTM!

Comment thread package.json Outdated

@cursor cursor 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.

Risk: low. Approved: the Oxlint toolchain migration remains low risk, the follow-up commit pins Oxlint and includes index.ts in lint, and no approval policies apply. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver

@edhor1608
edhor1608 dismissed coderabbitai[bot]’s stale review July 22, 2026 17:26

Both requested changes were implemented in b5fb824, the review thread is resolved and CodeRabbit confirmed the fix. All checks on the updated commit are green.

edhor1608 commented Jul 22, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jul 22, 5:26 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 22, 5:27 PM UTC: @edhor1608 merged this pull request with Graphite.

@edhor1608
edhor1608 merged commit d3777f8 into main Jul 22, 2026
5 checks passed
edhor1608 added a commit that referenced this pull request Jul 22, 2026
chore: adopt type-aware Oxc toolchain (#65)

## What changed

- replace Biome with the Oxc toolchain: type-aware Oxlint 1.75 and Oxfmt 0.60
- add `oxlint-tsgolint` matched to the pinned TypeScript 7.0.2 compiler
- enforce `no-explicit-any`, `no-misused-promises`, and the type-aware recommended rules
- add Oxfmt writing and verification commands, with formatting verification in `bun run check`
- normalize the eight files that differed from the committed Oxfmt configuration
- document the toolchain decisions and quality-gate behavior

## Why

Oxlint's stable type-aware engine now targets the same TypeScript 7.0.2 version used by this repository. Moving formatting to Oxfmt removes the remaining duplicate parser/tooling path and gives the project one explicit Oxc-based lint-and-format setup.

The independent `tsc --noEmit` step remains because Oxlint's compiler-diagnostic `typeCheck` option is still marked experimental. Import sorting remains disabled to keep ordering policy outside this migration.

## Impact

`bun run lint` now performs semantic TypeScript linting. `bun run format` writes Oxfmt output, and the complete quality gate rejects formatting drift through `bun run format:check`.

## Validation

- `bun install --frozen-lockfile`
- `bun run check`
  - TypeScript 7 typecheck
  - type-aware Oxlint
  - Oxfmt check across 29 files
  - 10 unit tests
  - 10 FFmpeg integration tests
- `bun run prepare-image --help`
- `git diff --check`


<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Replace Biome with type-aware Oxlint and Oxfmt toolchain
> - Removes Biome and adds [oxlint 1.75.0](https://github.com/edhor1608/passepartout/pull/65/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519), [oxfmt 0.60.0](https://github.com/edhor1608/passepartout/pull/65/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519), and `oxlint-tsgolint` with type-aware linting enabled via [.oxlintrc.json](https://github.com/edhor1608/passepartout/pull/65/files#diff-2113aef2ff3d50c021fca1fb6ecf4d4553a0e3f5f51ded7302ad499e43bc2b1e).
> - Adds `typescript/no-explicit-any` and `typescript/no-misused-promises` as errors; `maxWarnings` is set to 0 so any warning fails the build.
> - Adds a `format:check` script (non-mutating) and includes it in the `check` pipeline alongside typechecking and linting.
> - Reformats several source files to comply with the new 100-character print width and style rules in [.oxfmtrc.json](https://github.com/edhor1608/passepartout/pull/65/files#diff-ba6bdb5315b18041509bd0925c6394aa9250917b715ab46ca0a36231c566c8e5); no logic changes.
> - Behavioral Change: `lint` and `format` scripts now invoke `oxlint`/`oxfmt` instead of Biome; existing Biome config is deleted.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized b5fb824.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- macroscope-ui-refresh -->
<!-- Macroscope's pull request summary ends here -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Tooling**
  - Replaced Biome with Oxc tools for linting and formatting.
  - Added stricter type-aware lint checks and format verification to the quality checks.
  - Standardized formatting rules, including line width, quotes, semicolons, trailing commas, and package metadata ordering.

- **Documentation**
  - Updated project guidance and README quality-gate descriptions.
  - Added decision-log entries documenting the updated validation and formatting standards.

- **Maintenance**
  - Reformatted CLI, image-processing, and test code without changing behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Enable additional Oxlint plugins
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