Skip to content

chore: fail CI on any type error and delete the type-check ratchet (CM-1537) - #5058

Merged
gaspergrom merged 2 commits into
mainfrom
chore/CM-1537-hard-zero-typecheck
Oct 20, 2026
Merged

gaspergrom merged 2 commits into
mainfrom
chore/CM-1537-hard-zero-typecheck

Conversation

@gaspergrom

Copy link
Copy Markdown
Contributor

Summary

Makes the CI typecheck job fail on any type error, and deletes the ratchet that allowed a baseline. main is at zero type errors, so the job passes today.

  • The job runs pnpm --filter frontend run typecheck (plain vue-tsc) instead of typecheck:ci.
  • frontend/scripts/typecheck-ratchet.mjs, frontend/typecheck-baseline.json and the typecheck:ci script are deleted.
  • The last five errors outside the auth module are cleared first: vite.config.ts types the visualizer and components plugins as PluginOption, and four child-component slots in the organization merge and unmerge dialogs carry @vue-expect-error notes. The child components are untyped JavaScript; the note fails the check as soon as they are converted, which is when the markers should go.
  • Checked locally: vue-tsc exits 0 on this branch and exits 2 when a file with a deliberate type error is added.

Closes linuxfoundation/lfx-cdp-insights-ops#237

Copilot AI balanced review requested due to automatic review settings October 20, 2026 13:10
@cursor

cursor Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
CI and tooling changes with small, documented type suppressions; no runtime or auth/data-path changes.

Overview
CI now enforces a zero-error typecheck by running plain vue-tsc via pnpm --filter frontend run typecheck instead of the ratcheted typecheck:ci job.

The type-check ratchet is removed: frontend/scripts/typecheck-ratchet.mjs, frontend/typecheck-baseline.json, and the typecheck:ci npm script are deleted.

To keep vue-tsc clean at zero errors, vite.config.ts adds PluginOption typing and casts for the rollup visualizer and unplugin-vue-components plugins. Organization merge/unmerge dialogs add @vue-expect-error on slots passed into untyped JS child components, with notes to remove them when those components are converted to TypeScript (CM-1600/1601).

Reviewed by Cursor Bugbot for commit 0e95bab. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI 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.

🟢 Approval recommended

The focused changes consistently enforce strict type checking, with no blocking issues identified in static review; project checks were not run.

No open issues 🎉

What changed in this PR

Replaces the frontend’s type-error baseline with strict CI type checking.

Changes:

  • Runs plain vue-tsc in CI and removes the ratchet machinery.
  • Adds Vite plugin type assertions.
  • Adds temporary Vue slot error expectations for untyped child components.
File Description
frontend/​vite.config.ts Adds explicit plugin types and assertions.
frontend/​typecheck-baseline.json Deletes the error baseline.
frontend/​src/​modules/​organization/​components/​organization-unmerge-dialog.vue Adds three slot error expectations.
frontend/​src/​modules/​organization/​components/​organization-merge-suggestions-dialog.vue Adds one slot error expectation.
frontend/​scripts/​typecheck-ratchet.mjs Deletes baseline enforcement.
frontend/​package.json Removes the ratchet script entry.
.github/​workflows/​frontend-checks.yml Runs strict frontend type checking.

Review effort: Balanced

@gaspergrom
gaspergrom merged commit 73b4b46 into main Oct 20, 2026
18 checks passed
@gaspergrom
gaspergrom deleted the chore/CM-1537-hard-zero-typecheck branch October 20, 2026 13:16
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.

3 participants