Repository navigation
chore: adopt type-aware Oxc toolchain - #65
Conversation
📝 WalkthroughWalkthroughThe repository replaces Biome with Oxlint and Oxfmt, adds formatter and linter configuration, and extends Possibly related PRs
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (14)
.oxfmtrc.json.oxlintrc.jsonAGENTS.mdREADME.mdbiome.jsondocs/plans/decisions-log.mdindex.tspackage.jsonsrc/cli/prepare_image.tssrc/domain/media_process.tssrc/domain/prepare_image.tssrc/domain/prepare_image_layout.tstests/integration/prepare_image.integration.test.tstests/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.tssrc/domain/media_process.tssrc/domain/prepare_image.tssrc/domain/prepare_image_layout.tsindex.tssrc/cli/prepare_image.tstests/integration/prepare_image.integration.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Implement the production command asbun 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.jpgoutput normalization, parent-directory creation, and output suffixing.
Use Bun and TypeScript tooling, including Bun test APIs and typechecking throughbunx tsc; integration fixture helpers may depend on systemffmpegandffprobe.
Files:
tests/output_path.test.tssrc/domain/media_process.tssrc/domain/prepare_image.tssrc/domain/prepare_image_layout.tsindex.tssrc/cli/prepare_image.tstests/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.tstests/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, andtest: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 QualityVerify that the package entry point is covered by linting.
package.jsondeclaresindex.tsas the module entry point on Line 5, but the lint command only passessrcandtestson Line 9. Unlessindex.tsis 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!
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.
Merge activity
|
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



What changed
oxlint-tsgolintmatched to the pinned TypeScript 7.0.2 compilerno-explicit-any,no-misused-promises, and the type-aware recommended rulesbun run checkWhy
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 --noEmitstep remains because Oxlint's compiler-diagnostictypeCheckoption is still marked experimental. Import sorting remains disabled to keep ordering policy outside this migration.Impact
bun run lintnow performs semantic TypeScript linting.bun run formatwrites Oxfmt output, and the complete quality gate rejects formatting drift throughbun run format:check.Validation
bun install --frozen-lockfilebun run checkbun run prepare-image --helpgit diff --checkNote
Replace Biome with type-aware Oxlint and Oxfmt toolchain
oxlint-tsgolintwith type-aware linting enabled via .oxlintrc.json.typescript/no-explicit-anyandtypescript/no-misused-promisesas errors;maxWarningsis set to 0 so any warning fails the build.format:checkscript (non-mutating) and includes it in thecheckpipeline alongside typechecking and linting.lintandformatscripts now invokeoxlint/oxfmtinstead of Biome; existing Biome config is deleted.Macroscope summarized b5fb824.
Summary by CodeRabbit
Tooling
Documentation
Maintenance