Skip to content

Update CLI templates to use Ultracite for linting and formatting#160

Open
eluce2 wants to merge 9 commits intomainfrom
codex/ultracite-oxlint-oxfmt-new-apps
Open

Update CLI templates to use Ultracite for linting and formatting#160
eluce2 wants to merge 9 commits intomainfrom
codex/ultracite-oxlint-oxfmt-new-apps

Conversation

@eluce2
Copy link
Collaborator

@eluce2 eluce2 commented Mar 17, 2026

Summary

  • Switch scaffolded template scripts from direct Biome commands to Ultracite commands (ultracite check . / ultracite fix .)
  • Add ultracite to default dev dependencies for new shadcn, mantine, and Vite WebViewer projects
  • Add ultracite to the CLI dependency version map for consistent version resolution
  • Update CLI formatting helper to run npx ultracite fix . instead of @biomejs/biome format --write
  • Remove direct @biomejs/biome template devDependencies where Ultracite now drives lint/format
  • Align nextjs-shadcn template Ultracite version to 7.0.8

Testing

  • pnpm dlx biome check packages/cli/src/helpers/createProject.ts packages/cli/src/installers/dependencyVersionMap.ts packages/cli/src/utils/formatting.ts packages/cli/template/nextjs-mantine/package.json packages/cli/template/nextjs-shadcn/package.json packages/cli/template/vite-wv/package.json
  • pnpm run ci

Summary by CodeRabbit

  • New Features

    • Replaced Biome with Ultracite as the default lint/format tooling across scaffolded apps
    • Added React Query and TanStack Router integration (hash-based navigation) to the Vite template
  • Chores

    • Added environment configuration files and launch presets
    • Updated templates and scripts to use Ultracite and adjusted starter dependencies
    • Minor code-style normalization across CLI and tooling scripts

@vercel
Copy link

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
proofkit-docs Skipped Skipped Mar 17, 2026 10:26pm

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/better-auth@160

@proofkit/cli

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/cli@160

create-proofkit

pnpm add https://pkg.pr.new/proofgeist/proofkit/create-proofkit@160

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmdapi@160

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmodata@160

@proofkit/typegen

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/typegen@160

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/webviewer@160

commit: 0fe11d6

@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 167fc93f-ae7b-4eba-adb3-8f7e4833ff14

📥 Commits

Reviewing files that changed from the base of the PR and between f226776 and 0fe11d6.

📒 Files selected for processing (2)
  • packages/cli/src/helpers/createProject.ts
  • packages/cli/template/vite-wv/.claude/launch.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/cli/src/helpers/createProject.ts

📝 Walkthrough

Walkthrough

Migrates scaffolded apps from Biome to Ultracite for lint/format, adds Ultracite to CLI dependency maps and templates, updates CLI createProject to include package manager placeholder and dev deps, enhances the vite-wv template with TanStack Router and React Query, and applies minor stylistic fixes across several bin files.

Changes

Cohort / File(s) Summary
Ultracite migration & CLI formatting
packages/cli/src/installers/dependencyVersionMap.ts, packages/cli/src/utils/formatting.ts, packages/cli/src/helpers/createProject.ts
Added ultracite v7.0.8 to dependency map; formatting utility switched from Biome to npx ultracite fix .; createProject now includes ultracite in shadcn/mantine dev deps and writes a __PACKAGE_MANAGER__ placeholder into project files.
Template package.json updates
packages/cli/template/nextjs-mantine/package.json, packages/cli/template/nextjs-shadcn/package.json, packages/cli/template/vite-wv/package.json
Replaced Biome lint/format scripts with Ultracite equivalents; removed @biomejs/biome; updated Ultracite version and added @tanstack/react-query / @tanstack/react-router to vite-wv.
vite-wv template runtime changes
packages/cli/template/vite-wv/src/main.tsx, .../src/App.tsx, .../src/router.tsx, .../src/routes/query-demo.tsx
Added React Query & TanStack Router: new router.tsx (routeTree, hash history), wrapping render with QueryClientProvider and RouterProvider, new QueryDemoPage demonstrating useQuery, and minor App text/class adjustments.
Codex environment configs & launch
.codex/environments/environment.toml, .codex/environments/environment-2.toml, packages/cli/template/vite-wv/.claude/launch.json
Added autogenerated environment TOML files for proofkit (setup/action pnpm i) and a launch.json for vite-wv with Preview and Typegen configurations using __PACKAGE_MANAGER__.
Changeset & docs
.changeset/use-ultracite-for-new-app-scripts.md
New changeset documenting the default switch to Ultracite for scaffolded apps.
Cosmetic/bin formatting
packages/better-auth/bin/intent.js, packages/fmdapi/bin/intent.js, packages/webviewer/bin/intent.js, packages/fmodata/src/cli/commands/query.ts
Stylistic normalization (double quotes, semicolons, minor reformatting) with no behavioural changes.

Sequence Diagram(s)

sequenceDiagram
    participant Browser as Browser
    participant Main as main.tsx
    participant QCP as QueryClientProvider
    participant RP as RouterProvider
    participant Router as Router (routeTree)
    participant QueryPage as QueryDemoPage

    Browser->>Main: load app
    Main->>QCP: create QueryClient & wrap app
    Main->>RP: initialize RouterProvider with router
    RP->>Router: provide routeTree (hash history)
    Router->>QueryPage: navigate to /query
    QueryPage->>QCP: useQuery -> request data
    QCP->>QueryPage: return cached/fetched data
    QueryPage->>Browser: render loading or data UI
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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 'Update CLI templates to use Ultracite for linting and formatting' directly and clearly summarizes the main change: replacing Biome with Ultracite across templates.

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

✨ 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 codex/ultracite-oxlint-oxfmt-new-apps
📝 Coding Plan
  • Generate coding plan for human review comments

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

Copy link

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

🧹 Nitpick comments (4)
packages/cli/template/vite-wv/package.json (1)

34-34: Version pinning inconsistency with dependencyVersionMap.

Same as in the nextjs-shadcn template—ultracite is pinned exactly as "7.0.8" here, but dependencyVersionMap.ts uses "^7.0.8". Consider aligning for consistency.

Suggested fix
-    "ultracite": "7.0.8",
+    "ultracite": "^7.0.8",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/template/vite-wv/package.json` at line 34, The package.json pins
ultracite to "7.0.8" while dependencyVersionMap.ts uses "^7.0.8", causing
inconsistency; update one to match the other for consistency (either change the
package.json entry "ultracite": "7.0.8" to "ultracite": "^7.0.8", or update
dependencyVersionMap.ts to "7.0.8"). Locate the ultracite entry in package.json
and the ultracite key in dependencyVersionMap.ts and make their version strings
identical across both files.
packages/cli/template/nextjs-shadcn/package.json (1)

35-35: Version pinning inconsistency with dependencyVersionMap.

The ultracite version here is pinned exactly as "7.0.8", but dependencyVersionMap.ts uses "^7.0.8" (with caret). Consider aligning them for consistency—either pin exactly in both places or use the caret range in both.

Suggested fix to align with dependencyVersionMap
-    "ultracite": "7.0.8"
+    "ultracite": "^7.0.8"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/template/nextjs-shadcn/package.json` at line 35, The ultracite
dependency in package.json is pinned as "7.0.8" but dependencyVersionMap.ts uses
"^7.0.8", causing inconsistency; update the package.json entry for "ultracite"
to use the caret range "^7.0.8" to match dependencyVersionMap.ts (or
alternatively change dependencyVersionMap.ts to "7.0.8" if you prefer exact
pinning) so both places reference the same version format.
packages/cli/src/utils/formatting.ts (1)

19-19: Use console.error for the failure message.

Line [19] emits an error-status message via console.log; this should go to stderr alongside the caught error.

Proposed patch
-      console.log("Error formatting files with ultracite");
+      console.error("Error formatting files with ultracite");
As per coding guidelines, "Remove `console.log`, `debugger`, and `alert` statements from production code".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/utils/formatting.ts` at line 19, Replace the stdout log with
an stderr log: locate the error handling in formatting.ts that currently calls
console.log("Error formatting files with ultracite") and change it to use
console.error so the failure message and any caught error go to stderr (ensure
the surrounding catch/error handling still passes the actual error to the
logger).
packages/cli/template/vite-wv/src/routes/query-demo.tsx (1)

5-5: Extract the artificial delay into a named constant.

Line [5] uses a magic number (180) that would be clearer as a descriptive constant.

Proposed patch
+const CONNECTION_HINT_DELAY_MS = 180;
+
 const getConnectionHint = async (): Promise<string> => {
-  await new Promise((resolve) => setTimeout(resolve, 180));
+  await new Promise((resolve) => setTimeout(resolve, CONNECTION_HINT_DELAY_MS));
   return "Use fmFetch or generated clients once your FileMaker file is ready.";
 };
As per coding guidelines, "Use meaningful variable names instead of magic numbers - extract constants with descriptive names".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/template/vite-wv/src/routes/query-demo.tsx` at line 5, Replace
the magic number 180 used in the artificial delay with a descriptive constant
(e.g., ARTIFICIAL_DELAY_MS) and declare it near the top of the module (or
directly above the function that contains the await new Promise(...)) so the
intent and units are clear; update the await new Promise((resolve) =>
setTimeout(resolve, 180)) call to use that constant instead
(ARTIFICIAL_DELAY_MS) and ensure the constant is const-scoped and documented
with a short comment if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/cli/src/utils/formatting.ts`:
- Line 19: Replace the stdout log with an stderr log: locate the error handling
in formatting.ts that currently calls console.log("Error formatting files with
ultracite") and change it to use console.error so the failure message and any
caught error go to stderr (ensure the surrounding catch/error handling still
passes the actual error to the logger).

In `@packages/cli/template/nextjs-shadcn/package.json`:
- Line 35: The ultracite dependency in package.json is pinned as "7.0.8" but
dependencyVersionMap.ts uses "^7.0.8", causing inconsistency; update the
package.json entry for "ultracite" to use the caret range "^7.0.8" to match
dependencyVersionMap.ts (or alternatively change dependencyVersionMap.ts to
"7.0.8" if you prefer exact pinning) so both places reference the same version
format.

In `@packages/cli/template/vite-wv/package.json`:
- Line 34: The package.json pins ultracite to "7.0.8" while
dependencyVersionMap.ts uses "^7.0.8", causing inconsistency; update one to
match the other for consistency (either change the package.json entry
"ultracite": "7.0.8" to "ultracite": "^7.0.8", or update dependencyVersionMap.ts
to "7.0.8"). Locate the ultracite entry in package.json and the ultracite key in
dependencyVersionMap.ts and make their version strings identical across both
files.

In `@packages/cli/template/vite-wv/src/routes/query-demo.tsx`:
- Line 5: Replace the magic number 180 used in the artificial delay with a
descriptive constant (e.g., ARTIFICIAL_DELAY_MS) and declare it near the top of
the module (or directly above the function that contains the await new
Promise(...)) so the intent and units are clear; update the await new
Promise((resolve) => setTimeout(resolve, 180)) call to use that constant instead
(ARTIFICIAL_DELAY_MS) and ensure the constant is const-scoped and documented
with a short comment if needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7112012f-1768-4dcb-8afb-9672545f962d

📥 Commits

Reviewing files that changed from the base of the PR and between ec9c412 and f226776.

📒 Files selected for processing (17)
  • .changeset/use-ultracite-for-new-app-scripts.md
  • .codex/environments/environment-2.toml
  • .codex/environments/environment.toml
  • packages/better-auth/bin/intent.js
  • packages/cli/src/helpers/createProject.ts
  • packages/cli/src/installers/dependencyVersionMap.ts
  • packages/cli/src/utils/formatting.ts
  • packages/cli/template/nextjs-mantine/package.json
  • packages/cli/template/nextjs-shadcn/package.json
  • packages/cli/template/vite-wv/package.json
  • packages/cli/template/vite-wv/src/App.tsx
  • packages/cli/template/vite-wv/src/main.tsx
  • packages/cli/template/vite-wv/src/router.tsx
  • packages/cli/template/vite-wv/src/routes/query-demo.tsx
  • packages/fmdapi/bin/intent.js
  • packages/fmodata/src/cli/commands/query.ts
  • packages/webviewer/bin/intent.js

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