Skip to content
This repository was archived by the owner on Jul 4, 2026. It is now read-only.

chore: fix linting and formatting issues across repository - #68

Merged
gaureshpai merged 11 commits into
mainfrom
fix/lint-and-format
Feb 1, 2026
Merged

gaureshpai merged 11 commits into
mainfrom
fix/lint-and-format

Conversation

@gaureshpai

@gaureshpai gaureshpai commented Feb 1, 2026 •

Copy link
Copy Markdown
Owner

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

[2.0.1] - 2026-02-01

Fixed

  • Drizzle ORM: Now correctly generates .js or .ts files based on project TypeScript setting
    • Previously always created .ts files even in JavaScript projects
    • Config file now uses JSDoc types for JavaScript projects
  • Vitest Configuration: Fixed ES module compatibility issue
    • Replaced __dirname with proper import.meta.url resolution
    • Added required imports for path and fileURLToPath
  • Template Generation: Removed TypeScript-only import type { Metadata } from JavaScript layout templates
    • This was causing syntax errors in JavaScript projects
  • Test Generation: Fixed critical bug where extracted prompts were not being added to the array
    • Test cases are now properly generated from CLI prompts
  • Numeric Default Values: Fixed Number.isNaN() check in test generator
    • Now correctly parses string values to numbers before validation
  • Test Diagnostics: Added stdout/stderr logging on test failures for better debugging

Changed

  • Async Operations: Converted run() utility function to async
    • All command executions now properly await completion
    • Retry delays now actually pause execution (previously were no-ops)
    • Added await to all 19+ run() calls in src/index.js
  • Import Standardization: Migrated to node: prefix for all built-in modules
    • Affects: fs, path, child_process, url, process, assert
    • Improves clarity and follows Node.js best practices
  • Code Quality: Refactored while loops to avoid assignments in expressions
    • Resolves noAssignInExpressions lint warnings
    • Improved code readability

Improved

  • Documentation: Comprehensive README overhaul
    • Added table of contents with deep links
    • Expanded feature descriptions with code examples
    • Added troubleshooting section
    • Included project structure visualization
    • Added changelog section
    • Improved contributing guidelines
  • Documentation Site: Updated docs/index.html with missing features
    • Added Testing, Authentication, and Docker to interactive prompts table
    • Synchronized with README content
  • Error Handling: Enhanced diagnostic output in test suite
    • Failed tests now display full stdout and stderr
    • Easier debugging of CLI issues

Technical Debt

  • Cleaned up unused variables (_open in colors.js)
  • Removed redundant path arguments in package.json scripts
  • Populated PWA manifest with proper app names

[2.0.0] - 2025-12-XX

Added

  • Interactive Mode: Run on existing Next.js projects with -i flag
    • Auto-detects project configuration (TypeScript, src dir, app dir, Tailwind)
    • Only prompts for features to add (no project recreation)
  • Authentication Support:
    • NextAuth.js (v5 Beta) with credentials provider
    • Clerk with middleware setup
    • Lucia auth with installation guidance
  • Testing Frameworks:
    • Vitest with React Testing Library
    • Jest with Next.js integration
    • Automatic configuration and setup files
  • Docker Support:
    • Multi-stage Dockerfile for optimized builds
    • .dockerignore for efficient image creation
    • Standalone output mode in next.config.mjs
  • Custom Prompt Implementation: Zero external dependencies
    • Replaced inquirer with lightweight custom solution
    • Supports input, list, and confirm prompt types
    • Validation and filtering support

Changed

  • Error Handling: Comprehensive retry mechanism
    • Automatic retries (up to 3) for failed installations
    • Configurable retry delays (default 2000ms)
    • Intelligent cleanup on failure
  • Project Cleanup: Enhanced default file removal
    • Clears public folder completely
    • Removes default favicon from app/src directories
    • Deletes API hello route when not needed

[1.x.x] - Previous Versions

Features from v1.x

  • Basic Next.js project scaffolding
  • Package manager detection (npm, yarn, pnpm)
  • TypeScript and Tailwind CSS support
  • Multi-page generation
  • Linter support (ESLint, Biome)
  • ORM support (Prisma, Drizzle)
  • Shadcn UI integration
  • Clean project setup

Migration Guides

Migrating from 1.x to 2.x

Breaking Changes:

  • None! Version 2.0 is fully backward compatible

New Features to Explore:

  1. Try interactive mode on existing projects: npx create-next-quick -i
  2. Add authentication to your project during setup
  3. Configure testing frameworks automatically
  4. Enable Docker support for containerized deployments

Recommended Actions:

  • Update your global npm cache: npm cache clean --force
  • Review new authentication options if building user-facing apps
  • Consider adding Docker support for production deployments

Upcoming Features (Roadmap)

v2.1.0 (Planned)

  • Supabase integration
  • Vercel Analytics setup
  • Sentry error tracking
  • Storybook configuration
  • Playwright E2E testing

v2.2.0 (Planned)

  • Monorepo support (Turborepo)
  • GraphQL setup (Apollo/Relay)
  • Internationalization (i18n)
  • PWA configuration
  • CI/CD templates (GitHub Actions, GitLab CI)

v3.0.0 (Future)

  • GUI interface for project configuration
  • Plugin system for custom integrations
  • Project templates (e-commerce, blog, SaaS)
  • AI-powered code generation

Support

Summary by CodeRabbit

  • New Features

    • Interactive setup adds Testing, Authentication, and Docker options.
  • Documentation

    • Major README and docs overhaul; updated site manifest and docs formatting.
  • Refactor

    • CLI messaging, prompts, and flows clarified and standardized across JS/TS choices.
  • Tests

    • Enhanced test generation and harnesses with more structured cases and unified assertions.
  • Chores

    • Project-wide formatting, quoting, and Node module specifier consistency; tooling inclusion broadened.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Feb 1, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@gaureshpai has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 27 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 9a9709c and 39613ef.

📒 Files selected for processing (1)
  • README.md
📝 Walkthrough

Walkthrough

Standardizes Node core imports to the node: namespace, normalizes quoting/formatting, makes run async with awaited retries, broadens biome.json inclusion, updates tests and test generation, and adds Testing/Authentication/Docker interactive prompt options in docs.

Changes

Cohort / File(s) Summary
Core imports & quoting
\.github/scripts/parse-logs.js, src/index.js, src/lib/colors.js, src/lib/prompts.js, src/lib/templates.js, src/lib/utils.js, src/test/generate-tests.js, src/test/interactive.test.js, src/test/test-cases.js, src/test/test.js
Replaced Node core imports with the node: namespace and standardized string quoting/formatting across many files. Mostly stylistic but verify runtime/node compatibility and import resolution.
Async run & call-sites
src/lib/utils.js, src/index.js, callers in src/*
Converted run to async and added await at call sites; retryDelay now awaited. Confirm all call sites correctly propagate await and error handling remains intact.
Test generation & generated outputs
src/test/generate-tests.js, src/test/generated-test-cases.js
Refactored prompt parsing and default resolution; test-case generation now uses a centralized assertion function instead of per-case assertion strings. Audit generated test shapes and any eval usage.
Tests & test utilities
src/test/interactive.test.js, src/test/test.js, src/test/test-cases.js
Updated tests to use node: imports and adjusted test utility imports (some exports removed from src/lib/utils.js). Ensure tests still have required helpers or update imports.
Docs, UI prompts & assets
docs/script.js, docs/style.css, docs/site.webmanifest, docs/index.html
Formatting and whitespace normalization; docs/index.html adds interactive prompt rows for Testing, Authentication, and Docker. Verify docs UI reflects new options and manifest formatting.
Config & README
biome.json, package.json, README.md
Removed the file inclusion filter from biome.json; README restructured and package/manifest formatting changed. Review tooling implications from widened file set.
Minor templates & formatting
src/lib/templates.js, src/lib/colors.js, docs/*
Small string/quote changes, variable rename, trailing newline and whitespace tweaks. Low-risk but scan for accidental logic changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐇 I hopped through imports, tidy and bright,
Swapped paths to node: and set sleeps right,
Tests and docs hummed a softer tune,
Prompts grew choices under the moon,
A rabbit’s patch — small fixes, big light!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is a detailed changelog document but does not follow the repository's required template structure (Description, Related Issue, Type of Change, Testing, Checklist, Screenshots, Additional Notes). Restructure the PR description to match the template: add a brief summary section, link related issues, specify the type of change (this appears to be a mix of bug fixes and chores), document testing approach, and complete the provided checklist.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: fix linting and formatting issues across repository' accurately summarizes the main change—a repository-wide linting, formatting, and bug fix effort that affects multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/lint-and-format

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

@gaureshpai gaureshpai self-assigned this Feb 1, 2026
@gaureshpai gaureshpai added the bug Something isn't working label Feb 1, 2026
@github-actions

github-actions Bot commented Feb 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ CI/CD Test Results

Overall Status: success


View full workflow run

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

Actionable comments posted: 5

Caution

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

⚠️ Outside diff range comments (3)
src/lib/templates.js (1)

70-86: ⚠️ Potential issue | 🔴 Critical

TypeScript-only syntax used in JavaScript template.

The JavaScript layout template (when useTypeScript is false) includes import type { Metadata } from "next" at line 71, which is TypeScript-only syntax. This will cause a syntax error when generating .js files.

🐛 Proposed fix to remove TypeScript syntax from JS template
     : `import React from "react";
-import type { Metadata } from "next";
 import "./globals.css";

-export const metadata = {
+export const metadata = /** `@type` {import('next').Metadata} */ ({
   title: "${projectName}",
   description: "This is the ${projectName} project",
-};
+});

 export default function RootLayout({ children }) {
src/test/generate-tests.js (2)

16-50: ⚠️ Potential issue | 🔴 Critical

Critical bug: Extracted prompts are never added to extractedPrompts array.

The prompt object is created inside the inner while loop (lines 18-46) but is never pushed to extractedPrompts. As a result, extractedPrompts remains empty, and no test cases will be generated.

🐛 Proposed fix to push extracted prompts
     if (promptMatch[5]) {
       const defaultValue = promptMatch[5].trim();
       if (defaultValue === "true") {
         prompt.default = true;
       } else if (defaultValue === "false") {
         prompt.default = false;
       } else if (defaultValue === "" || defaultValue === '""') {
         prompt.default = "";
       } else if (defaultValue !== "" && !Number.isNaN(defaultValue)) {
         prompt.default = Number(defaultValue);
       } else {
         prompt.default = defaultValue.replace(/['"]/g, "");
       }
     }
+    extractedPrompts.push(prompt);
     promptMatch = promptObjectRegex.exec(promptArrayString);
   }
   promptArrayMatch = inquirerPromptRegex.exec(indexJsContent);
 }

126-138: 🧹 Nitpick | 🔵 Trivial

Generated file uses non-prefixed imports inconsistent with PR standards.

The generated test file content at lines 130-132 uses non-prefixed imports ('assert', 'fs', 'path') while the rest of the PR standardizes on node: prefixed imports.

♻️ Proposed fix for consistent imports
 const fileContent = `// This file is auto-generated by test/generate-tests.js
 // Do not edit this file directly. Run 'npm run test:generate' to regenerate.

-import { strict as assert } from 'assert';
-import fs from 'fs';
-import path from 'path';
+import { strict as assert } from "node:assert";
+import fs from "node:fs";
+import path from "node:path";

 export const testCases = ${JSON.stringify(testCases, null, 2)}.map(tc => ({
🤖 Fix all issues with AI agents
In `@docs/site.webmanifest`:
- Around line 1-11: The manifest's "name" and "short_name" are empty and should
be populated so the PWA shows an app name; update the JSON fields "name" and
"short_name" in docs/site.webmanifest (replace the empty strings for "name" and
"short_name") with meaningful values (for example "create-next-quick" and a
shorter "create-quick" or similar) ensuring the manifest remains valid JSON.

In `@package.json`:
- Line 15: The "lint" npm script currently duplicates the path argument ("biome
check . --write ."); update the "lint" script in package.json (the "lint"
property) to remove the redundant trailing "." so it reads "biome check .
--write" (retain a single path argument before the --write flag).

In `@src/lib/colors.js`:
- Around line 83-85: Remove the dead `_open` variable or use it consistently: in
the block where `_open` is defined (it computes `\x1b[38;5;${ansiCode}m`),
either delete the `_open` declaration entirely and keep the inline sequence in
the call to createBuilder([...currentStyles, `\x1b[38;5;${ansiCode}m`]), or
replace the inline string with the `_open` variable so the call becomes
createBuilder([...currentStyles, _open]) to avoid the unused variable in
colors.js (references: `_open`, `ansiCode`, `currentStyles`, `createBuilder`).

In `@src/lib/utils.js`:
- Line 23: The call to sleep in function run is not awaited so retries occur
immediately; change run to be async (declare async function run(...)) and await
sleep(retryDelay) where currently called, and then update any callers to await
run(...) so the retry delay actually pauses; alternatively, if you must keep run
synchronous implement a synchronous/blocking sleep used in run instead of the
Promise-based sleep, but the recommended fix is to make run async and await
sleep to preserve non-blocking behavior.

In `@src/test/test.js`:
- Around line 1-13: Move the "import { testCases } from \"./test-cases.js\";"
statement up with the other imports at the top of the file so all module imports
are grouped together; specifically, relocate the testCases import before the
const __filename declaration (alongside imports of spawn, assert, fileURLToPath,
path, fs, deleteFolder) while leaving the __filename, __dirname, and cliPath
variable initializations unchanged.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between f0394f5 and 8dc5e86.

📒 Files selected for processing (15)
  • .github/scripts/parse-logs.js
  • biome.json
  • docs/script.js
  • docs/site.webmanifest
  • docs/style.css
  • package.json
  • src/index.js
  • src/lib/colors.js
  • src/lib/prompts.js
  • src/lib/templates.js
  • src/lib/utils.js
  • src/test/generate-tests.js
  • src/test/interactive.test.js
  • src/test/test-cases.js
  • src/test/test.js
💤 Files with no reviewable changes (1)
  • biome.json
🧰 Additional context used
🧬 Code graph analysis (6)
src/lib/templates.js (2)
src/index.js (1)
  • pagesPath (396-402)
src/lib/utils.js (2)
  • createFolder (52-54)
  • createFolder (52-54)
src/test/test-cases.js (2)
src/test/generate-tests.js (1)
  • testCases (52-52)
src/index.js (1)
  • projectPath (35-35)
src/lib/prompts.js (4)
src/lib/colors.js (1)
  • chalk (91-91)
src/test/generate-tests.js (1)
  • prompt (18-24)
src/index.js (2)
  • answers (74-74)
  • answers (293-307)
src/test/interactive.test.js (4)
  • answers (41-41)
  • answers (66-66)
  • answers (99-99)
  • answers (133-133)
src/index.js (1)
src/lib/utils.js (6)
  • run (8-34)
  • run (8-34)
  • writeFile (36-42)
  • writeFile (36-42)
  • deleteFolder (62-66)
  • deleteFolder (62-66)
src/test/generate-tests.js (2)
src/lib/prompts.js (1)
  • prompt (110-117)
src/test/test-cases.js (2)
  • testCases (5-101)
  • testCases (5-101)
src/test/interactive.test.js (1)
src/lib/utils.js (3)
  • i (9-9)
  • readFile (44-46)
  • readFile (44-46)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Node 20.x - pnpm
  • GitHub Check: Node 20.x - yarn
  • GitHub Check: Node 22.x - yarn
  • GitHub Check: Node 20.x - npm
  • GitHub Check: Node 22.x - npm
  • GitHub Check: Node 22.x - pnpm
🔇 Additional comments (20)
docs/style.css (1)

1-523: LGTM!

The CSS formatting changes are consistent and improve readability. Whitespace normalization and double-quote standardization applied correctly throughout.

.github/scripts/parse-logs.js (1)

1-2: LGTM!

Good modernization to use node: prefixed imports for built-in modules. This is the recommended practice in modern Node.js and helps distinguish built-ins from npm packages.

docs/script.js (1)

1-61: LGTM!

Formatting changes (semicolons, indentation, double quotes) are consistent. The code structure remains unchanged.

src/test/test-cases.js (2)

1-3: LGTM!

Import modernization to use node: prefixed built-in modules is consistent with the rest of the repository changes.


5-101: Formatting changes look good.

String quote normalization to double quotes and whitespace adjustments are consistent throughout the test cases. Test logic remains unchanged.

src/lib/prompts.js (3)

1-2: LGTM!

The import modernization to use the node: prefix for the readline module aligns with Node.js best practices and the PR's formatting objectives.


6-14: LGTM!

The getRl function correctly implements lazy initialization of the readline interface with proper formatting.


20-108: LGTM!

The processQuestion function correctly handles all three question types (confirm, list, input) with proper validation loops and default value handling. The use of Number.isNaN at line 67 is the correct choice over the global isNaN function.

src/lib/utils.js (2)

1-3: LGTM!

Import modernization to use the node: prefix is consistent with the rest of the codebase.


36-66: LGTM!

File system utility functions are correctly implemented with proper existence checks before operations.

src/lib/templates.js (1)

1-2: LGTM!

Import modernization and formatting changes are consistent with the PR objectives.

src/test/interactive.test.js (2)

1-6: LGTM!

Import modernization and cleanup of unused imports (createFolder, writeFile) are appropriate changes.


13-167: LGTM!

The interactive mode tests are well-structured with proper setup/teardown and appropriate assertions for each feature (pages, biome linter, prisma ORM, shadcn UI).

src/test/test.js (1)

30-62: LGTM!

The runTest helper function correctly manages the CLI spawn process with stdin piping for answers and proper cleanup.

src/index.js (6)

1-7: LGTM!

Import modernization to use the node: prefix and formatting standardization are consistent with the PR objectives.


12-12: LGTM!

Good practice to explicitly specify radix 10 in parseInt to avoid unexpected behavior with strings starting with "0".


86-121: LGTM!

The interactive mode detection logic correctly identifies project configuration from existing files and handles package manager detection appropriately.


352-369: Note: Retry functionality may not delay as expected.

This code calls run() with retry parameters, but as noted in src/lib/utils.js, the sleep() call in the retry logic is not awaited, so retries will occur immediately without the intended delay.

This is a cross-file concern. The fix should be applied in src/lib/utils.js as noted in that file's review.


467-505: LGTM!

Biome linter setup correctly checks for existing installation before proceeding and handles errors appropriately.


1101-1119: LGTM!

Error handling and cleanup logic correctly checks whether the project directory was created by this process before attempting cleanup, preventing accidental deletion of the user's working directory.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread docs/site.webmanifest
Comment thread package.json Outdated
Comment thread src/lib/colors.js Outdated
Comment thread src/lib/utils.js Outdated
Comment thread src/test/test.js Outdated
@gaureshpai
gaureshpai marked this pull request as draft February 1, 2026 13:21

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/test/generate-tests.js`:
- Around line 41-42: In src/test/generate-tests.js the condition using
Number.isNaN(defaultValue) is wrong because Number.isNaN never returns true for
strings; change the logic in the block that sets prompt.default to first convert
defaultValue to a number (e.g., parsed = Number(defaultValue) or +defaultValue)
and then check that parsed is a valid number (e.g., !Number.isNaN(parsed) or
Number.isFinite(parsed)) before assigning prompt.default = parsed; keep using
the existing variables defaultValue and prompt.default to locate and replace the
failing condition.

In `@src/test/test.js`:
- Around line 31-42: The variables _stdout and _stderr are populated in the
child.stdout.on and child.stderr.on handlers but never read; either remove those
variables and the concatenation lines to avoid unnecessary memory allocation, or
keep them and use them in an assertion or diagnostic when the child exits (e.g.,
in child.on("close"/"exit") or the test completion callback) to log or assert
expected output. Locate the handlers referencing _stdout/_stderr
(child.stdout.on("data", ...) and child.stderr.on("data", ...)) and either
delete the _stdout/_stderr declarations and the "+= data.toString()" lines, or
add a final check that reads _stdout/_stderr for test assertions or error
diagnostics.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between 8dc5e86 and 12dff5f.

📒 Files selected for processing (6)
  • docs/site.webmanifest
  • src/index.js
  • src/lib/colors.js
  • src/lib/utils.js
  • src/test/generate-tests.js
  • src/test/test.js
🧰 Additional context used
🧬 Code graph analysis (2)
src/index.js (2)
src/lib/colors.js (1)
  • chalk (90-90)
src/lib/utils.js (10)
  • run (8-40)
  • run (8-40)
  • fileExists (54-56)
  • fileExists (54-56)
  • writeFile (42-48)
  • writeFile (42-48)
  • createFolder (58-60)
  • createFolder (58-60)
  • deleteFolder (68-72)
  • deleteFolder (68-72)
src/lib/utils.js (1)
src/lib/colors.js (1)
  • chalk (90-90)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Node 20.x - npm
  • GitHub Check: Node 20.x - pnpm
  • GitHub Check: Node 22.x - pnpm
  • GitHub Check: Node 22.x - yarn
  • GitHub Check: Node 22.x - npm
  • GitHub Check: Node 20.x - yarn
🔇 Additional comments (7)
src/lib/colors.js (1)

83-84: LGTM! Previous issue addressed.

The _open variable is now properly used in the createBuilder call, resolving the previously flagged dead code issue.

src/test/test.js (1)

1-7: LGTM! Import ordering issue resolved.

All imports are now properly grouped at the top of the file, addressing the previous review feedback.

src/lib/utils.js (1)

8-40: LGTM! Critical async/await issue resolved.

The run function is now properly async and await sleep(retryDelay) on line 29 ensures retry delays work as intended. The callers in src/index.js have been updated accordingly.

src/index.js (2)

1-7: LGTM! Modernized imports and consistent async handling.

The migration to node: namespace imports and proper await usage on all run() calls throughout the file is correctly implemented.


12-12: Good practice: explicit radix in parseInt.

Using parseInt(value, 10) with explicit radix prevents unexpected behavior with strings starting with "0".

src/test/generate-tests.js (2)

1-5: LGTM! Modernized imports.

Node.js namespace imports are correctly applied.


135-138: Use of eval() is acceptable here but worth noting.

The eval(tc.assertions) is used within a controlled test generation context where the assertion strings are generated by this same script. While eval() is generally discouraged, this usage is acceptable for test scaffolding purposes since the input is not user-controlled.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread src/test/generate-tests.js Outdated
Comment thread src/test/test.js
@gaureshpai
gaureshpai marked this pull request as ready for review February 1, 2026 13:28
…cts with configurable features and accompanying documentation.

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

Actionable comments posted: 10

Caution

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

⚠️ Outside diff range comments (1)
src/test/generate-tests.js (1)

138-141: 🧹 Nitpick | 🔵 Trivial

Using eval() for assertions works but limits flexibility.

The current approach stores assertions as strings and evaluates them at runtime. This works for simple assertions but has limitations:

  • No IDE support (syntax highlighting, error checking) for assertion code
  • Harder to debug if assertions fail

Consider whether the assertions need to be serialized as strings, or if the generated file could contain actual function bodies.

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 71-92: README.md has headings and fenced code blocks missing
surrounding blank lines (MD022/MD031); update the file to add a blank line after
each top-level or subsection heading (e.g., "### 🏗️ Project Scaffolding", "###
🛠️ Tooling & Integrations", "Advanced Features", "Troubleshooting") and ensure
there is an empty line before and after any fenced code block; scan the Advanced
Features and Troubleshooting sections and insert the missing blank lines
consistently so each heading is followed by one blank line and each code fence
has a blank line above and below.
- Around line 407-410: The contributors image <img
src="https://contrib.rocks/image?repo=gaureshpai/create-next-quick" /> is
missing an alt attribute; add a meaningful alt value to the <img> element (for
example "Contributors to create-next-quick on GitHub" or similar) to improve
screen-reader accessibility while keeping the descriptive text brief and
relevant.
- Around line 318-322: Replace the "Permission Errors" example that suggests
using "sudo npx create-next-quick my-app" with guidance that recommends safer
alternatives: advise using a Node version manager (nvm/fnm) to avoid global
permission issues, instruct users to fix npm permissions by setting a user-local
npm prefix, and tell users to create projects in user-owned directories; remove
the explicit "sudo npx ..." line and update the section header/content
accordingly (look for the "Permission Errors" section and the example showing
"sudo npx create-next-quick my-app").
- Around line 39-42: The Table of Contents contains two invalid entries:
"[Project Structure](`#-project-structure`)" and "[Changelog](`#-changelog`)";
either add matching headings "Project Structure" and "Changelog" to the README
(using exact heading text so the anchor IDs match) or remove those two lines
from the TOC; update the TOC entries to match existing headings if you prefer
different titles (ensure anchors like "#project-structure" and "#changelog" are
correct if you change wording).

In `@src/index.js`:
- Around line 939-943: The Vitest config generation hardcodes the '@' alias to
'./src' causing imports to break when useSrcDir is false; update the
vitestConfigContent generation so the resolve.alias for '@' uses the useSrcDir
flag (e.g., interpolate '${useSrcDir ? "./src" : "."}') instead of always
'./src' so the alias points to project root when no src directory exists; locate
the vitestConfigContent template string in src/index.js and modify the alias
line inside the resolve block accordingly, keeping other fields (setupFiles,
useTypeScript) unchanged.
- Line 972: The call to run(`${packageManager} install --save-dev ${deps.join("
")}`, projectPath, false) lacks error handling; update the code around the run
invocation that installs Jest dev deps to capture the returned result or catch
thrown errors from run() (the same pattern used for the Vitest setup), check
whether the installation succeeded, and on failure log an informative error via
the existing logger or processLogger and abort (throw or process.exit(1)) with
context including packageManager, deps, and projectPath so failures are
detectable and consistent with other setup flows.
- Line 1006: The install call await run(`${packageManager} install
next-auth@beta`, projectPath, false) lacks error handling; wrap this run
invocation (and the other two identical auth installs) in the same
error-checking pattern used for ORM/linter setup: either try/catch the await
run(...) and on failure call the existing logger/processLogger.error with the
error details and exit (process.exit(1)) or check the run result and bail
similarly. Update the three locations that call run(...) with packageManager,
projectPath and next-auth@beta to use that pattern so failures are logged with
the error and the process terminates.
- Line 923: The await run(installCmd, projectPath, false) call currently ignores
failures; change it to capture the result (e.g., const result = await
run(installCmd, projectPath, false)) and then check result.success like other
run() usages in this file, logging an error and exiting/throwing when
installation fails so a missing Vitest dependency is reported immediately (refer
to the run function call and the installCmd and projectPath variables to locate
the call).

In `@src/test/generate-tests.js`:
- Around line 69-73: The repeated ternary for resolving prompt defaults
(p.default !== undefined ? p.default : p.type === "confirm" ? false : "") used
when populating enableTestCase.options from extractedPrompts should be extracted
into a small helper (e.g., getPromptDefault or resolveDefaultForPrompt) that
accepts a prompt object and returns the correct default; replace all four
occurrences (the loops referencing extractedPrompts and assignments to
enableTestCase.options) with calls to this helper to centralize the logic and
improve maintainability.

In `@src/test/test.js`:
- Around line 44-53: The interval loop writing answers to the child process
(variables i, interval, answers and calls to child.stdin.write) can attempt
writes after the child has exited; add robustness by registering a 'close'
(and/or 'exit' and 'error') handler on child to call clearInterval(interval) and
ensure child.stdin is ended, and before each write check child.stdin.writable
(or wrap child.stdin.write in a try/catch and guard with if (!child.killed) to
avoid throws); also attach an 'error' listener on child and child.stdin to stop
the interval and handle/propagate the error instead of letting the interval
continue.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between 12dff5f and 9d13ce1.

📒 Files selected for processing (5)
  • README.md
  • docs/index.html
  • src/index.js
  • src/test/generate-tests.js
  • src/test/test.js
🧰 Additional context used
🧬 Code graph analysis (3)
src/test/test.js (4)
src/test/interactive.test.js (12)
  • __filename (8-8)
  • __dirname (9-9)
  • cliPath (11-11)
  • i (44-44)
  • i (70-70)
  • i (103-103)
  • i (137-137)
  • i (174-174)
  • answers (41-41)
  • answers (66-66)
  • answers (99-99)
  • answers (133-133)
src/lib/utils.js (1)
  • i (15-15)
src/index.js (2)
  • answers (74-74)
  • answers (293-307)
src/lib/prompts.js (1)
  • answers (111-111)
src/test/generate-tests.js (2)
src/lib/prompts.js (1)
  • prompt (110-117)
src/test/test-cases.js (2)
  • testCases (5-101)
  • testCases (5-101)
src/index.js (1)
src/lib/utils.js (10)
  • run (8-40)
  • run (8-40)
  • fileExists (54-56)
  • fileExists (54-56)
  • writeFile (42-48)
  • writeFile (42-48)
  • createFolder (58-60)
  • createFolder (58-60)
  • deleteFolder (68-72)
  • deleteFolder (68-72)
🪛 markdownlint-cli2 (0.20.0)
README.md

[warning] 31-31: Link fragments should be valid

(MD051, link-fragments)


[warning] 39-39: Link fragments should be valid

(MD051, link-fragments)


[warning] 42-42: Link fragments should be valid

(MD051, link-fragments)


[warning] 54-54: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 54-54: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 55-55: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 55-55: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 56-56: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 56-56: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 57-57: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 57-57: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 58-58: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 58-58: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 59-59: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 59-59: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 60-60: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 60-60: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 61-61: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 61-61: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 62-62: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 62-62: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 63-63: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 63-63: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 64-64: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 64-64: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 65-65: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 65-65: Table column style
Table pipe does not align with header for style "aligned"

(MD060, table-column-style)


[warning] 71-71: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 78-78: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 88-88: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 178-178: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 182-182: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 189-189: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 196-196: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 209-209: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 210-210: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 216-216: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 217-217: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 223-223: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 224-224: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 231-231: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 232-232: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 240-240: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 241-241: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 264-264: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 288-288: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 289-289: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 293-293: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 294-294: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 298-298: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 299-299: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 309-309: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 310-310: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 318-318: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 319-319: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 324-324: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 325-325: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 330-330: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 331-331: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 336-336: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 337-337: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 409-409: Images should have alternate text (alt text)

(MD045, no-alt-text)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Node 22.x - npm
  • GitHub Check: Node 20.x - yarn
  • GitHub Check: Node 22.x - yarn
  • GitHub Check: Node 20.x - pnpm
  • GitHub Check: Node 22.x - pnpm
  • GitHub Check: Node 20.x - npm
🔇 Additional comments (15)
docs/index.html (1)

330-344: LGTM!

The new table rows for Testing, Authentication, and Docker options are well-structured and consistent with the existing table format. The default values align with the described feature behavior (none/No for optional features).

README.md (1)

1-44: Documentation improvements look good overall.

The restructured README with the comprehensive Table of Contents, feature comparison table, and detailed sections significantly improves the documentation quality. The content aligns well with the corresponding docs/index.html changes.

src/test/generate-tests.js (2)

1-5: LGTM!

The imports correctly use the node: prefix for built-in modules, aligning with the PR's modernization goals. File path resolution is clean.


42-47: Past issue resolved: Numeric parsing is now correct.

The fix properly converts defaultValue to a Number first, then checks Number.isNaN(parsed). This correctly handles string inputs like "pnpm" which will now fall through to the string default case.

src/test/test.js (3)

1-11: LGTM!

Imports are properly grouped at the top of the file (addressing the past review comment), and all built-in modules correctly use the node: prefix.


31-42: Past issue resolved: _stdout and _stderr are now used for diagnostics.

The accumulated output is logged when the CLI exits with a non-zero code, which aids in debugging test failures. This addresses the previous review comment about unused variables.

Also applies to: 55-59


66-109: LGTM!

The test case iteration correctly maps options to CLI inputs. The escape sequences for list navigation and the handling of confirm prompts align with expected CLI behavior.

src/index.js (8)

3-6: LGTM!

Good modernization: using node: prefixes for built-in modules aligns with Node.js best practices and makes it explicit that these are core modules.


41-48: LGTM!

Correctly awaiting the async run() calls for package manager detection. The silent mode with proper success checking is appropriate here.


207-211: LGTM!

The package manager default selection logic correctly prioritizes pnpm over yarn over npm based on availability, which aligns with common developer preferences for faster package managers.


352-369: LGTM!

Good use of retry logic (3 retries with 2s delay) for the network-dependent create-next-app command. The error handling provides helpful troubleshooting tips for common failure scenarios.


657-678: LGTM!

Good implementation distinguishing TypeScript and JavaScript configurations. The TypeScript version correctly uses satisfies Config for type-safe inference, while the JavaScript version appropriately uses JSDoc type annotations for editor support without requiring TypeScript.


757-777: LGTM!

The components.json configuration correctly handles all combinations of useAppDir and useSrcDir for the CSS path, and merging with existing config preserves user customizations.


892-908: LGTM with minor note.

The Dockerfile follows the official Next.js Docker example pattern. The next.config.mjs update includes appropriate fallback handling with a user-facing warning when the automatic update can't be applied.


1125-1138: LGTM!

Excellent defensive cleanup logic. The conditions properly ensure that:

  • Only directories created by this CLI run are cleaned up
  • The current working directory is never deleted
  • Pre-existing directories are preserved

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md
Comment thread src/index.js Outdated
Comment thread src/index.js
Comment thread src/index.js Outdated
Comment thread src/index.js Outdated
Comment thread src/test/generate-tests.js
Comment thread src/test/test.js

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@src/index.js`:
- Around line 927-928: The generated Vitest config currently uses bare imports
`import path from 'path'` and `import { fileURLToPath } from 'url'`; update
these to use the Node namespace by changing them to `import path from
'node:path'` and `import { fileURLToPath } from 'node:url'` wherever the
template or generator in src/index.js emits those lines (look for the code that
produces the Vitest config or the template string that contains `path` and
`fileURLToPath`) so the generated config matches the CLI's `node:`-prefixed
import style.
- Around line 92-112: Replace direct fs.existsSync usage with the fileExists
helper for consistency and to centralize FS checks: use fileExists when setting
answers.useSrcDir and answers.useAppDir (and the nested src/app check) instead
of fs.existsSync, and use fileExists to check for package.json before reading it
in the Tailwind detection block; keep the existing logic for packageManager
assignment and Tailwind detection but call fileExists in place of fs.existsSync
so all presence checks use the same helper (references: fileExists,
answers.useSrcDir, answers.useAppDir, packageJsonPath, useTailwind).

In `@src/test/generate-tests.js`:
- Around line 14-15: The current promptObjectRegex in generate-tests.js is
order-dependent and will miss prompt objects if properties in src/index.js are
reordered; either replace the brittle regex with an order-agnostic extractor
(e.g., parse the prompt definitions with a small JS AST parser or a more
flexible regex that matches key/value pairs in any order) or keep the existing
regex but add a validation step after extraction that compares the number of
extracted prompts to the expected count from src/index.js and emits a clear
warning (use the symbol promptObjectRegex for the extractor and the extraction
result variable) when fewer prompts are found so the mismatch is surfaced to the
developer.

In `@src/test/test.js`:
- Line 128: The confirm-answer pattern for testCase.options.docker (currently
using "y" for true and "" for false) is inconsistent with other confirms that
use "" for true and "n" for false; update the code to centralize/clarify this by
adding a helper function (e.g., mapConfirmAnswer(desiredValue, defaultValue))
and replace direct usages including the docker check (testCase.options.docker)
and the other confirm prompts with calls to that helper so the mapping (desired
vs default → answer string) is explicit and consistent, and add a short comment
on the helper explaining the mapping behavior.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between 9d13ce1 and 1f5f065.

📒 Files selected for processing (4)
  • README.md
  • src/index.js
  • src/test/generate-tests.js
  • src/test/test.js
🧰 Additional context used
🧬 Code graph analysis (3)
src/test/test.js (3)
src/test/interactive.test.js (12)
  • __filename (8-8)
  • __dirname (9-9)
  • cliPath (11-11)
  • i (44-44)
  • i (70-70)
  • i (103-103)
  • i (137-137)
  • i (174-174)
  • answers (41-41)
  • answers (66-66)
  • answers (99-99)
  • answers (133-133)
src/index.js (2)
  • answers (74-74)
  • answers (293-307)
src/test/test-cases.js (2)
  • testCases (5-101)
  • testCases (5-101)
src/test/generate-tests.js (1)
src/test/test-cases.js (2)
  • testCases (5-101)
  • testCases (5-101)
src/index.js (1)
src/lib/utils.js (10)
  • run (8-40)
  • run (8-40)
  • fileExists (54-56)
  • fileExists (54-56)
  • writeFile (42-48)
  • writeFile (42-48)
  • createFolder (58-60)
  • createFolder (58-60)
  • deleteFolder (68-72)
  • deleteFolder (68-72)
🪛 LanguageTool
README.md

[grammar] ~192-~192: Ensure spelling is correct
Context: ...commit hooks with Husky ### ORMs #### Prisma - Automatically installs prisma and `@pr...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.20.0)
README.md

[warning] 274-274: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Node 20.x - yarn
  • GitHub Check: Node 22.x - yarn
  • GitHub Check: Node 22.x - pnpm
  • GitHub Check: Node 22.x - npm
  • GitHub Check: Node 20.x - pnpm
  • GitHub Check: Node 20.x - npm
🔇 Additional comments (17)
src/test/test.js (3)

1-7: LGTM! Import organization improved.

All imports are now properly grouped at the top of the file with node: prefixed built-in modules. The testCases import has been moved up as suggested in previous reviews.


28-93: LGTM! Robust child process handling.

The runTest function now properly addresses previous review concerns:

  • _stdout and _stderr are used for error diagnostics when the process exits with non-zero code (lines 81-83)
  • Interval is properly cleared in close, exit, and error handlers
  • Guards check !child.killed && child.stdin.writable before writing
  • Optional chaining on child.stdin?.end() prevents errors on closed streams

100-103: Remove this comment — the test answer logic is correct.

The test spawns the CLI without -i flag or project name argument, which invokes the else-branch prompt flow (lines 201–287). In that flow, useShadcn defaults to true (line 266), so the test answer logic at line 115 (testCase.options.useShadcn ? "" : "n") correctly maps:

  • true → "" (Enter accepts the default: true) ✓
  • false → "n" (rejects the default, results in false) ✓

The alternate useShadcn prompt with default: false (line 153) is only used in interactive mode (-i flag), which the test does not invoke. The answer construction for docker at line 128 is also correct.

src/test/generate-tests.js (5)

1-5: LGTM! Clean setup with node: prefixed imports.

The imports and file path setup are straightforward and follow the repository's convention for using node: prefixed built-in modules.


42-47: LGTM! Number parsing bug fixed.

The previous review correctly identified that Number.isNaN(defaultValue) was incorrect. This is now properly fixed by first parsing to a number (const parsed = Number(defaultValue)) and then checking Number.isNaN(parsed).


58-64: LGTM! Helper function extracted as suggested.

The getPromptDefault helper consolidates the repeated default-value resolution logic that was previously duplicated four times, improving maintainability.


66-132: LGTM! Test case generation logic is well-structured.

The code properly handles all three prompt types (confirm, list, input) and generates appropriate test case variations. The use of getPromptDefault ensures consistent default value handling across all cases.


142-148: Acceptable use of eval() with proper documentation.

The comment appropriately explains that eval() is used here for test scaffolding purposes only, and the assertion strings are generated by this script (hardcoded at lines 74, 90, 106, 121) rather than from user input. Since all assertions are the static string "assert.ok(fs.existsSync(projectPath), 'Project directory should exist');", there's no code injection risk.

However, if more complex assertions are added in the future that incorporate dynamic data from extractedPrompts, this could become a security concern.

src/index.js (9)

3-4: LGTM!

Good modernization to use the node: prefix for built-in modules, improving clarity and aligning with current Node.js best practices.


41-49: LGTM!

Properly awaits the async run() calls and correctly checks the success property for package manager detection.


123-175: LGTM!

Interactive prompts are well-structured with sensible defaults and proper input filtering for comma-separated page names.


352-369: LGTM!

Excellent error handling pattern with retry support (3 attempts, 2s delay) and helpful troubleshooting tips on failure.


657-678: LGTM!

Good differentiation between TypeScript and JavaScript configurations. The TypeScript version uses proper type imports and satisfies Config, while JavaScript uses JSDoc type annotation.


972-986: LGTM!

Jest dependency installation now has proper error handling with retry support and detailed error output, consistent with other installation patterns in the file.


1020-1034: LGTM!

NextAuth installation now properly captures the result and handles failures with appropriate error messages, addressing the previous review feedback. The same pattern is correctly applied to Clerk and Lucia installations.


1181-1195: LGTM!

Safe cleanup logic that only removes directories created by this process, with proper guards against deleting existing directories or the current working directory.


757-784: LGTM!

Good configuration handling for Shadcn UI with proper path resolution based on useSrcDir and useAppDir flags. The Object.assign merge preserves any existing components.json settings while applying the custom configuration.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread src/index.js
Comment thread src/index.js Outdated
Comment thread src/test/generate-tests.js
Comment thread src/test/test.js Outdated

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 273-276: Add a blank line between the paragraph "Check your
Node.js version:" and the following fenced code block (the ```bash ... ```
block) in README.md so the markdown parser recognizes the code fence correctly;
locate the text "Check your Node.js version:" and insert an empty line
immediately before the line that begins with ```bash.
- Line 31: The Table of Contents link for "Configuration Options" uses a
URL-encoded emoji anchor; update the TOC entry that currently points to
"#%EF%B8%8F-configuration-options" so it points to "#configuration-options"
(matching the heading "## ⚙️ Configuration Options") to fix the broken anchor.
Ensure the link text remains "[Configuration Options]" and only the href/anchor
is changed.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between 1f5f065 and 949b42a.

📒 Files selected for processing (2)
  • README.md
  • src/index.js
🧰 Additional context used
🧬 Code graph analysis (1)
src/index.js (1)
src/lib/utils.js (10)
  • run (8-40)
  • run (8-40)
  • fileExists (54-56)
  • fileExists (54-56)
  • writeFile (42-48)
  • writeFile (42-48)
  • createFolder (58-60)
  • createFolder (58-60)
  • deleteFolder (68-72)
  • deleteFolder (68-72)
🪛 LanguageTool
README.md

[grammar] ~192-~192: Ensure spelling is correct
Context: ...commit hooks with Husky ### ORMs #### Prisma - Automatically installs prisma and `@pr...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.20.0)
README.md

[warning] 274-274: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🔇 Additional comments (7)
src/index.js (7)

3-4: LGTM! Node.js built-in imports standardized to node: namespace.

The update to use node:path and node:fs aligns with modern Node.js best practices and the PR's objective to standardize built-in imports.


24-25: LGTM! Clean argument parsing.

The logic correctly identifies the interactive mode flag and extracts the project name from non-flag arguments.


41-49: LGTM! Properly awaited package manager checks.

The async/await pattern correctly waits for yarn and pnpm version checks before proceeding, ensuring accurate package manager availability detection.


923-931: LGTM! Vitest installation now includes proper error handling.

The error handling for the Vitest dependency installation is now consistent with other installation flows, capturing failures and providing informative error messages.


654-690: LGTM! Drizzle config properly handles TypeScript vs JavaScript.

Good use of conditional logic to generate TypeScript (import type + satisfies) or JavaScript (JSDoc @type) configurations. The schema path and file extensions are correctly derived from the useTypeScript and useSrcDir flags.


1187-1205: LGTM! Robust cleanup logic with proper safeguards.

The error handler correctly checks multiple conditions before attempting cleanup, preventing accidental deletion of the current working directory or directories not created by this process. The conditional messaging clearly communicates whether cleanup occurred or was skipped.


1096-1103: Remove this comment—the code correctly implements NextAuth v5.

NextAuth v5 is App Router–first and requires the auth route handler at app/api/auth/[...nextauth]/route.ts as its recommended setup, even in Pages Router projects. Pages Router "support" in v5 means you can keep your application pages in /pages, but the authentication endpoints must still use the App Router route handler pattern. The current implementation is correct and does not need modification.

Likely an incorrect or invalid review comment.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread README.md Outdated
Comment thread README.md
…s with interactive configuration and various options.

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 21-42: Update the Table of Contents so the "Configuration Options"
link matches the heading text by changing the anchor to include the dash (use
#[-configuration-options] to match the heading "## ⚙️ Configuration Options"),
and add a missing "- [Show Your Support](`#-show-your-support`)" entry after the
License item so the existing "## Show Your Support" section is included in the
TOC.

In `@src/test/generate-tests.js`:
- Around line 157-163: The current testCases mapping uses eval in the assertions
property; instead create the assertion function directly and reference it
instead of eval. Concretely, define a shared function (e.g. const
defaultAssertion = (projectPath) => { assert.ok(fs.existsSync(projectPath),
'Project directory should exist'); }) and then when building testCases replace
assertions: (projectPath) => { eval(tc.assertions) } with assertions:
defaultAssertion (or embed the function body directly when generating the JSON
so assertions is a real function), updating the testCases variable and the
assertions property accordingly to remove eval() while keeping the same
signature (projectPath).
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between 949b42a and a77c6c6.

📒 Files selected for processing (4)
  • README.md
  • src/index.js
  • src/test/generate-tests.js
  • src/test/test.js
🧰 Additional context used
🧬 Code graph analysis (3)
src/test/test.js (3)
src/index.js (2)
  • answers (74-74)
  • answers (293-307)
src/lib/prompts.js (1)
  • answers (111-111)
src/test/test-cases.js (2)
  • testCases (5-101)
  • testCases (5-101)
src/index.js (2)
src/lib/colors.js (1)
  • chalk (90-90)
src/lib/utils.js (10)
  • run (8-40)
  • run (8-40)
  • fileExists (54-56)
  • fileExists (54-56)
  • writeFile (42-48)
  • writeFile (42-48)
  • createFolder (58-60)
  • createFolder (58-60)
  • deleteFolder (68-72)
  • deleteFolder (68-72)
src/test/generate-tests.js (2)
src/lib/prompts.js (1)
  • prompt (110-117)
src/test/test-cases.js (2)
  • testCases (5-101)
  • testCases (5-101)
🪛 LanguageTool
README.md

[grammar] ~192-~192: Ensure spelling is correct
Context: ...commit hooks with Husky ### ORMs #### Prisma - Automatically installs prisma and `@pr...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.20.0)
README.md

[warning] 31-31: Link fragments should be valid

(MD051, link-fragments)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Node 22.x - yarn
  • GitHub Check: Node 20.x - pnpm
  • GitHub Check: Node 20.x - npm
  • GitHub Check: Node 20.x - yarn
  • GitHub Check: Node 22.x - npm
  • GitHub Check: Node 22.x - pnpm
🔇 Additional comments (30)
src/index.js (11)

3-7: LGTM! Node.js imports standardized to node: prefix.

The imports have been properly updated to use the node: namespace (node:path, node:fs), aligning with modern Node.js best practices and the PR's stated objective.


12-21: LGTM! Explicit radix in parseInt and improved error formatting.

The explicit base 10 in parseInt(currentNodeVersion.split(".")[0], 10) prevents potential issues with older JavaScript engines interpreting leading zeros as octal. Multi-line error message formatting improves readability.


41-49: LGTM! Async package manager detection.

The package manager availability checks now properly await the async run() function, ensuring the checks complete before proceeding.


92-112: LGTM! Consistent use of fileExists helper.

All existence checks now use the fileExists helper consistently, improving maintainability by centralizing filesystem checks.


654-691: LGTM! Drizzle config now respects TypeScript setting.

The Drizzle configuration generation correctly differentiates between TypeScript and JavaScript projects:

  • TypeScript: Uses import type and satisfies Config syntax
  • JavaScript: Uses JSDoc type annotation (/** @type {import('drizzle-kit').Config} */)
  • Schema file extension properly adapts based on useTypeScript

This aligns with the PR objective to generate appropriate file types.


923-956: LGTM! Vitest setup improvements.

All previously identified issues have been addressed:

  1. Error handling added for Vitest dependency installation (lines 923-931)
  2. The @ alias now correctly uses useSrcDir interpolation (line 949)
  3. Generated config uses node:path and node:url imports (lines 935-936)

980-994: LGTM! Jest dependency installation error handling.

Error handling has been added for Jest dependency installation, consistent with other installation patterns in the file.


1028-1042: LGTM! NextAuth installation error handling.

Error handling has been added for NextAuth.js installation, addressing the previous review comment about missing error handling for auth package installations.


1105-1119: LGTM! Clerk installation error handling.

Error handling properly added for Clerk installation.


1148-1162: LGTM! Lucia installation error handling.

Error handling properly added for Lucia installation.


1189-1203: LGTM! Improved cleanup safety.

The cleanup logic now properly guards against deleting:

  • The current working directory
  • Directories not created by this process

This is a good defensive programming practice.

src/test/test.js (6)

1-7: LGTM! Imports standardized and properly organized.

All imports now use the node: prefix and are grouped at the top of the file, addressing the previous review comment about import organization.


28-40: LGTM! mapConfirmAnswer helper addresses inconsistent answer patterns.

The helper function clearly documents and centralizes the logic for mapping boolean values to confirm prompt answers, addressing the previous review comment about inconsistent patterns between docker and other confirm prompts.


45-57: LGTM! _stdout and _stderr now used for diagnostics.

The accumulated output is now used in error diagnostics (lines 96-97), addressing the previous review comment about these variables being unused.


59-70: LGTM! Error handlers added for child process and stdin.

Proper error handling has been added for both the child process and stdin stream, with interval cleanup to prevent further write attempts after errors.


72-106: LGTM! Robust interval handling for premature child process exit.

The interval logic now:

  1. Checks child.killed and stdin.writable before writing
  2. Uses try/catch for write operations
  3. Clears the interval in both close and exit handlers
  4. Uses optional chaining for stdin?.end()

This addresses the previous review comment about robustness for premature child process exit.


109-152: LGTM! Test cases now use consistent mapConfirmAnswer helper.

All confirm prompts (TypeScript, Tailwind, SrcDir, AppDir, Shadcn, Docker) now use the mapConfirmAnswer helper with their respective default values, making the test input generation consistent and self-documenting.

src/test/generate-tests.js (5)

1-5: LGTM! Imports standardized to node: prefix.

The imports have been properly updated to use the node: namespace.


42-47: LGTM! Number.isNaN bug fixed.

The numeric parsing now correctly converts the string to a number before checking with Number.isNaN():

const parsed = Number(defaultValue);
if (defaultValue !== "" && !Number.isNaN(parsed)) {

This addresses the previous review comment about Number.isNaN(defaultValue) always returning false for strings.


56-69: LGTM! Validation added for prompt extraction.

A validation step now warns if fewer prompts were extracted than expected, addressing the previous review comment about the order-dependent regex potentially missing prompts.


73-79: LGTM! getPromptDefault helper extracted.

The repeated default-value resolution logic has been extracted into a helper function, addressing the previous review comment about maintainability.


149-167: LGTM! Generated test cases file uses consistent imports.

The generated file correctly uses node: prefixed imports, aligning with the rest of the codebase.

README.md (8)

273-277: LGTM: Blank line issue resolved.

The missing blank line before the code fence has been properly addressed. The formatting now complies with MD031.


333-351: LGTM: Excellent improvement to permission error guidance.

The unsafe sudo npx recommendation has been replaced with three safer alternatives:

  • Node version managers (nvm/fnm)
  • User-local npm prefix configuration
  • Using user-owned directories

This significantly improves security and prevents common npm permission issues.


441-441: LGTM: Accessibility improvement.

The contributors image now includes proper alt text (alt="Contributors"), improving screen reader accessibility.


239-247: LGTM: Accurate Vitest documentation.

The Vitest section correctly documents ES module compatible path resolution, which aligns with the PR's fix for ESM compatibility using import.meta.url and fileURLToPath.


190-207: LGTM: Accurate ORM documentation with TypeScript/JavaScript support.

The ORM sections correctly document that both Prisma and Drizzle support TypeScript and JavaScript projects, with appropriate file extensions (.ts or .js) generated based on the project configuration. This aligns with the PR's implementation of TypeScript-aware file generation for ORMs.


380-420: LGTM: Comprehensive contributing guidelines.

The contributing section provides clear, actionable steps for contributors, including:

  • Standard git workflow
  • Development setup commands
  • Testing and linting instructions
  • Conventional commits specification

This will help maintain code quality and consistency across contributions.


119-132: LGTM: Clear interactive mode documentation.

The interactive mode section effectively explains:

  • When to use it (existing Next.js projects)
  • What it detects (TypeScript, src dir, app dir, Tailwind)
  • What it skips (create-next-app, file removal)
  • What it prompts for (additive features only)

This clearly communicates the value proposition and expected behavior.


45-64: LGTM: Effective differentiation from create-next-app.

The comparison table clearly articulates the value proposition of create-next-quick with specific, verifiable features. The inclusion of Authentication, Testing, and Docker support as key differentiators aligns with the capabilities documented in the Advanced Features section.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread README.md Outdated
Comment thread src/test/generate-tests.js Outdated

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 215-258: Replace the incorrect ```bash``` fenced blocks that
contain plain lists in the README sections for "NextAuth.js (v5 Beta)", "Clerk",
"Lucia", "Vitest", and "Jest" with either plain text (no fences) or a neutral
fenced language like ```text``` so the list items are not treated as shell
commands; update the code blocks currently under those headings (the blocks that
start with "- Automatically sets up:" / "- Automatically configures:") to use
```text``` or move the bullet lists outside of any triple-backtick fence while
keeping the same content and bullets in the same sections.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between a77c6c6 and e4c1ba4.

📒 Files selected for processing (2)
  • README.md
  • src/test/generate-tests.js
🧰 Additional context used
🧬 Code graph analysis (1)
src/test/generate-tests.js (2)
src/lib/prompts.js (1)
  • prompt (110-117)
src/test/test-cases.js (2)
  • testCases (5-101)
  • testCases (5-101)
🪛 LanguageTool
README.md

[grammar] ~193-~193: Ensure spelling is correct
Context: ...commit hooks with Husky ### ORMs #### Prisma - Automatically installs prisma and `@pr...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.20.0)
README.md

[warning] 31-31: Link fragments should be valid

(MD051, link-fragments)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Node 20.x - pnpm
  • GitHub Check: Node 20.x - yarn
  • GitHub Check: Node 20.x - npm
  • GitHub Check: Node 22.x - yarn
  • GitHub Check: Node 22.x - npm
  • GitHub Check: Node 22.x - pnpm
🔇 Additional comments (8)
src/test/generate-tests.js (8)

1-5: LGTM!

Import standardization to node: prefix and file path handling are correct.


9-54: LGTM!

The refactored loop structure with explicit null checks is cleaner and correctly advances both regex states at the end of their respective iterations.


42-47: LGTM! Numeric default parsing bug is fixed.

The conversion to Number(defaultValue) now happens before the Number.isNaN() check, correctly identifying non-numeric strings that would result in NaN.


56-69: LGTM! Validation addresses the fragile regex concern.

The warning mechanism helps detect when the order-dependent regex misses prompts due to property reordering. The actionable guidance in the warning message is helpful for debugging.


73-79: LGTM! Helper function extracts repeated logic.

getPromptDefault centralizes the default-value resolution that was previously duplicated four times across the test case generation loops.


81-143: LGTM!

Test case generation correctly uses the getPromptDefault helper throughout. The logic for each prompt type (confirm, list, input) is well-structured.


149-160: LGTM! Removed eval() in favor of direct function reference.

The defaultAssertion function is now defined directly in the generated file and assigned to test cases, eliminating the previous eval() usage. This is cleaner and more maintainable.


162-164: LGTM!

File writing and logging are straightforward.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread README.md

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 23-42: The TOC uses emoji-prefixed anchors (e.g., "#-features",
"#-why-create-next-quick", "#-advanced-features", "#-prerequisites") which don't
match GitHub's generated anchors; update each emoji-prefixed anchor in README.md
to its emoji-free, non-hyphenated form (e.g., change "#-features" ->
"#features", "#-why-create-next-quick" -> "#why-create-next-quick",
"#-advanced-features" -> "#advanced-features", "#-prerequisites" ->
"#prerequisites") so the links resolve correctly while leaving other non-emoji
anchors unchanged.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

📥 Commits

Reviewing files that changed from the base of the PR and between e4c1ba4 and 9a9709c.

📒 Files selected for processing (1)
  • README.md
🧰 Additional context used
🪛 LanguageTool
README.md

[grammar] ~193-~193: Ensure spelling is correct
Context: ...commit hooks with Husky ### ORMs #### Prisma - Automatically installs prisma and `@pr...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.20.0)
README.md

[warning] 31-31: Link fragments should be valid

(MD051, link-fragments)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Node 22.x - yarn
  • GitHub Check: Node 20.x - yarn
  • GitHub Check: Node 20.x - npm
  • GitHub Check: Node 20.x - pnpm
  • GitHub Check: Node 22.x - pnpm
  • GitHub Check: Node 22.x - npm

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread README.md Outdated
@gaureshpai
gaureshpai merged commit c3ca613 into main Feb 1, 2026
7 of 8 checks passed
@gaureshpai
gaureshpai deleted the fix/lint-and-format branch February 1, 2026 14:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant