feat: scaffold apps/web/ Next.js app shell#73
Conversation
|
@robertocarlous Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughScaffolds a Next.js 14 app at Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (5)
apps/web/src/app/globals.css (1)
1-3: Stylelint false positives: Configure linter to recognize Tailwind directives.The
@tailwinddirectives are valid Tailwind CSS syntax processed by PostCSS. The static analysis errors are false positives. To suppress them, configure Stylelint to recognize Tailwind:🔧 Add Stylelint configuration for Tailwind
Create or update
.stylelintrc.jsonorstylelint.config.js:{ "rules": { "at-rule-no-unknown": [ true, { "ignoreAtRules": ["tailwind"] } ], "scss/at-rule-no-unknown": [ true, { "ignoreAtRules": ["tailwind"] } ] } }Or if using
stylelint-config-standard:{ "extends": ["stylelint-config-standard"], "rules": { "at-rule-no-unknown": [ true, { "ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"] } ] } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/src/app/globals.css` around lines 1 - 3, Stylelint is flagging Tailwind's top-level directives (`@tailwind`) as unknown at-rules; update the Stylelint configuration (e.g., .stylelintrc.json or stylelint.config.js) to whitelist Tailwind and related directives so these PostCSS directives in globals.css are not treated as errors — add "tailwind" (and optionally "apply", "variants", "responsive", "screen") to the ignoreAtRules for at-rule-no-unknown and scss/at-rule-no-unknown rules (or extend stylelint-config-standard and adjust the same rule) so `@tailwind` base/components/utilities pass linting..gitignore (1)
19-23: Optional: Simplify redundant .env patterns.Lines 19-22 are redundant since line 23's
.env*.localpattern already matches all of them. You could remove lines 19-22 and keep only line 23, or remove line 23 and keep the explicit list for clarity.♻️ Option 1: Keep only the broader pattern
# Environment & secrets (commit only *.example templates) .env -.env.local -.env.development.local -.env.test.local -.env.production.local .env*.local♻️ Option 2: Keep explicit patterns only
# Environment & secrets (commit only *.example templates) .env .env.local .env.development.local .env.test.local .env.production.local -.env*.local🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.gitignore around lines 19 - 23, The .gitignore currently lists both explicit env files (.env.local, .env.development.local, .env.test.local, .env.production.local) and the broader pattern (.env*.local) which is redundant; remove the explicit entries and keep only the .env*.local pattern (or conversely remove .env*.local and keep the explicit list if you prefer clarity) so the ignore rules are not duplicated—update the file to contain just the chosen form (reference: .env.local, .env.development.local, .env.test.local, .env.production.local, .env*.local).apps/web/postcss.config.js (1)
1-6: LGTM! Standard PostCSS configuration for Tailwind.The CommonJS module export is valid. As an optional enhancement, Next.js 14 also supports ESM syntax:
export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/postcss.config.js` around lines 1 - 6, The current config uses a CommonJS export (module.exports) in postcss.config.js; optionally convert to ESM by replacing the module.exports object with an export default of the same plugins object to align with Next.js 14 ESM support — locate the module.exports assignment and swap it to an export default for the identical plugins structure (tailwindcss, autoprefixer) so behavior remains unchanged.apps/web/next-env.d.ts (1)
1-6: Consider gitignoring auto-generatednext-env.d.ts.This file is auto-generated by Next.js. While committing it is valid, many projects add it to
.gitignoresince it regenerates onnext dev. Both approaches work; this is purely a team preference.📝 Optional: Add to .gitignore
If you prefer to gitignore auto-generated files, add to
apps/web/.gitignore:# next.js /.next/ /out/ +next-env.d.ts🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/next-env.d.ts` around lines 1 - 6, Decide whether to stop committing the auto-generated next-env.d.ts; if you choose to gitignore it, add "next-env.d.ts" to apps/web/.gitignore and remove the tracked file from git with git rm --cached next-env.d.ts so it remains locally but is no longer committed; otherwise leave the committed file as-is (do not edit its contents) — reference file: next-env.d.ts.apps/web/package.json (1)
19-19: Pinlucide-reactto a semver range instead oflatest.Using
latestmakes installs non-reproducible across environments and can cause unexpected breakage when new versions release. Prefer an explicit version or semver range (e.g.,^0.XXX.0).Suggested fix
- "lucide-react": "latest" + "lucide-react": "^0.xxx.0"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/package.json` at line 19, The dependency "lucide-react" is pinned to "latest" making installs non-reproducible; update the apps' package.json entry for lucide-react to a concrete semver range (e.g., "^0.x.x" or the specific version you want) instead of "latest", then run your package manager (npm/yarn/pnpm) to regenerate the lockfile and commit both package.json and the updated lockfile; locate the dependency by the exact key "lucide-react" in package.json to change its value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/web/codegen.ts`:
- Line 6: Replace the incorrect output path string
'../packages/graphql/generated/index.ts' used in the codegen mapping with the
correct workspace-relative path '../../packages/graphql/generated/index.ts' so
the generated file targets the top-level packages/graphql/generated directory
(update the mapping entry where that string appears).
In `@package.json`:
- Around line 16-17: Update the Node.js engine requirement in package.json by
changing the "engines" -> "node" value from ">=18" to ">=18.17.0" so CI/dev
environments meet Next.js 14.2.x minimum; locate the "engines" block (the "node"
field) and set its version string to ">=18.17.0".
---
Nitpick comments:
In @.gitignore:
- Around line 19-23: The .gitignore currently lists both explicit env files
(.env.local, .env.development.local, .env.test.local, .env.production.local) and
the broader pattern (.env*.local) which is redundant; remove the explicit
entries and keep only the .env*.local pattern (or conversely remove .env*.local
and keep the explicit list if you prefer clarity) so the ignore rules are not
duplicated—update the file to contain just the chosen form (reference:
.env.local, .env.development.local, .env.test.local, .env.production.local,
.env*.local).
In `@apps/web/next-env.d.ts`:
- Around line 1-6: Decide whether to stop committing the auto-generated
next-env.d.ts; if you choose to gitignore it, add "next-env.d.ts" to
apps/web/.gitignore and remove the tracked file from git with git rm --cached
next-env.d.ts so it remains locally but is no longer committed; otherwise leave
the committed file as-is (do not edit its contents) — reference file:
next-env.d.ts.
In `@apps/web/package.json`:
- Line 19: The dependency "lucide-react" is pinned to "latest" making installs
non-reproducible; update the apps' package.json entry for lucide-react to a
concrete semver range (e.g., "^0.x.x" or the specific version you want) instead
of "latest", then run your package manager (npm/yarn/pnpm) to regenerate the
lockfile and commit both package.json and the updated lockfile; locate the
dependency by the exact key "lucide-react" in package.json to change its value.
In `@apps/web/postcss.config.js`:
- Around line 1-6: The current config uses a CommonJS export (module.exports) in
postcss.config.js; optionally convert to ESM by replacing the module.exports
object with an export default of the same plugins object to align with Next.js
14 ESM support — locate the module.exports assignment and swap it to an export
default for the identical plugins structure (tailwindcss, autoprefixer) so
behavior remains unchanged.
In `@apps/web/src/app/globals.css`:
- Around line 1-3: Stylelint is flagging Tailwind's top-level directives
(`@tailwind`) as unknown at-rules; update the Stylelint configuration (e.g.,
.stylelintrc.json or stylelint.config.js) to whitelist Tailwind and related
directives so these PostCSS directives in globals.css are not treated as errors
— add "tailwind" (and optionally "apply", "variants", "responsive", "screen") to
the ignoreAtRules for at-rule-no-unknown and scss/at-rule-no-unknown rules (or
extend stylelint-config-standard and adjust the same rule) so `@tailwind`
base/components/utilities pass linting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3ef3986e-ffe2-4ae0-8d21-9476f3c9edae
⛔ Files ignored due to path filters (2)
packages/graphql/generated/index.tsis excluded by!**/generated/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (22)
.gitignoreapps/web/.env.local.exampleapps/web/.gitignoreapps/web/codegen.tsapps/web/next-env.d.tsapps/web/next.config.mjsapps/web/package.jsonapps/web/postcss.config.jsapps/web/src/app/globals.cssapps/web/src/app/layout.tsxapps/web/src/app/page.tsxapps/web/src/lib/.gitkeepapps/web/tailwind.config.tsapps/web/tsconfig.jsonpackage.jsonpackages/graphql/package.jsonpackages/graphql/tsconfig.jsonpackages/types/package.jsonpackages/types/src/index.tspackages/types/tsconfig.jsonpnpm-workspace.yamlturbo.json
sotoJ24
left a comment
There was a problem hiding this comment.
Good job @robertocarlous
Closes #64
Summary by CodeRabbit
New Features
Chores