[PR #15282] [MERGED] app/ui: fix lint errors for unused vars, prefer-const, and empty catch #20373

Closed
opened 2026-04-16 07:34:35 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15282
Author: @matteocelani
Created: 4/3/2026
Status: Merged
Merged: 4/7/2026
Merged by: @hoyyeva

Base: mainHead: fix/lint-cleanup


📝 Commits (1)

  • 4833b02 app/ui: fix lint errors for unused vars, prefer-const, and empty catch

📊 Changes

4 files changed (+5 additions, -5 deletions)

View changed files

📝 app/ui/app/src/components/Message.tsx (+2 -2)
📝 app/ui/app/src/components/MessageList.tsx (+1 -1)
📝 app/ui/app/src/components/ui/badge.tsx (+1 -1)
📝 app/ui/app/src/components/ui/button.tsx (+1 -1)

📄 Description

The frontend codebase currently has 117 ESLint errors. Most are no-explicit-any in auto-generated code, but 5 are simple lint issues that can be fixed without changing behavior:

  • 2x no-unused-vars: catch parameter e declared but never used in Message.tsx JSON parsing blocks
  • 1x no-empty: empty catch block in MessageList.tsx tool query parsing
  • 2x prefer-const: classes variable declared with let but never reassigned in badge.tsx and button.tsx

This reduces the total ESLint error count from 117 to 112, making it easier to spot real issues in future changes.

Changes:

  • Message.tsx: remove unused e parameter in two catch blocks
  • MessageList.tsx: add comment to empty catch block
  • ui/badge.tsx: use const for non-reassigned classes variable
  • ui/button.tsx: use const for non-reassigned classes variable

🔄 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/ollama/ollama/pull/15282 **Author:** [@matteocelani](https://github.com/matteocelani) **Created:** 4/3/2026 **Status:** ✅ Merged **Merged:** 4/7/2026 **Merged by:** [@hoyyeva](https://github.com/hoyyeva) **Base:** `main` ← **Head:** `fix/lint-cleanup` --- ### 📝 Commits (1) - [`4833b02`](https://github.com/ollama/ollama/commit/4833b0206d7687412a027db6776018c63d327902) app/ui: fix lint errors for unused vars, prefer-const, and empty catch ### 📊 Changes **4 files changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `app/ui/app/src/components/Message.tsx` (+2 -2) 📝 `app/ui/app/src/components/MessageList.tsx` (+1 -1) 📝 `app/ui/app/src/components/ui/badge.tsx` (+1 -1) 📝 `app/ui/app/src/components/ui/button.tsx` (+1 -1) </details> ### 📄 Description The frontend codebase currently has 117 ESLint errors. Most are no-explicit-any in auto-generated code, but 5 are simple lint issues that can be fixed without changing behavior: - 2x `no-unused-vars`: catch parameter `e` declared but never used in `Message.tsx` JSON parsing blocks - 1x `no-empty`: empty catch block in `MessageList.tsx` tool query parsing - 2x `prefer-const`: `classes` variable declared with `let` but never reassigned in `badge.tsx` and `button.tsx` This reduces the total ESLint error count from 117 to 112, making it easier to spot real issues in future changes. Changes: - `Message.tsx`: remove unused `e` parameter in two catch blocks - `MessageList.tsx`: add comment to empty catch block - `ui/badge.tsx`: use const for non-reassigned `classes` variable - `ui/button.tsx`: use const for non-reassigned `classes` variable --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 07:34:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#20373