Skip to content

Switch fedify init templates to Oxfmt and Oxlint#818

Open
dahlia wants to merge 7 commits into
fedify-dev:mainfrom
dahlia:issue-703-oxfmt-oxlint-init
Open

Switch fedify init templates to Oxfmt and Oxlint#818
dahlia wants to merge 7 commits into
fedify-dev:mainfrom
dahlia:issue-703-oxfmt-oxlint-init

Conversation

@dahlia

@dahlia dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member

Closes #703.

This switches generated Node.js and Bun projects from Biome plus ESLint to the Oxc toolchain. New projects now get .oxfmtrc.json and .oxlintrc.json, Oxc editor recommendations, and format, format:check, and lint package scripts backed by oxfmt and oxlint.

The generated Oxlint config uses @fedify/lint/oxlint, which was added in #702. Deno projects keep their existing Deno formatter and linter path. The shared federation template is split so Deno scaffolds keep the Deno-formatted packages/init/src/templates/defaults/federation.ts.tpl, while Node.js and Bun scaffolds use packages/init/src/templates/defaults/federation.oxc.ts.tpl for Oxfmt-compatible output.

What changed

  • Replaced generated Biome and ESLint files with Oxfmt/Oxlint configuration in packages/init/src/json/oxfmt.json and packages/init/src/json/oxlint.json.
  • Added cleanup for framework scaffolds that produce ESLint artifacts or conflicting starter files before Fedify writes its own files.
  • Updated starter templates, VS Code settings, package scripts, and docs to match the Oxc toolchain.
  • Updated tutorial suppression comments in docs/tutorial/microblog.md to use Oxlint directives.
  • Extended packages/init/src/action/configs.test.ts and related init tests to check config generation, cleanup, and generated formatter/linter behavior.

Testing

  • deno task -f @fedify/init check
  • pnpm -C packages/init test
  • mise run check-each init lint
  • mise run check
  • Generated a Deno bare-bones project and checked src/federation.ts with deno fmt --check.
  • Generated a Hono npm project with dependency installation and ran npm run format:check and npm run lint.
  • Ran focused test-init smoke checks for npm projects across bare-bones, Hono, Express, Elysia, Astro, Next.js, Nitro, Nuxt, and SolidStart, plus representative Bun scaffolds.

I did not use the full mise run test:init matrix as a final gate because the existing Deno hyd path fails before lookup in this checkout with an import-map error from packages/cli/src/kv.node.ts. The Node.js and Bun formatter/linter paths covered by this PR were checked with generated projects instead.

Generated Node.js and Bun projects now share the Oxc toolchain for
formatting and linting.  The generated Oxlint config loads Fedify's
rules through @fedify/lint/oxlint, and generated projects get Oxc
editor recommendations and package scripts for format, format:check,
and lint.

The init test harness now runs the generated formatter and linter for
hydrated Node.js and Bun projects.  Framework scaffolders that produce
conflicting ESLint artifacts or unformatted files are cleaned up before
Fedify writes its files.

Closes fedify-dev#703

Assisted-by: Codex:gpt-5.5
@dahlia dahlia added this to the Fedify 2.3 milestone Jun 23, 2026
@dahlia dahlia self-assigned this Jun 23, 2026
@dahlia dahlia added component/cli CLI tools related component/lint Lint related (@fedify/lint) labels Jun 23, 2026
@netlify

netlify Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploy Preview for fedify-json-schema ready!

Name Link
🔨 Latest commit a266847
🔍 Latest deploy log https://app.netlify.com/projects/fedify-json-schema/deploys/6a3b232acd38140008b69b66
😎 Deploy Preview https://deploy-preview-818--fedify-json-schema.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR replaces Biome and ESLint in all Node.js/Bun projects generated by fedify init with Oxfmt and Oxlint. It adds new oxfmt.json and oxlint.json scaffold config files, a new cleanupScaffoldedFiles pipeline step, a rewritten formatJson pretty-printer with depth validation, a separate OXC-targeted federation template with conditional selection logic, shared dev-tool task helpers, updated VS Code/Zed editor settings, and conforming template formatting fixes across all web framework descriptors. Documentation and tests are updated accordingly.

Changes

Biome/ESLint → Oxfmt/Oxlint switch in fedify init

Layer / File(s) Summary
Initializer cleanup contract and shared dev-tool task helper
packages/init/src/types.ts, packages/init/src/webframeworks/utils.ts
WebFrameworkInitializer gains optional cleanupFiles and cleanupPackageJson fields; nodeBunDevToolTasks and getNodeBunDevToolTasks(pm) are exported to provide format, format:check, and lint task mappings for non-Deno package managers.
Recursive JSON formatter and depth guard
packages/init/src/utils.ts, packages/init/src/utils.test.ts
formatJson is rewritten from JSON.stringify with fixed indent to a recursive dispatcher with compact single-line arrays, depth-indented objects filtering undefined values, and primitive fallback; includes MAX_JSON_FORMAT_DEPTH validation and test coverage for exceeded-depth and toJSON handling.
Oxfmt/Oxlint config files and dependency list
packages/init/src/json/oxfmt.json, packages/init/src/json/oxlint.json, packages/init/src/json/deps.json, packages/init/src/webframeworks/const.ts, packages/init/src/action/deps.ts, packages/init/src/json/vscode-settings.json, packages/init/src/action/configs.ts
New oxfmt.json and oxlint.json scaffold configs replace the removed biome.json; deps.json and defaultDevDependencies swap eslint/@biomejs/biome for oxfmt/oxlint; VS Code settings switch from Biome formatter and import-organize actions to oxc.oxc-vscode as default formatter with source.fixAll.oxc: "always" on save for JS/TS/React/JSON scopes; configs.ts imports oxfmt/oxlint JSON and emits only oxc.oxc-vscode in extension recommendations.
Scaffold cleanup action in hydration pipeline
packages/init/src/action/cleanup.ts, packages/init/src/action/mod.ts
New cleanupScaffoldedFiles function deletes configured paths and strips specified keys from package.json; it is inserted as a tap(...) step in the handleHydRun pipeline before patchFiles.
JSON config generation and JSONC merge logic
packages/init/src/action/patch.ts
getJsons dev-tool output switches from biome to oxfmt and oxlint entries; JSONC merging is rewritten to strip trailing commas before }/] in addition to removing comments, with string-literal awareness to preserve comment syntax inside quoted values.
Federation template selection and new default templates
packages/init/src/action/templates.ts, packages/init/src/templates/defaults/federation.oxc.ts.tpl, packages/init/src/templates/defaults/federation.ts.tpl, packages/init/src/templates/nitro/server/routes/index.ts.tpl
New federation.oxc.ts.tpl for non-Deno targets; loadFederation selects template via getFederationTemplate(packageManager); getAlias now sorts fragments; federation.ts.tpl adds dispatcher logging; Nitro welcome route template added.
Template output formatting and unused logger cleanup
packages/init/src/templates/bare-bones/main/bun.ts.tpl, packages/init/src/templates/bare-bones/main/node.ts.tpl, packages/init/src/templates/elysia/index/bun.ts.tpl, packages/init/src/templates/elysia/index/node.ts.tpl, packages/init/src/templates/hono/index/node.ts.tpl, packages/init/src/templates/next/middleware.ts.tpl, packages/init/src/templates/nitro/nitro.config.ts.tpl, packages/init/src/templates/nitro/server/error.ts.tpl, packages/init/src/templates/nitro/server/middleware/federation.ts.tpl, packages/init/src/templates/express/app.ts.tpl, packages/init/src/templates/hono/app.tsx.tpl
Whitespace, semicolons, trailing commas, and indentation across scaffold templates are adjusted to match Oxfmt output expectations; Express and Hono app templates remove unused getLogger imports; no behavioral changes.
Per-framework ESLint removal and Oxc task wiring
packages/init/src/webframeworks/bare-bones.ts, packages/init/src/webframeworks/astro.ts, packages/init/src/webframeworks/elysia.ts, packages/init/src/webframeworks/express.ts, packages/init/src/webframeworks/hono.ts, packages/init/src/webframeworks/next.ts, packages/init/src/webframeworks/nitro.ts, packages/init/src/webframeworks/nuxt.ts, packages/init/src/webframeworks/solidstart.ts
All framework descriptors remove conditional eslint.config.ts file generation and replace explicit lint: "eslint ." task entries with ...nodeBunDevToolTasks / getNodeBunDevToolTasks(pm); Next and Nitro wire cleanupFiles/cleanupPackageJson.
Test updates for generated tooling and command validation
packages/init/src/action/configs.test.ts, packages/init/src/webframeworks.test.ts, packages/init/src/test/create.ts
configs.test.ts replaces Biome assertions with Oxfmt/Oxlint config validations and negative Biome/ESLint assertions; adds createDenoInitData/createNextNpmInitData/createNitroNpmInitData helpers and Deno fmt check. webframeworks.test.ts asserts oxfmt/oxlint tasks and devDependencies for all npm/bun frameworks. create.ts adds validateDevToolScripts running format:check and lint after successful init.
Documentation updates
CHANGES.md, docs/cli.md, docs/install.md, docs/tutorial/astro-blog.md, docs/tutorial/content-sharing.md, docs/tutorial/microblog.md, docs/tutorial/threadiverse.md
All user-facing docs replace Biome/ESLint references with Oxfmt/Oxlint: file listings swap biome.json for .oxfmtrc.json/.oxlintrc.json; VS Code extension instructions point to Oxc; package.json script examples updated; lint suppression directive syntax changed from biome-ignore to oxlint-disable-next-line in code snippets; changelog link references added; threadiverse tutorial formatting chapter rewritten.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • fedify-dev/fedify#695: Both PRs modify docs/tutorial/astro-blog.md to update tooling guidance from Biome/ESLint to Oxfmt/Oxlint.
  • fedify-dev/fedify#717: Both PRs modify packages/init/src/action/patch.ts for the init scaffolding pipeline; this PR changes getJsons dev-tool output and JSONC merging for the tooling switch.
  • fedify-dev/fedify#760: This PR's generated oxlint.json registers @fedify/lint/oxlint as a plugin, which is the subpath export added by that PR.

Suggested labels

type/enhancement

Suggested reviewers

  • 2chanhaeng
  • sij411
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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
Title check ✅ Passed The title accurately and concisely describes the main change: switching fedify init templates from Biome/ESLint to Oxfmt/Oxlint for Node.js and Bun projects.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the motivation, what was changed, and testing performed.
Linked Issues check ✅ Passed All coding requirements from issue #703 are satisfied: Biome replaced with Oxfmt, ESLint replaced with Oxlint, @fedify/lint integrated, editor settings updated, and test coverage extended.
Out of Scope Changes check ✅ Passed Changes remain within scope of the linked issue: formatter/linter tooling updates for Node.js/Bun, documentation and template updates, test coverage extension. Deno projects are unaffected as intended.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request replaces Biome and ESLint with Oxfmt and Oxlint for Node.js and Bun projects generated by fedify init. It updates initializer templates, configurations, VS Code settings, package dependencies, and documentation to support the new Oxc-based toolchain. Additionally, it introduces a file cleanup step during scaffolding to remove default framework linter configurations and updates JSON formatting utilities. Feedback on the changes suggests adding a depth limit to the recursive formatJsonValue function to prevent potential stack overflow issues, and utilizing the generated logger constant within the default federation template's actor dispatcher to avoid triggering an immediate unused variable warning from Oxlint.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/init/src/utils.ts Outdated
Comment thread packages/init/src/templates/defaults/federation.oxc.ts.tpl
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.85446% with 28 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/init/src/action/patch.ts 58.33% 8 Missing and 2 partials ⚠️
packages/init/src/action/cleanup.ts 85.00% 3 Missing and 3 partials ⚠️
packages/init/src/utils.ts 92.30% 1 Missing and 4 partials ⚠️
packages/init/src/webframeworks/nitro.ts 88.46% 0 Missing and 3 partials ⚠️
packages/init/src/webframeworks/next.ts 71.42% 0 Missing and 2 partials ⚠️
packages/init/src/action/templates.ts 88.88% 0 Missing and 1 partial ⚠️
packages/init/src/webframeworks/utils.ts 87.50% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
packages/init/src/action/configs.ts 81.16% <100.00%> (+0.63%) ⬆️
packages/init/src/action/deps.ts 80.00% <ø> (ø)
packages/init/src/action/mod.ts 100.00% <100.00%> (ø)
packages/init/src/webframeworks/astro.ts 84.26% <100.00%> (-0.52%) ⬇️
packages/init/src/webframeworks/bare-bones.ts 100.00% <100.00%> (+22.66%) ⬆️
packages/init/src/webframeworks/const.ts 100.00% <100.00%> (ø)
packages/init/src/webframeworks/elysia.ts 86.07% <100.00%> (+50.71%) ⬆️
packages/init/src/webframeworks/express.ts 96.87% <100.00%> (+54.84%) ⬆️
packages/init/src/webframeworks/hono.ts 86.58% <100.00%> (+53.25%) ⬆️
packages/init/src/webframeworks/nuxt.ts 83.33% <100.00%> (+4.46%) ⬆️
... and 8 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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: 2

🤖 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 `@packages/init/src/json/oxlint.json`:
- Around line 3-11: The oxlint.json ignorePatterns array is missing the Markdown
file pattern that is present in oxfmt.json, creating an inconsistency in how
Markdown files are handled between the two configurations. Add "**/*.md" to the
ignorePatterns array in oxlint.json to match the exclusion behavior of
oxfmt.json and ensure consistent handling of Markdown files across both linting
and formatting configurations.

In `@packages/init/src/webframeworks.test.ts`:
- Around line 118-123: Add an additional assertion to check that
eslint.config.mjs is also undefined, matching the existing check for
eslint.config.ts. Insert a new equal() call immediately after the
eslint.config.ts assertion that verifies
initializer.files?.["eslint.config.mjs"] is undefined to ensure both ESLint
configuration file variants are properly handled in this test.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 53603b84-f396-4e95-88fe-42e1bdea47b6

📥 Commits

Reviewing files that changed from the base of the PR and between f92913e and 8a029ed.

📒 Files selected for processing (46)
  • CHANGES.md
  • docs/cli.md
  • docs/install.md
  • docs/tutorial/astro-blog.md
  • docs/tutorial/content-sharing.md
  • docs/tutorial/microblog.md
  • docs/tutorial/threadiverse.md
  • packages/init/src/action/cleanup.ts
  • packages/init/src/action/configs.test.ts
  • packages/init/src/action/configs.ts
  • packages/init/src/action/deps.ts
  • packages/init/src/action/mod.ts
  • packages/init/src/action/patch.ts
  • packages/init/src/action/templates.ts
  • packages/init/src/json/biome.json
  • packages/init/src/json/deps.json
  • packages/init/src/json/oxfmt.json
  • packages/init/src/json/oxlint.json
  • packages/init/src/json/vscode-settings.json
  • packages/init/src/templates/bare-bones/main/bun.ts.tpl
  • packages/init/src/templates/bare-bones/main/node.ts.tpl
  • packages/init/src/templates/defaults/eslint.config.ts.tpl
  • packages/init/src/templates/defaults/federation.oxc.ts.tpl
  • packages/init/src/templates/elysia/index/bun.ts.tpl
  • packages/init/src/templates/elysia/index/node.ts.tpl
  • packages/init/src/templates/hono/index/node.ts.tpl
  • packages/init/src/templates/next/middleware.ts.tpl
  • packages/init/src/templates/nitro/nitro.config.ts.tpl
  • packages/init/src/templates/nitro/server/error.ts.tpl
  • packages/init/src/templates/nitro/server/middleware/federation.ts.tpl
  • packages/init/src/templates/nitro/server/routes/index.ts.tpl
  • packages/init/src/test/create.ts
  • packages/init/src/types.ts
  • packages/init/src/utils.ts
  • packages/init/src/webframeworks.test.ts
  • packages/init/src/webframeworks/astro.ts
  • packages/init/src/webframeworks/bare-bones.ts
  • packages/init/src/webframeworks/const.ts
  • packages/init/src/webframeworks/elysia.ts
  • packages/init/src/webframeworks/express.ts
  • packages/init/src/webframeworks/hono.ts
  • packages/init/src/webframeworks/next.ts
  • packages/init/src/webframeworks/nitro.ts
  • packages/init/src/webframeworks/nuxt.ts
  • packages/init/src/webframeworks/solidstart.ts
  • packages/init/src/webframeworks/utils.ts
💤 Files with no reviewable changes (2)
  • packages/init/src/json/biome.json
  • packages/init/src/templates/defaults/eslint.config.ts.tpl

Comment thread packages/init/src/json/oxlint.json
Comment thread packages/init/src/webframeworks.test.ts
Generated federation files now exercise the logger they create, and the Hono
and Express app templates no longer create unused logger constants.  This keeps
generated Oxc projects warning-free while still showing LogTape through the
federation setup.

The JSON formatter now rejects values deeper than 100 levels before recursively
walking them.  The generated Oxlint config also ignores Markdown files to match
Oxfmt, and tests cover the Markdown ignore plus both ESLint config file
variants.

fedify-dev#818 (comment)
fedify-dev#818 (comment)
fedify-dev#818 (comment)
fedify-dev#818 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request switches the generated Node.js and Bun projects in fedify init from Biome and ESLint to Oxfmt and Oxlint, updating the corresponding documentation, configuration templates, VS Code settings, and framework initializers. It also introduces a cleanup step to remove scaffolded ESLint artifacts and implements a custom JSON formatter (formatJsonValue) in packages/init/src/utils.ts to pretty-print configuration files. Feedback on the custom JSON formatter suggests handling objects with a custom toJSON method to align with standard JSON.stringify behavior.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/init/src/utils.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae2477f1d0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/tutorial/threadiverse.md Outdated
The JSON formatter now respects values that serialize themselves with toJSON,
including Date-like values, while keeping the recursive depth guard separate
from formatting indentation.  Tests cover both the deep-value guard and the
custom serializer path.

The Threadiverse tutorial now matches the generated federation scaffold, which
keeps its LogTape logger and uses it in the actor dispatcher instead of asking
readers to delete it.

fedify-dev#818 (comment)
fedify-dev#818 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request transitions generated Node.js and Bun projects from Biome and ESLint to Oxfmt and Oxlint, updating documentation, configuration templates, and test suites. It also introduces a cleanup step to remove framework-scaffolded files and package.json scripts. Feedback on the changes highlights that deleting tsconfig.json in Nitro projects will break type resolution for virtual imports and auto-generated types, suggesting merging the custom compiler options instead of deleting the file.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/init/src/webframeworks/nitro.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: aa51a38093

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Nitro scaffolds can create a tsconfig.json that carries framework metadata such
as an extends entry.  The cleanup step now keeps that file so patchFiles can
merge Fedify's compiler options into it instead of replacing the framework
configuration.

JSON merging now accepts the JSONC shape used by Nitro's template, including
comments and trailing commas.  A regression test covers preserving Nitro's
extends value while adding Fedify's compiler options.

fedify-dev#818 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request transitions generated Node.js and Bun projects from Biome and ESLint to Oxfmt and Oxlint. It updates the documentation, templates, and dependencies to reflect this change, and introduces a cleanup step to remove scaffolded ESLint/Biome artifacts. Additionally, a custom JSON formatter (formatJson) is implemented in packages/init/src/utils.ts. Feedback on the changes suggests avoiding the expansion of the fragile regex-based JSONC parsing in patch.ts in favor of a robust AST-based rewrite, and updating the custom JSON serializer to omit functions and symbols to align with standard JSON.stringify behavior.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/init/src/action/patch.ts Outdated
Comment thread packages/init/src/utils.ts

@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 `@packages/init/src/action/patch.ts`:
- Around line 318-323: The removeJsoncSyntax function uses regex patterns that
are not aware of string boundaries, causing it to incorrectly strip comment-like
patterns from inside string values (e.g., URLs). Replace the regex-based
approach with a character-by-character scanner that tracks whether the parser is
inside a string literal, and only apply comment removal and trailing comma
removal when outside of strings. Keep track of string state by monitoring
unescaped double quotes, ensuring that content between quotes is never modified
by the regex patterns.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: dbd369e8-f6c8-4c68-be33-ad9897bc9426

📥 Commits

Reviewing files that changed from the base of the PR and between aa51a38 and 16d7f9c.

📒 Files selected for processing (3)
  • packages/init/src/action/configs.test.ts
  • packages/init/src/action/patch.ts
  • packages/init/src/webframeworks/nitro.ts

Comment thread packages/init/src/action/patch.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 16d7f9cd40

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

dahlia added 2 commits June 24, 2026 05:30
Generated Nitro tsconfig files can include URL strings and other values that
look like JSONC comments.  The JSONC cleanup now scans the text and removes
comments and trailing commas only outside string literals, so patching keeps
existing string values intact.

fedify-dev#818 (comment)
fedify-dev#818 (comment)

Assisted-by: Codex:gpt-5.5
The custom JSON formatter now matches JSON.stringify for object properties
whose values cannot be serialized.  Function, symbol, and undefined property
values are omitted, while array entries still serialize to null.

fedify-dev#818 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request replaces Biome and ESLint with Oxfmt and Oxlint for generated Node.js and Bun projects, updating the initialization templates, tests, and documentation. It also adds a cleanup step to remove pre-existing ESLint/Biome configurations. Feedback suggests that the custom removeJsoncSyntax parser implemented in packages/init/src/action/patch.ts is fragile and should be replaced with a robust AST parser or an established library like jsonc-parser in a dedicated follow-up.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/init/src/action/patch.ts Outdated

@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 `@packages/init/src/action/patch.ts`:
- Around line 375-381: The trailing comma detection logic in the lookahead
section does not account for JSONC comments that may appear between the comma
and the closing bracket/brace. When a comma is followed by a comment before `}`
or `]`, the code fails to identify it as a trailing comma, leaving invalid JSON
after comments are stripped. Modify the while loop that currently only skips
whitespace characters to also skip over JSONC-style comments (both `//` line
comments and `/* */` block comments) when advancing the lookahead pointer, so
that the subsequent check for `}` or `]` correctly identifies trailing commas
regardless of intervening comments.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c00fba08-3dd2-4e04-9e54-921950de8d3b

📥 Commits

Reviewing files that changed from the base of the PR and between 16d7f9c and 957a5a9.

📒 Files selected for processing (4)
  • packages/init/src/action/configs.test.ts
  • packages/init/src/action/patch.ts
  • packages/init/src/utils.test.ts
  • packages/init/src/utils.ts

Comment thread packages/init/src/action/patch.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 957a5a9dfd

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The init patch step now parses existing JSONC files with jsonc-parser instead
of maintaining a custom comment and trailing comma scanner.  This preserves
string contents, handles comments between trailing commas and closing tokens,
and keeps Nitro tsconfig merging on a tested parser.

fedify-dev#818 (comment)
fedify-dev#818 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request transitions the Node.js and Bun projects generated by fedify init from Biome and ESLint to Oxfmt and Oxlint. It introduces a new cleanup step to remove default framework scaffolding artifacts (such as ESLint configurations), integrates jsonc-parser for robust JSONC parsing, and updates all relevant documentation, templates, configurations, and tests to support the new Oxc-based formatting and linting toolchain. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@dahlia

dahlia commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: a2668470d5

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dahlia dahlia requested a review from 2chanhaeng June 24, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/cli CLI tools related component/lint Lint related (@fedify/lint)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch @fedify/init Node.js/Bun templates to Oxfmt + Oxlint

1 participant