Skip to content

feat: bump packages, move to tsgo and oxc#19

Open
OskarLebuda wants to merge 2 commits into
mainfrom
feat/codeup
Open

feat: bump packages, move to tsgo and oxc#19
OskarLebuda wants to merge 2 commits into
mainfrom
feat/codeup

Conversation

@OskarLebuda
Copy link
Copy Markdown
Member

@OskarLebuda OskarLebuda commented Apr 17, 2026

Bump packages to newest versions, move to tsgo and oxc (lint + fmt)

Summary by CodeRabbit

  • Chores

    • Migrated development tooling from ESLint/Prettier to Oxlint/Oxfmt for linting and code formatting.
    • Updated package configuration and development dependencies with new tooling stack.
    • Reconfigured code formatting settings; pnpm-lock.yaml is now included in formatting.
  • Style

    • Code formatting adjustments throughout renderer modules.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1226b267-1fd9-49cd-b891-43b4009c43a2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The changes migrate the linting and formatting toolchain from ESLint/Prettier to Oxlint/Oxfmt, add new tool configuration files, remove legacy configurations, update package.json scripts and dependencies, and apply minor formatting adjustments across source files.

Changes

Cohort / File(s) Summary
Linting & Formatting Tools
.oxfmtrc.json, .oxlintrc.json, eslint.config.mjs, .prettierrc, .prettierignore
Added Oxfmt and Oxlint configuration files; removed ESLint configuration module, Prettier configuration file, and pnpm-lock.yaml exclusion from Prettier ignore list.
Package Configuration
package.json
Updated lint and lint:fix scripts to use oxlint and oxfmt instead of eslint and prettier; replaced lint/format dependencies with Oxlint/Oxfmt; upgraded toolchain versions (obuild, vitest, @vitest/coverage-v8, pnpm@10.33.0); added @typescript/native-preview and changed typecheck script to tsgo.
Source Code Formatting
src/render.ts, src/renderers/kong.ts, src/renderers/scalar.ts, src/renderers/swagger.ts
Collapsed multi-line variable assignments into single-line expressions; src/renderers/scalar.ts also replaced explicit type annotation with satisfies type constraint on scalarConfig.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 Oxfmt hops where Prettier once dwelled,
Oxlint's config bells sweetly knelled,
Lines now sing in unified formation,
A tidy migration, quite the sensation!
Format and lint, in harmony's dance,
Tools refreshed—the code's golden chance!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: bump packages, move to tsgo and oxc' accurately reflects the main changes: upgrading dependencies and migrating the toolchain from eslint/prettier to oxlint/oxfmt and from tsc to tsgo.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/codeup

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 and usage tips.

@OskarLebuda OskarLebuda requested a review from pi0 April 17, 2026 07:09
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.74%. Comparing base (a4f8236) to head (cac420d).

Files with missing lines Patch % Lines
src/render.ts 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #19       +/-   ##
===========================================
+ Coverage   55.12%   76.74%   +21.61%     
===========================================
  Files           7        4        -3     
  Lines         156       43      -113     
  Branches       20       17        -3     
===========================================
- Hits           86       33       -53     
+ Misses         69        8       -61     
- Partials        1        2        +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
package.json (1)

1-53: ⚠️ Potential issue | 🔴 Critical

CI blocker: pnpm-lock.yaml is out of sync with package.json.

Both CI jobs fail with ERR_PNPM_OUTDATED_LOCKFILE — the lockfile still references typescript@^6.0.3 which has been removed in this PR (replaced by @typescript/native-preview for tsgo). Run pnpm install locally and commit the updated pnpm-lock.yaml.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 1 - 53, The CI is failing due to an out-of-date
pnpm lockfile that still pins typescript@^6.0.3 while package.json replaced it
with `@typescript/native-preview` for tsgo; run pnpm install locally to regenerate
pnpm-lock.yaml (ensuring package.json's dependencies and peerDependencies like
"@typescript/native-preview", "tsgo", and "@types/node" are reflected), commit
the updated pnpm-lock.yaml, and push the change so CI no longer errors with
ERR_PNPM_OUTDATED_LOCKFILE.
src/renderers/swagger.ts (1)

34-34: ⚠️ Potential issue | 🟡 Minor

Change layout2 to layout.

Swagger UI's config key is layout, not layout2. The incorrect key prevents StandaloneLayout from being applied, causing Swagger UI to fall back to the default layout. Fix this typo:

-              layout2: "StandaloneLayout",
+              layout: "StandaloneLayout",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderers/swagger.ts` at line 34, The Swagger UI config object uses the
wrong property name 'layout2' which prevents applying StandaloneLayout; rename
the property 'layout2' to 'layout' in the Swagger UI configuration (the object
where layout2: "StandaloneLayout" is set) so it reads layout: "StandaloneLayout"
to correctly apply the StandaloneLayout.
🧹 Nitpick comments (3)
src/renderers/scalar.ts (1)

9-12: satisfies constraint loses url type safety.

Using { url?: string } (optional) in the satisfies constraint allows the object to still type-check even if url were removed or misspelled. Since url: opts.spec is always set here, consider making it required so accidental removal is caught at compile time:

-  } satisfies Partial<ScalarConfig> & { url?: string };
+  } satisfies Partial<ScalarConfig> & { url: string | undefined };

Minor nit; the behavior at runtime is unchanged.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderers/scalar.ts` around lines 9 - 12, The satisfies constraint on
scalarConfig currently uses Partial<ScalarConfig> & { url?: string } which makes
url optional and won't catch accidental removal; update the constraint to
require url (e.g., Partial<ScalarConfig> & { url: string }) so the compiler
enforces that url (assigned from opts.spec) is present, and verify scalarConfig
and any uses still type-check with the stricter { url: string } requirement.
.oxlintrc.json (1)

1-5: Consider making the ruleset configuration explicit for clarity.

Oxlint enables the correctness category by default, which provides high-signal checks for incorrect/unsafe code. However, with "rules": {} and no explicit categories configuration, this behavior is implicit. For better documentation and control, consider explicitly configuring categories (e.g., "categories": { "correctness": "error", "suspicious": "warn" }) to make your lint surface clear and maintainable. This is especially useful if you want to include rules beyond correctness, such as suspicious or other categories.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.oxlintrc.json around lines 1 - 5, The config currently leaves "rules": {}
without explicit categories; add a "categories" key to the JSON and explicitly
set desired category severities (e.g., set "correctness": "error" and
"suspicious": "warn") so the linter behavior is documented and controlled;
update the same JSON object that contains "plugins" and "rules" to include the
new "categories" property with those values.
package.json (1)

34-34: Remove unused eslint-config-unjs from devDependencies.

The package.json shows that the linting setup has fully migrated to oxlint and oxfmt (scripts on lines 19–20, dependencies on lines 36–37), and eslint.config.mjs has been removed. eslint-config-unjs is no longer referenced anywhere in the codebase and should be removed from line 34.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 34, Remove the unused devDependency
"eslint-config-unjs" from package.json's devDependencies section: delete the
"eslint-config-unjs": "^0.6.2" entry, run your package manager to update
lockfiles (npm/yarn/pnpm install), and verify no references remain (search for
"eslint-config-unjs" or eslint.config.mjs) so that linting now relies solely on
the existing "oxlint"/"oxfmt" setup.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 30: Add a short documented migration plan in the repository (e.g., a new
docs/ or a README section) that explains replacing the pinned
"@typescript/native-preview" dependency with the stable "typescript" package
when TypeScript 7.0 is released, include a timeline/trigger (release date or
semver tag), the exact steps to update package.json and run npm/yarn to
reinstall, and update the npm script named "test:types" to reference the stable
"typescript" package; also add a one-line TODO comment in package.json near
"@typescript/native-preview" pointing to the new doc and create a task/issue
tracking this migration.

---

Outside diff comments:
In `@package.json`:
- Around line 1-53: The CI is failing due to an out-of-date pnpm lockfile that
still pins typescript@^6.0.3 while package.json replaced it with
`@typescript/native-preview` for tsgo; run pnpm install locally to regenerate
pnpm-lock.yaml (ensuring package.json's dependencies and peerDependencies like
"@typescript/native-preview", "tsgo", and "@types/node" are reflected), commit
the updated pnpm-lock.yaml, and push the change so CI no longer errors with
ERR_PNPM_OUTDATED_LOCKFILE.

In `@src/renderers/swagger.ts`:
- Line 34: The Swagger UI config object uses the wrong property name 'layout2'
which prevents applying StandaloneLayout; rename the property 'layout2' to
'layout' in the Swagger UI configuration (the object where layout2:
"StandaloneLayout" is set) so it reads layout: "StandaloneLayout" to correctly
apply the StandaloneLayout.

---

Nitpick comments:
In @.oxlintrc.json:
- Around line 1-5: The config currently leaves "rules": {} without explicit
categories; add a "categories" key to the JSON and explicitly set desired
category severities (e.g., set "correctness": "error" and "suspicious": "warn")
so the linter behavior is documented and controlled; update the same JSON object
that contains "plugins" and "rules" to include the new "categories" property
with those values.

In `@package.json`:
- Line 34: Remove the unused devDependency "eslint-config-unjs" from
package.json's devDependencies section: delete the "eslint-config-unjs":
"^0.6.2" entry, run your package manager to update lockfiles (npm/yarn/pnpm
install), and verify no references remain (search for "eslint-config-unjs" or
eslint.config.mjs) so that linting now relies solely on the existing
"oxlint"/"oxfmt" setup.

In `@src/renderers/scalar.ts`:
- Around line 9-12: The satisfies constraint on scalarConfig currently uses
Partial<ScalarConfig> & { url?: string } which makes url optional and won't
catch accidental removal; update the constraint to require url (e.g.,
Partial<ScalarConfig> & { url: string }) so the compiler enforces that url
(assigned from opts.spec) is present, and verify scalarConfig and any uses still
type-check with the stricter { url: string } requirement.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0e57a322-17d3-42cd-9e86-b7b776f9c13f

📥 Commits

Reviewing files that changed from the base of the PR and between a4f8236 and ef0fa0e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .oxfmtrc.json
  • .oxlintrc.json
  • .prettierignore
  • .prettierrc
  • eslint.config.mjs
  • package.json
  • src/render.ts
  • src/renderers/kong.ts
  • src/renderers/scalar.ts
  • src/renderers/swagger.ts
💤 Files with no reviewable changes (3)
  • .prettierrc
  • .prettierignore
  • eslint.config.mjs

Comment thread package.json
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