Skip to content

chore: fix eslint exhaustive-deps and unused-assignment warnings#82

Merged
mbayue merged 4 commits into
masterfrom
chore/eslint-fixes
Jul 4, 2026
Merged

chore: fix eslint exhaustive-deps and unused-assignment warnings#82
mbayue merged 4 commits into
masterfrom
chore/eslint-fixes

Conversation

@mbayue

@mbayue mbayue commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Fixes ESLint warnings including react-hooks/exhaustive-deps and no-useless-assignment.


Summary by cubic

Fix ESLint warnings by adding a missing hook dependency, removing useless assignments, silencing unused params, and improving error context; also removes stray debug logs and bumps minor deps. No user-facing changes.

  • Refactors
    • Add resetView to useEffect deps in useArchitectureState to satisfy react-hooks/exhaustive-deps.
    • Clean up useless assignments: drop inPackages write in parsePnpmWorkspace; scope filesToDelete in indexing; use _text in tests; use a stable key in Markdownish.
    • Preserve original error as cause in getRepoFileContent.

Written for commit d35895c. Summary will update on new commits.

Review in cubic

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 10 package(s) with unknown licenses.
See the Details below.

License Issues

package.json

PackageVersionLicenseIssue Type
@google/genai^2.10.0NullUnknown License
@tanstack/react-query^5.101.2NullUnknown License
framer-motion^12.42.2NullUnknown License
lru-cache^11.5.1NullUnknown License
mermaid^11.16.0NullUnknown License
react^19.2.7NullUnknown License
react-dom^19.2.7NullUnknown License
react-router-dom^7.18.1NullUnknown License
recharts^2.15.4NullUnknown License
zustand^5.0.14NullUnknown License

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/@google/genai ^2.10.0 UnknownUnknown
npm/@tailwindcss/vite ^4.3.2 UnknownUnknown
npm/@tanstack/react-query ^5.101.2 UnknownUnknown
npm/@types/node ^22.20.0 UnknownUnknown
npm/@types/react-dom ^19.2.3 UnknownUnknown
npm/@vercel/node ^5.8.22 UnknownUnknown
npm/eslint ^9.39.4 UnknownUnknown
npm/framer-motion ^12.42.2 UnknownUnknown
npm/lru-cache ^11.5.1 UnknownUnknown
npm/mermaid ^11.16.0 UnknownUnknown
npm/react ^19.2.7 UnknownUnknown
npm/react-dom ^19.2.7 UnknownUnknown
npm/react-router-dom ^7.18.1 UnknownUnknown
npm/recharts ^2.15.4 UnknownUnknown
npm/shadcn ^4.13.0 UnknownUnknown
npm/tailwindcss ^4.3.2 UnknownUnknown
npm/typescript-eslint ^8.62.1 UnknownUnknown
npm/vite ^8.1.3 UnknownUnknown
npm/zustand ^5.0.14 UnknownUnknown

Scanned Files

  • package.json

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

1 issue found and verified against the latest diff

Confidence score: 5/5

  • In server/search/indexing-pipeline.ts, the new console.log(filesToDelete.length) runs before filesToDelete is populated, so it will always report 0 and can mislead debugging/operational triage without affecting runtime behavior—move the log to after the deletion list is built (or log after the conditional block) before merging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="server/search/indexing-pipeline.ts">

<violation number="1" location="server/search/indexing-pipeline.ts:90">
P3: The `console.log(filesToDelete.length)` on the added line always logs `0` because `filesToDelete` is initialized to `[]` just above and only gets populated ~7 lines later inside the `if (previousSha && vectorStore.hasIndex(key))` block. This appears to be either debug logging placed before the relevant code path or leftover instrumentation. Consider either removing the `console.log` or moving it to after the variable is populated (e.g., inside or after the `if` block) if the intent was to track incremental cleanup behavior.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread server/search/indexing-pipeline.ts Outdated

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

2 issues found across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/components/viz/ai-sidebar/Markdownish.tsx Outdated
Comment thread src/components/viz/ai-sidebar/Markdownish.tsx Outdated

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

1 issue found across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread src/components/viz/architecture/hooks/useArchitectureState.ts Outdated
@mbayue mbayue merged commit 72256aa into master Jul 4, 2026
9 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.

1 participant