[GH-ISSUE #4917] [CHORE]: Enable Essential Rules and Apply Fixes in /frontend ESLint #3092

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

Originally created by @angelplusultra on GitHub (Jan 28, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4917

Originally assigned to: @angelplusultra on GitHub.

ESLint in /frontend is currently not cacthing anything besdies enforcing prettier formatting rules. Need to enable essential rules and apply fixes to everything it lints. Essentials are as follows:

Bug Catching Rules

Rule What it catches Why it’s a bug
no-undef Use of undefined variables Causes runtime ReferenceError
no-unreachable Code that can never run Dead / misleading logic
no-duplicate-imports Multiple imports from the same module Clutter and merge conflicts
no-fallthrough Missing break in switch Silent control-flow bugs

Code Cleanliness Rules

Rule What it catches Why it matters Recommended level
unused-imports/no-unused-imports Imports that are never used Dead code, wasted bundle size, refactor leftovers error
no-unused-vars Variables that are never used Can be intentional (interfaces, callbacks, destructuring) off
unused-imports/no-unused-vars Unused variables (plugin replacement) Cleaner autofix + better DX than core rule warn
Originally created by @angelplusultra on GitHub (Jan 28, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4917 Originally assigned to: @angelplusultra on GitHub. ESLint in `/frontend` is currently not cacthing anything besdies enforcing prettier formatting rules. Need to enable essential rules and apply fixes to everything it lints. Essentials are as follows: ### Bug Catching Rules Rule | What it catches | Why it’s a bug --- | --- | --- `no-undef` | Use of undefined variables | Causes runtime `ReferenceError` `no-unreachable` | Code that can never run | Dead / misleading logic `no-duplicate-imports` | Multiple imports from the same module | Clutter and merge conflicts `no-fallthrough` | Missing `break` in `switch` | Silent control-flow bugs ### Code Cleanliness Rules Rule | What it catches | Why it matters | Recommended level --- | --- | --- | --- `unused-imports/no-unused-imports` | Imports that are never used | Dead code, wasted bundle size, refactor leftovers | `error` `no-unused-vars` | Variables that are never used | Can be intentional (interfaces, callbacks, destructuring) | `off` `unused-imports/no-unused-vars` | Unused variables (plugin replacement) | Cleaner autofix + better DX than core rule | `warn`
yindo added the core-team-only label 2026-02-22 18:32:35 -05:00
yindo closed this issue 2026-02-22 18:32:35 -05:00
yindo changed title from [CHORE]: Enable Essential Rules and Apply Fixes in `/frontend` ESLint to [GH-ISSUE #4917] [CHORE]: Enable Essential Rules and Apply Fixes in `/frontend` ESLint 2026-06-05 14:50:15 -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#3092