Skip to content

chore(lint): delete unused variables and parameters; enforce both rules repo-wide - #8554

Merged
waleedlatif1 merged 5 commits into
stagingfrom
improvement/unused-variables
Oct 2, 2026
Merged

waleedlatif1 merged 5 commits into
stagingfrom
improvement/unused-variables

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Delete every unused variable and function parameter across apps (~495 variables, ~167 parameters), ~230 dead private interfaces/types, unused loggers, and catch (e) bindings → catch {}
  • Remove the unused BlockConfig<T> type parameter (it never appeared in the interface body); blocks now write plain BlockConfig as the skills already say
  • Enforce noUnusedVariables and noUnusedFunctionParameters as errors repo-wide with fix: "none" so bun run lint's unsafe autofix can't silently _-prefix bindings; ignoreRestSiblings keeps the const { a, ...rest } omit idiom. Redundant packages/** override removed
  • _ prefixes remain only on parameters that must hold their position (route handlers using a later arg, connector/tool callbacks); no biome-ignore
  • Side-effecting calls kept with the binding dropped (e.g. draining a Teams response body to release the connection, an authorization execute whose result was unused)
  • CLAUDE.md gets the matching rule; CONTRIBUTING's block example updated

Type of Change

  • Chore / refactor (no intended behavior change)

Testing

  • bun run lint, bunx turbo run type-check, bun run check:audits, root bun run test (test:scripts + every workspace suite)
  • Three independent audits re-checked every removed parameter's callers repo-wide (no positional shifts), every dropped initializer for side effects, and test tables; 264 of 384 block/tool files transpile to byte-identical JS (type-only changes)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Oct 2, 2026 1:58am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Removes unused variables and parameters across the codebase.

The PR appears safe to merge based on the findings established in this review.

Summary

The PR enforces unused-binding lint rules and removes unused declarations across the repository. Changes since the previous review also add workflow-version comparison across the API and editor, and revise workspace-file provenance handling.

  • The earlier form-cache finding is fixed.
  • The four earlier any findings were withdrawn after the pre-existing annotations were confirmed.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Version comparison request] --> B[Workflow read authorization]
  B --> C[Load and materialize snapshots]
  C --> D[Compute semantic diff]
  D --> E[Redact public values]
  E --> F[API response]
Loading

Reviews (4) · Last reviewed commit: "fix(resume): update the per-context form..."

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 682 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Fix all with cubic | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 682 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 force-pushed the improvement/unused-variables branch from f869f90 to 5f74ccd Compare October 2, 2026 01:17
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 682 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

Comment thread apps/sim/executor/handlers/workflow/workflow-handler.test.ts
Comment thread apps/sim/lib/pptx-renderer/renderer/chart-renderer.ts
Comment thread apps/sim/tools/index.test.ts
Comment thread apps/sim/tools/kalshi/types.ts
Remove dead locals, constants, helpers, test mock aliases, and unused
function parameters (updating callers), drop the unused BlockConfig type
parameter and the response types that only fed it.
…meters repo-wide

Enable both rules as errors at the root with no autofix, so bun run lint
never mass-renames bindings to _x, and ignoreRestSiblings so the
{ a, ...rest } omit idiom stays legal. The packages/** override is now
redundant and removed. Document the rule in CLAUDE.md.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 force-pushed the improvement/unused-variables branch from 5f74ccd to 75815d0 Compare October 2, 2026 01:55
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 681 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit e3211dd into staging Oct 2, 2026
36 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/unused-variables branch October 2, 2026 06:42

This branch was successfully deployed

1 active deployment
Preview — 75815d0b Deployed Oct 2, 2026 by vercel[bot]
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