Skip to content

chore: add missing typecheck scripts to all packages#593

Merged
softmarshmallow merged 2 commits intomainfrom
chore/missing-typecheck-scripts-53db
Mar 19, 2026
Merged

chore: add missing typecheck scripts to all packages#593
softmarshmallow merged 2 commits intomainfrom
chore/missing-typecheck-scripts-53db

Conversation

@softmarshmallow
Copy link
Copy Markdown
Member

@softmarshmallow softmarshmallow commented Mar 19, 2026

Summary

Adds missing typecheck scripts to all package.json files in the monorepo that were lacking them, ensuring turbo typecheck covers the full workspace consistently.

Packages with existing tsconfig.json — added typecheck script only

Package Path
@grida/cg packages/grida-canvas-cg
@grida/color packages/grida-canvas-color
@grida/pixel-grid packages/grida-canvas-pixelgrid
@grida/ruler packages/grida-canvas-ruler
@grida/transparency-grid packages/grida-canvas-transparency-grid
@grida/cmath packages/grida-cmath
@grida/mixed-properties packages/grida-mixed-properties
@grida/tokens packages/grida-tokens
@grida/tree packages/grida-tree
treearray packages/lib/treearray
react-p-queue packages/react-p-queue
desktop desktop/ (not in pnpm workspace; script added for local use)

Packages without tsconfig.json — created tsconfig.json + added typecheck script

Package Path
@grida/bitmap packages/grida-canvas-bitmap
@grida/tailwindcss packages/grida-canvas-tailwind
@app/database database/

tsconfig.json fixes

Existing tsconfigs were updated to match the project-wide convention (target: es2020, module: esnext, moduleResolution: bundler, skipLibCheck: true, types: ["vitest/globals"]), with two important exceptions:

  • @grida/cmath and react-p-queue both import assert from "assert" (Node.js built-in). These keep moduleResolution: node and use types: ["vitest/globals", "node"] so @types/node is available to both tsc and tsup's DTS worker.

Skipped (intentionally)

  • crates/grida-canvas, crates/math2 — Rust crate CI wrappers, no TypeScript sources
  • library/shapes — plain JS bundler
  • packages/grida-canvas-tailwind-colors — CSS/JSON data package with Deno generation scripts
  • packages/grida-canvas-react-timeline — empty placeholder package
  • apps/docs — Docusaurus app using Babel for TS transpilation

Testing

  • pnpm turbo build --filter='./packages/*' — 16 packages, all successful
  • pnpm turbo typecheck --filter='./packages/*' --filter='./database' --filter='./packages/lib/*' — 25 packages, all successful
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Chores
    • Added TypeScript type-checking scripts across multiple packages to run checks without emitting build artifacts
    • Standardized and tightened TypeScript configurations across packages: targeted ES2020, unified module settings, enabled stricter checks, and adjusted resolution/skip-lib-check behavior

- Add 'typecheck: tsc --noEmit' to 12 packages that had tsconfig.json but no typecheck script:
  grida-canvas-cg, grida-canvas-color, grida-canvas-pixelgrid, grida-canvas-ruler,
  grida-canvas-transparency-grid, grida-cmath, grida-mixed-properties, grida-tokens,
  grida-tree, lib/treearray, react-p-queue, desktop

- Add tsconfig.json + typecheck script to 3 packages with TypeScript sources but no tsconfig:
  grida-canvas-bitmap, grida-canvas-tailwind, database

- Fix existing tsconfig.json files to use consistent settings (target: es2020,
  module: esnext, moduleResolution: bundler, skipLibCheck: true) matching the
  project-wide convention used in working packages

Co-authored-by: Universe <universe@grida.co>
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 19, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 19, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 19, 2026 6:09pm
grida Ready Ready Preview, Comment Mar 19, 2026 6:09pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
code Ignored Ignored Mar 19, 2026 6:09pm
legacy Ignored Ignored Mar 19, 2026 6:09pm
backgrounds Skipped Skipped Mar 19, 2026 6:09pm
blog Skipped Skipped Mar 19, 2026 6:09pm
viewer Skipped Skipped Mar 19, 2026 6:09pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6eae41b-eeee-4139-8266-018e58b7d2f4

📥 Commits

Reviewing files that changed from the base of the PR and between be6a7c6 and 7d26c45.

📒 Files selected for processing (2)
  • packages/grida-cmath/tsconfig.json
  • packages/react-p-queue/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/react-p-queue/tsconfig.json
  • packages/grida-cmath/tsconfig.json

Walkthrough

Adds TypeScript type-checking across the monorepo by introducing typecheck npm scripts and adding/updating tsconfig.json files (targeting ES2020, ESNext modules, moduleResolution: "bundler" or standardized options, strict and skipLibCheck) across many packages.

Changes

Cohort / File(s) Summary
Root & Desktop
database/package.json, database/tsconfig.json, desktop/package.json
Added typecheck scripts; new database/tsconfig.json with strict ES2020/ESNext config; minor formatting adjustment in desktop/package.json.
Canvas packages (bitmap, cg, color, pixelgrid, ruler, tailwind, transparency-grid)
packages/grida-canvas-bitmap/package.json, packages/grida-canvas-bitmap/tsconfig.json, packages/grida-canvas-cg/package.json, packages/grida-canvas-cg/tsconfig.json, packages/grida-canvas-color/package.json, packages/grida-canvas-color/tsconfig.json, packages/grida-canvas-pixelgrid/package.json, packages/grida-canvas-pixelgrid/tsconfig.json, packages/grida-canvas-ruler/package.json, packages/grida-canvas-ruler/tsconfig.json, packages/grida-canvas-tailwind/package.json, packages/grida-canvas-tailwind/tsconfig.json, packages/grida-canvas-transparency-grid/package.json, packages/grida-canvas-transparency-grid/tsconfig.json
Added typecheck scripts to each package.json; added or standardized tsconfig files to target es2020, module: "esnext", set moduleResolution (commonly to bundler), enable esModuleInterop, strict, and skipLibCheck.
Core libraries & utilities
packages/grida-cmath/package.json, packages/grida-cmath/tsconfig.json, packages/grida-mixed-properties/package.json, packages/grida-mixed-properties/tsconfig.json, packages/lib/treearray/package.json
Added typecheck scripts; updated/added tsconfigs (es2020/esnext, skipLibCheck, Vitest types where applicable).
Tokens & Tree
packages/grida-tokens/package.json, packages/grida-tokens/tsconfig.json, packages/grida-tree/package.json, packages/grida-tree/tsconfig.json
Added typecheck scripts; updated tsconfigs to ES2020/ESNext, moduleResolution: "bundler", strict, types: ["vitest/globals"], and exclude: ["dist"].
React utilities
packages/react-p-queue/package.json, packages/react-p-queue/tsconfig.json
Added typecheck script; expanded tsconfig to ES2020/ESNext, added Vitest/Node types and skipLibCheck.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

chore

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main objective: adding missing typecheck scripts across all packages in the monorepo for consistent turbo typecheck coverage.
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
  • Commit unit tests in branch chore/missing-typecheck-scripts-53db
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
database/tsconfig.json (1)

1-12: Suggested merge-time validation sequence.

Given this new database typecheck entrypoint, run the full prebuild + typecheck chain once before merge to avoid order-related false failures.

Based on learnings: Build shared packages and wasm bundle before running repository-wide typecheck: pnpm turbo build --filter="./packages/*" and pnpm turbo build --filter grida/canvas-wasm.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@database/tsconfig.json` around lines 1 - 12, Add a pre-merge validation step
that builds shared packages and the wasm bundle before running the full
repository typecheck to avoid order-related false failures for the new database
typecheck entrypoint; specifically run `pnpm turbo build
--filter="./packages/*"` and `pnpm turbo build --filter grida/canvas-wasm` (or
add these two commands to the existing prebuild/typecheck pipeline) so the
shared packages and wasm artifacts are produced prior to running the repo-wide
typecheck that includes the new database entrypoint.
packages/grida-canvas-bitmap/tsconfig.json (1)

7-8: Redundant noImplicitAny option.

strict: true already enables noImplicitAny (along with other strict checks). You can remove line 7 to match the other package configs in this PR.

🧹 Proposed simplification
   "esModuleInterop": true,
-  "noImplicitAny": true,
   "strict": true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/grida-canvas-bitmap/tsconfig.json` around lines 7 - 8, Remove the
redundant "noImplicitAny" compiler option from tsconfig.json since "strict":
true already enables it; update the JSON by deleting the "noImplicitAny": true
entry so only "strict": true remains (ensure trailing commas and JSON validity
are preserved).
packages/grida-canvas-tailwind/tsconfig.json (1)

7-8: Redundant noImplicitAny option.

Same as grida-canvas-bitmapstrict: true already includes noImplicitAny. Consider removing for consistency with other package configs.

🧹 Proposed simplification
   "esModuleInterop": true,
-  "noImplicitAny": true,
   "strict": true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/grida-canvas-tailwind/tsconfig.json` around lines 7 - 8, Remove the
redundant "noImplicitAny" compiler option from the tsconfig (it is already
implied by "strict": true); locate the "noImplicitAny": true entry in the
tsconfig.json alongside "strict": true and delete that property so the file
matches other packages like grida-canvas-bitmap and avoids duplicate
configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@database/tsconfig.json`:
- Around line 1-12: Add a pre-merge validation step that builds shared packages
and the wasm bundle before running the full repository typecheck to avoid
order-related false failures for the new database typecheck entrypoint;
specifically run `pnpm turbo build --filter="./packages/*"` and `pnpm turbo
build --filter grida/canvas-wasm` (or add these two commands to the existing
prebuild/typecheck pipeline) so the shared packages and wasm artifacts are
produced prior to running the repo-wide typecheck that includes the new database
entrypoint.

In `@packages/grida-canvas-bitmap/tsconfig.json`:
- Around line 7-8: Remove the redundant "noImplicitAny" compiler option from
tsconfig.json since "strict": true already enables it; update the JSON by
deleting the "noImplicitAny": true entry so only "strict": true remains (ensure
trailing commas and JSON validity are preserved).

In `@packages/grida-canvas-tailwind/tsconfig.json`:
- Around line 7-8: Remove the redundant "noImplicitAny" compiler option from the
tsconfig (it is already implied by "strict": true); locate the "noImplicitAny":
true entry in the tsconfig.json alongside "strict": true and delete that
property so the file matches other packages like grida-canvas-bitmap and avoids
duplicate configuration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b352077a-81d4-4fac-b6ee-0a3f9b5702d2

📥 Commits

Reviewing files that changed from the base of the PR and between 3e37a0a and be6a7c6.

📒 Files selected for processing (28)
  • database/package.json
  • database/tsconfig.json
  • desktop/package.json
  • packages/grida-canvas-bitmap/package.json
  • packages/grida-canvas-bitmap/tsconfig.json
  • packages/grida-canvas-cg/package.json
  • packages/grida-canvas-cg/tsconfig.json
  • packages/grida-canvas-color/package.json
  • packages/grida-canvas-color/tsconfig.json
  • packages/grida-canvas-pixelgrid/package.json
  • packages/grida-canvas-pixelgrid/tsconfig.json
  • packages/grida-canvas-ruler/package.json
  • packages/grida-canvas-ruler/tsconfig.json
  • packages/grida-canvas-tailwind/package.json
  • packages/grida-canvas-tailwind/tsconfig.json
  • packages/grida-canvas-transparency-grid/package.json
  • packages/grida-canvas-transparency-grid/tsconfig.json
  • packages/grida-cmath/package.json
  • packages/grida-cmath/tsconfig.json
  • packages/grida-mixed-properties/package.json
  • packages/grida-mixed-properties/tsconfig.json
  • packages/grida-tokens/package.json
  • packages/grida-tokens/tsconfig.json
  • packages/grida-tree/package.json
  • packages/grida-tree/tsconfig.json
  • packages/lib/treearray/package.json
  • packages/react-p-queue/package.json
  • packages/react-p-queue/tsconfig.json

…ing Node built-ins

grida-cmath and react-p-queue both import from the 'assert' Node.js built-in.
Changing moduleResolution to 'bundler' and restricting types to ['vitest/globals']
broke tsup's DTS build because @types/node was excluded from the types lookup.

Fix:
- Revert moduleResolution to 'node' for both packages
- Add 'node' to the types array so @types/node is included alongside vitest/globals
- Remove strict:true from react-p-queue (no strict mode in original)

Co-authored-by: Universe <universe@grida.co>
@vercel vercel Bot temporarily deployed to Preview – viewer March 19, 2026 18:05 Inactive
@vercel vercel Bot temporarily deployed to Preview – blog March 19, 2026 18:05 Inactive
@vercel vercel Bot temporarily deployed to Preview – backgrounds March 19, 2026 18:05 Inactive
@softmarshmallow softmarshmallow merged commit 9400ab1 into main Mar 19, 2026
12 checks 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.

2 participants