Skip to content

initialize pnpm workspace with strict TS, ESLint, Prettier - #1

Merged
SaiCharan99 merged 1 commit into
mainfrom
develop
May 13, 2026
Merged

SaiCharan99 merged 1 commit into
mainfrom
develop

Conversation

@SaiCharan99

@SaiCharan99 SaiCharan99 commented May 13, 2026 •

Copy link
Copy Markdown
Owner

Set up the monorepo skeleton:

  • pnpm workspaces over apps/* and packages/*
  • TypeScript 5.7 with strict mode + noUncheckedIndexedAccess + exactOptionalPropertyTypes for maximum safety from day one
  • ESLint 9 flat config with typescript-eslint type-checked rules, no-explicit-any, and consistent-type-imports
  • Prettier with single quotes, trailing commas, 100-col width
  • Node 20+ pinned via .nvmrc and packageManager (pnpm 9.15.0)
  • Workspace-wide scripts: build, dev, lint, typecheck, format, test

Also auto-formats the docs added in the previous commit to match the Prettier config now that one exists.

Summary by CodeRabbit

  • Chores

    • Configured development environment with Node.js 20 requirement
    • Established code formatting and linting standards for the project
    • Set up TypeScript configuration with strict type-checking
  • Documentation

    • Updated channel configuration schema documentation with improved formatting
    • Reorganized build roadmap using structured tables with milestone details
    • Enhanced code style guidelines documentation

Review Change Stack

Set up the monorepo skeleton:

- pnpm workspaces over apps/* and packages/*
- TypeScript 5.7 with strict mode + noUncheckedIndexedAccess +
  exactOptionalPropertyTypes for maximum safety from day one
- ESLint 9 flat config with typescript-eslint type-checked rules,
  no-explicit-any, and consistent-type-imports
- Prettier with single quotes, trailing commas, 100-col width
- Node 20+ pinned via .nvmrc and packageManager (pnpm 9.15.0)
- Workspace-wide scripts: build, dev, lint, typecheck, format, test

Also auto-formats the docs added in the previous commit to match
the Prettier config now that one exists.
@SaiCharan99 SaiCharan99 changed the title chore: initialize pnpm workspace with strict TS, ESLint, Prettier initialize pnpm workspace with strict TS, ESLint, Prettier May 13, 2026
@coderabbitai

coderabbitai Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR establishes the foundational development environment for VideoGenAI by introducing configuration files for Node.js version management, package management, code formatting, linting, TypeScript compilation, and comprehensive project documentation including channel configuration schemas and build roadmap.

Changes

Development infrastructure setup

Layer / File(s) Summary
Node runtime and package management
.nvmrc, package.json, pnpm-workspace.yaml
Node.js version pinned to 20; root package.json defines workspace scripts (build, dev, lint, format, typecheck, test, clean) and dev dependencies (ESLint, Prettier, TypeScript); pnpm workspace configured for apps/* and packages/* submodules.
Code formatting standards
.prettierignore, .prettierrc.json
Prettier configuration enforces single quotes, 100-char width, 2-space indentation, trailing commas, LF line endings, and parenthesized arrow functions; ignore list covers build outputs, dependencies, and generated artifacts.
ESLint configuration
eslint.config.js
Flat-config ESLint with TypeScript integration, type-aware rule overrides (unused vars ignore underscore prefix, consistent type imports, no any, no-console warnings), and separate config-file override disabling type checking for *.config.* and *.cjs files.
TypeScript compilation configuration
tsconfig.base.json, tsconfig.json
Base config enables strict type checking (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes), ES2022/ESNext target, Bundler module resolution, declaration/source maps, and incremental builds; root config extends base, disables emit, clears includes/references.
Project documentation and guidelines
AGENTS.md, docs/CHANNELS.md, docs/PLAN.md
Code style conventions updated with consistent Markdown emphasis; channel configuration schema documents source_balance and bias_rules in research block, visual palette formatting; roadmap reorganized into phase commit tables (0–6) with exit criteria and risks reformatted as mitigation table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A foundation stone by stone we lay,
With Node and Prettier to light the way,
TypeScript's strictness holds us tight,
ESLint catches bugs in flight,
Now VideoGenAI can truly play! 🎬✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'initialize pnpm workspace with strict TS, ESLint, Prettier' directly and specifically summarizes the main changes: setting up a pnpm monorepo with TypeScript strict mode and linting/formatting tools.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@eslint.config.js`:
- Around line 23-25: Replace the incompatible import.meta.dirname usage for
tsconfigRootDir: import and use fileURLToPath(import.meta.url) and path.dirname
instead (e.g., tsconfigRootDir: path.dirname(fileURLToPath(import.meta.url))) so
the ESLint config works on Node >=20.10.0; update the top of eslint.config.js to
import { fileURLToPath } from 'url' and path (or dirname from 'path') and
reference the tsconfigRootDir property and import.meta.url in the new
expression.
🪄 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 Plus

Run ID: 79c6bbac-d811-4a4b-9c52-28ac7c32cb2f

📥 Commits

Reviewing files that changed from the base of the PR and between 103a899 and 07e1c13.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • .nvmrc
  • .prettierignore
  • .prettierrc.json
  • AGENTS.md
  • docs/CHANNELS.md
  • docs/PLAN.md
  • eslint.config.js
  • package.json
  • pnpm-workspace.yaml
  • tsconfig.base.json
  • tsconfig.json

Comment thread eslint.config.js
Comment on lines +23 to +25
projectService: true,
tsconfigRootDir: import.meta.dirname,
},

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

In Node.js official docs, what version introduced import.meta.dirname, and is it available in Node v20.10.0?

💡 Result:

import.meta.dirname was introduced in Node.js v20.11.0 and v21.2.0 according to the official Node.js documentation[1]. The feature was added via a pull request merged on 2023-10-31[2][3], backported to the v20 branch[4], and released in v20.11.0 on 2024-01-10[5][6]. Node.js v20.10.0 was released earlier on 2023-11-22[5][7] and does not include this feature, as confirmed by the absence in changelogs and version-specific docs. Therefore, it is not available in Node v20.10.0.

Citations:


import.meta.dirname is incompatible with the declared Node engine floor.

import.meta.dirname was added in Node v20.11.0, but the repo allows >=20.10.0. On Node 20.10.x this config will fail to load.

💡 Proposed fix (pick one)
# Option A: keep current code, bump engine floor
-  "node": ">=20.10.0"
+  "node": ">=20.11.0"
# Option B: keep engine floor, avoid import.meta.dirname
+import { dirname } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const tsconfigRootDir = dirname(fileURLToPath(import.meta.url));
...
-        tsconfigRootDir: import.meta.dirname,
+        tsconfigRootDir,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@eslint.config.js` around lines 23 - 25, Replace the incompatible
import.meta.dirname usage for tsconfigRootDir: import and use
fileURLToPath(import.meta.url) and path.dirname instead (e.g., tsconfigRootDir:
path.dirname(fileURLToPath(import.meta.url))) so the ESLint config works on Node
>=20.10.0; update the top of eslint.config.js to import { fileURLToPath } from
'url' and path (or dirname from 'path') and reference the tsconfigRootDir
property and import.meta.url in the new expression.

@SaiCharan99
SaiCharan99 merged commit 22c8b0a into main May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant