[PR #4924] [MERGED] chore: Remove unused variables in frontend #4824

Closed
opened 2026-02-22 18:36:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4924
Author: @angelplusultra
Created: 1/28/2026
Status: Merged
Merged: 1/28/2026
Merged by: @timothycarambat

Base: 4917-enable-essential-rules-and-apply-fixes-in-frontend-eslintHead: 4917-fix-unused-vars


📝 Commits (1)

📊 Changes

24 files changed (+22 additions, -46 deletions)

View changed files

📝 frontend/src/components/ChatBubble/index.jsx (+1 -1)
📝 frontend/src/components/LLMSelection/DPAISOptions/index.jsx (+1 -4)
📝 frontend/src/components/LLMSelection/NvidiaNimOptions/managed.jsx (+1 -1)
📝 frontend/src/components/Modals/ManageWorkspace/Documents/WorkspaceDirectory/WorkspaceFileRow/index.jsx (+1 -1)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/Chartable/CustomCell.jsx (+1 -13)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/PromptReply/index.jsx (+0 -1)
📝 frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/LLMSelector/utils.js (+1 -1)
📝 frontend/src/components/WorkspaceChat/ChatContainer/index.jsx (+1 -1)
📝 frontend/src/hooks/useProviderEndpointAutoDiscovery.js (+1 -1)
📝 frontend/src/locales/normalizeEn.mjs (+1 -1)
📝 frontend/src/models/system.js (+2 -3)
📝 frontend/src/models/workspace.js (+2 -3)
📝 frontend/src/models/workspaceThread.js (+1 -1)
📝 frontend/src/pages/Admin/AgentBuilder/index.jsx (+0 -3)
📝 frontend/src/pages/Admin/Agents/Badges/default.jsx (+1 -1)
📝 frontend/src/pages/Admin/Agents/SQLConnectorSelection/index.jsx (+0 -1)
📝 frontend/src/pages/Admin/Workspaces/WorkspaceRow/index.jsx (+1 -1)
📝 frontend/src/pages/GeneralSettings/ChatEmbedWidgets/EmbedChats/MarkdownRenderer.jsx (+1 -1)
📝 frontend/src/pages/GeneralSettings/ChatEmbedWidgets/index.jsx (+0 -2)
📝 frontend/src/pages/GeneralSettings/Chats/MarkdownRenderer.jsx (+1 -1)

...and 4 more files

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

Base PR: #4923

What is in this change?

Removes unused variables and parameters across the frontend codebase to satisfy the new ESLint rules:

  • Removed unused function parameters (e.g., popMsg, showAlert, closed, settings, id)
  • Prefixed intentionally unused params with _ to indicate they're required by an interface but not used (e.g., settings: _settings, item: _item, users: _users)
  • Removed unused caught error variables in catch blocks (catch (e)catch)
  • Removed unused imports (e.g., useTranslation from ChatEmbedWidgets)
  • Removed unused state variables (e.g., showLoadMenu, selectedFlowForDetails from AgentBuilder)
  • Cleaned up unused destructured props (e.g., payload, rank from CustomCell)

Additional Information

This is a child PR of the ESLint refactor branch. The _ prefix pattern follows JavaScript conventions for intentionally unused variables.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4924 **Author:** [@angelplusultra](https://github.com/angelplusultra) **Created:** 1/28/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `4917-enable-essential-rules-and-apply-fixes-in-frontend-eslint` ← **Head:** `4917-fix-unused-vars` --- ### 📝 Commits (1) - [`f71862c`](https://github.com/Mintplex-Labs/anything-llm/commit/f71862c5c018a962c2f18cd20f70aef674739a42) Remove unused variables ### 📊 Changes **24 files changed** (+22 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/ChatBubble/index.jsx` (+1 -1) 📝 `frontend/src/components/LLMSelection/DPAISOptions/index.jsx` (+1 -4) 📝 `frontend/src/components/LLMSelection/NvidiaNimOptions/managed.jsx` (+1 -1) 📝 `frontend/src/components/Modals/ManageWorkspace/Documents/WorkspaceDirectory/WorkspaceFileRow/index.jsx` (+1 -1) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/Chartable/CustomCell.jsx` (+1 -13) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/PromptReply/index.jsx` (+0 -1) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/LLMSelector/utils.js` (+1 -1) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/index.jsx` (+1 -1) 📝 `frontend/src/hooks/useProviderEndpointAutoDiscovery.js` (+1 -1) 📝 `frontend/src/locales/normalizeEn.mjs` (+1 -1) 📝 `frontend/src/models/system.js` (+2 -3) 📝 `frontend/src/models/workspace.js` (+2 -3) 📝 `frontend/src/models/workspaceThread.js` (+1 -1) 📝 `frontend/src/pages/Admin/AgentBuilder/index.jsx` (+0 -3) 📝 `frontend/src/pages/Admin/Agents/Badges/default.jsx` (+1 -1) 📝 `frontend/src/pages/Admin/Agents/SQLConnectorSelection/index.jsx` (+0 -1) 📝 `frontend/src/pages/Admin/Workspaces/WorkspaceRow/index.jsx` (+1 -1) 📝 `frontend/src/pages/GeneralSettings/ChatEmbedWidgets/EmbedChats/MarkdownRenderer.jsx` (+1 -1) 📝 `frontend/src/pages/GeneralSettings/ChatEmbedWidgets/index.jsx` (+0 -2) 📝 `frontend/src/pages/GeneralSettings/Chats/MarkdownRenderer.jsx` (+1 -1) _...and 4 more files_ </details> ### 📄 Description ### Pull Request Type - [ ] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [x] 🔨 chore - [ ] 📝 docs ### Relevant Issues Base PR: #4923 ### What is in this change? Removes unused variables and parameters across the frontend codebase to satisfy the new ESLint rules: - **Removed unused function parameters** (e.g., `popMsg`, `showAlert`, `closed`, `settings`, `id`) - **Prefixed intentionally unused params with `_`** to indicate they're required by an interface but not used (e.g., `settings: _settings`, `item: _item`, `users: _users`) - **Removed unused caught error variables** in catch blocks (`catch (e)` → `catch`) - **Removed unused imports** (e.g., `useTranslation` from ChatEmbedWidgets) - **Removed unused state variables** (e.g., `showLoadMenu`, `selectedFlowForDetails` from AgentBuilder) - **Cleaned up unused destructured props** (e.g., `payload`, `rank` from CustomCell) ### Additional Information This is a child PR of the ESLint refactor branch. The `_` prefix pattern follows JavaScript conventions for intentionally unused variables. ### Developer Validations - [x] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated - [x] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:36 -05:00
yindo closed this issue 2026-02-22 18:36:36 -05:00
yindo changed title from [PR #4924] chore: Remove unused variables in frontend to [PR #4924] [MERGED] chore: Remove unused variables in frontend 2026-06-05 15:20:33 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4824