chore: fix linting and formatting issues across repository - #68
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughStandardizes Node core imports to the Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
✅ CI/CD Test ResultsOverall Status: success |
There was a problem hiding this comment.
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 | 🔴 CriticalTypeScript-only syntax used in JavaScript template.
The JavaScript layout template (when
useTypeScriptis false) includesimport type { Metadata } from "next"at line 71, which is TypeScript-only syntax. This will cause a syntax error when generating.jsfiles.🐛 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 | 🔴 CriticalCritical bug: Extracted prompts are never added to
extractedPromptsarray.The
promptobject is created inside the inner while loop (lines 18-46) but is never pushed toextractedPrompts. As a result,extractedPromptsremains 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 | 🔵 TrivialGenerated 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 onnode: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
📒 Files selected for processing (15)
.github/scripts/parse-logs.jsbiome.jsondocs/script.jsdocs/site.webmanifestdocs/style.csspackage.jsonsrc/index.jssrc/lib/colors.jssrc/lib/prompts.jssrc/lib/templates.jssrc/lib/utils.jssrc/test/generate-tests.jssrc/test/interactive.test.jssrc/test/test-cases.jssrc/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
getRlfunction correctly implements lazy initialization of the readline interface with proper formatting.
20-108: LGTM!The
processQuestionfunction correctly handles all three question types (confirm, list, input) with proper validation loops and default value handling. The use ofNumber.isNaNat line 67 is the correct choice over the globalisNaNfunction.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
runTesthelper 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
parseIntto 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 insrc/lib/utils.js, thesleep()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.jsas 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.
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
docs/site.webmanifestsrc/index.jssrc/lib/colors.jssrc/lib/utils.jssrc/test/generate-tests.jssrc/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
_openvariable is now properly used in thecreateBuildercall, 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
runfunction is now properlyasyncandawait sleep(retryDelay)on line 29 ensures retry delays work as intended. The callers insrc/index.jshave been updated accordingly.src/index.js (2)
1-7: LGTM! Modernized imports and consistent async handling.The migration to
node:namespace imports and properawaitusage on allrun()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 ofeval()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. Whileeval()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.
…cts with configurable features and accompanying documentation.
There was a problem hiding this comment.
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 | 🔵 TrivialUsing
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
📒 Files selected for processing (5)
README.mddocs/index.htmlsrc/index.jssrc/test/generate-tests.jssrc/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.htmlchanges.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
defaultValueto aNumberfirst, then checksNumber.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:_stdoutand_stderrare 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
pnpmoveryarnovernpmbased 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-appcommand. 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 Configfor type-safe inference, while the JavaScript version appropriately uses JSDoc type annotations for editor support without requiring TypeScript.
757-777: LGTM!The
components.jsonconfiguration correctly handles all combinations ofuseAppDiranduseSrcDirfor 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.mjsupdate 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.
…te and updated README documentation.
…d update README permission error advice.
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
README.mdsrc/index.jssrc/test/generate-tests.jssrc/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. ThetestCasesimport has been moved up as suggested in previous reviews.
28-93: LGTM! Robust child process handling.The
runTestfunction now properly addresses previous review concerns:
_stdoutand_stderrare used for error diagnostics when the process exits with non-zero code (lines 81-83)- Interval is properly cleared in
close,exit, anderrorhandlers- Guards check
!child.killed && child.stdin.writablebefore 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
-iflag or project name argument, which invokes the else-branch prompt flow (lines 201–287). In that flow,useShadcndefaults totrue(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
useShadcnprompt withdefault: false(line 153) is only used in interactive mode (-iflag), which the test does not invoke. The answer construction fordockerat 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 checkingNumber.isNaN(parsed).
58-64: LGTM! Helper function extracted as suggested.The
getPromptDefaulthelper 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 ofgetPromptDefaultensures consistent default value handling across all cases.
142-148: Acceptable use ofeval()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 thesuccessproperty 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
useSrcDiranduseAppDirflags. TheObject.assignmerge preserves any existingcomponents.jsonsettings while applying the custom configuration.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
README.mdsrc/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 tonode:namespace.The update to use
node:pathandnode:fsaligns 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 theuseTypeScriptanduseSrcDirflags.
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.tsas 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.
…s with interactive configuration and various options.
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
README.mdsrc/index.jssrc/test/generate-tests.jssrc/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 tonode: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 inparseIntand 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
awaitthe asyncrun()function, ensuring the checks complete before proceeding.
92-112: LGTM! Consistent use offileExistshelper.All existence checks now use the
fileExistshelper 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 typeandsatisfies Configsyntax- JavaScript: Uses JSDoc type annotation (
/**@type{import('drizzle-kit').Config} */)- Schema file extension properly adapts based on
useTypeScriptThis aligns with the PR objective to generate appropriate file types.
923-956: LGTM! Vitest setup improvements.All previously identified issues have been addressed:
- Error handling added for Vitest dependency installation (lines 923-931)
- The
@alias now correctly usesuseSrcDirinterpolation (line 949)- Generated config uses
node:pathandnode:urlimports (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!mapConfirmAnswerhelper 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
dockerand other confirm prompts.
45-57: LGTM!_stdoutand_stderrnow 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:
- Checks
child.killedandstdin.writablebefore writing- Uses try/catch for write operations
- Clears the interval in both
closeandexithandlers- 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 consistentmapConfirmAnswerhelper.All confirm prompts (TypeScript, Tailwind, SrcDir, AppDir, Shadcn, Docker) now use the
mapConfirmAnswerhelper 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 tonode:prefix.The imports have been properly updated to use the
node:namespace.
42-47: LGTM!Number.isNaNbug 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 returningfalsefor 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!getPromptDefaulthelper 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 npxrecommendation 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.urlandfileURLToPath.
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 (
.tsor.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.
…date README with a support section.
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
README.mdsrc/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 theNumber.isNaN()check, correctly identifying non-numeric strings that would result inNaN.
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.
getPromptDefaultcentralizes 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
getPromptDefaulthelper 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
defaultAssertionfunction is now defined directly in the generated file and assigned to test cases, eliminating the previouseval()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.
There was a problem hiding this comment.
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
📒 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.
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
.jsor.tsfiles based on project TypeScript setting.tsfiles even in JavaScript projects__dirnamewith properimport.meta.urlresolutionpathandfileURLToPathimport type { Metadata }from JavaScript layout templatesNumber.isNaN()check in test generatorChanged
run()utility function to asyncawaitto all 19+run()calls insrc/index.jsnode:prefix for all built-in modulesfs,path,child_process,url,process,assertnoAssignInExpressionslint warningsImproved
docs/index.htmlwith missing featuresTechnical Debt
_openin colors.js)[2.0.0] - 2025-12-XX
Added
-iflag.dockerignorefor efficient image creationnext.config.mjsChanged
[1.x.x] - Previous Versions
Features from v1.x
Migration Guides
Migrating from 1.x to 2.x
Breaking Changes:
New Features to Explore:
npx create-next-quick -iRecommended Actions:
npm cache clean --forceUpcoming Features (Roadmap)
v2.1.0 (Planned)
v2.2.0 (Planned)
v3.0.0 (Future)
Support
Summary by CodeRabbit
New Features
Documentation
Refactor
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.