Skip to content

feat: typescript compilation check on CI#39

Open
harshtandiya wants to merge 3 commits intodevelopfrom
ci
Open

feat: typescript compilation check on CI#39
harshtandiya wants to merge 3 commits intodevelopfrom
ci

Conversation

@harshtandiya
Copy link
Collaborator

@harshtandiya harshtandiya commented Feb 8, 2026

Summary by CodeRabbit

  • Chores
    • Added automated frontend TypeScript type checking to CI to validate types on pushes and pull requests.
    • Introduced a local typecheck task and adjusted TypeScript configuration to streamline type validation during development and CI.

- Introduced a new script for TypeScript type checking in package.json.
- Updated tsconfig.json to skip library checks for improved build performance.
- Introduced a new GitHub Actions workflow for TypeScript type checking in the frontend application.
- The workflow triggers on pushes and pull requests to the develop branch, ensuring type safety during development.
- Configured steps for checking out the code, setting up Node.js, installing dependencies, and running type checks.
@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow to run frontend TypeScript type checking on pushes and PRs affecting the frontend. Adds a typecheck npm script and a duplicate top-level skipLibCheck entry in frontend/tsconfig.json.

Changes

Cohort / File(s) Summary
CI/CD Type Checking Setup
/.github/workflows/typecheck.yml
New GitHub Actions workflow "Frontend TypeScript" triggered on pushes to develop and PRs touching frontend or the workflow. Sets Node 24, caches Yarn, installs frontend deps, and runs the typecheck npm script.
Frontend scripts
frontend/package.json
Added typecheck script: tsc --noEmit.
TypeScript config
frontend/tsconfig.json
Added a top-level skipLibCheck: true property while skipLibCheck already exists inside compilerOptions (duplicate declaration).

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions
    participant Runner as Runner
    participant Repo as Repository
    participant Node as Node.js (v24)
    participant Yarn as Yarn
    participant TSC as TypeScript Compiler

    GH->>Runner: trigger workflow (push/PR)
    Runner->>Repo: checkout repository
    Runner->>Node: setup Node.js v24
    Runner->>Yarn: restore/cache dependencies (frontend/yarn.lock)
    Runner->>Repo: npm/yarn install in `frontend` (frozen lockfile)
    Runner->>TSC: run `yarn typecheck` -> `tsc --noEmit` in `frontend`
    TSC-->>Runner: typecheck results (success/failure)
    Runner-->>GH: workflow status
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰
A tiny workflow hops to play,
Checking types the careful way,
I cache and build and run with glee,
So frontend bugs are fewer, see? 🥕
Hooray — compile quietly!

🚥 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 title accurately describes the main change: adding a TypeScript compilation check to the CI pipeline via a new GitHub Actions workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci

No actionable comments were generated in the recent review. 🎉


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

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.github/workflows/typecheck.yml:
- Around line 7-13: The path filters in the workflow use the wrong prefix
("apps/forms_pro/frontend/**") so the workflow never triggers; update both
occurrences under push.paths and pull_request.paths to the actual repo location
("frontend/**") while keeping the workflow file itself
(".github/workflows/typecheck.yml") in the list; modify the paths arrays in the
typecheck.yml triggers to replace "apps/forms_pro/frontend/**" with
"frontend/**" so frontend changes correctly trigger the workflow.
- Around line 33-41: The workflow references non-existent paths; update the
cache-dependency-path and the two working-directory fields used in the "Install
dependencies" and "Type check" steps to the correct frontend directory by
replacing "apps/forms_pro/frontend" with "frontend" (ensure
cache-dependency-path: frontend/yarn.lock and both working-directory: frontend),
and scan the same workflow for any other occurrences of
"apps/forms_pro/frontend" to update them similarly.

In `@frontend/tsconfig.json`:
- Line 23: The tsconfig contains a stray top-level "skipLibCheck" property that
is ignored; remove the top-level "skipLibCheck" entry and ensure the existing
compilerOptions.skipLibCheck value (in the "compilerOptions" object) is the
single source of truth; locate the top-level "skipLibCheck" key and delete it so
only "compilerOptions.skipLibCheck" remains.

"@/*": ["src/*"]
}
},
"skipLibCheck": true,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Top-level skipLibCheck is not a valid tsconfig property — it has no effect.

skipLibCheck is only recognized inside compilerOptions (already set at line 7). Placing it at the root level is silently ignored by TypeScript. This line should be removed.

Proposed fix
   },
-  "skipLibCheck": true,
   "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/main.ts"],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"skipLibCheck": true,
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/main.ts"],
🤖 Prompt for AI Agents
In `@frontend/tsconfig.json` at line 23, The tsconfig contains a stray top-level
"skipLibCheck" property that is ignored; remove the top-level "skipLibCheck"
entry and ensure the existing compilerOptions.skipLibCheck value (in the
"compilerOptions" object) is the single source of truth; locate the top-level
"skipLibCheck" key and delete it so only "compilerOptions.skipLibCheck" remains.

- Simplified paths in the GitHub Actions typecheck workflow to target the frontend directory directly.
- Adjusted working directories for dependency installation and type checking to reflect the new structure.
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