Skip to content

[Bug] Fix ESLint JS errors #16

@karastoyanov

Description

@karastoyanov

🐛 Bug Description

ESLint is failing the CI build due to multiple unused imports, unused variables, and missing dependencies in React hooks across several components. These issues prevent the PR from passing automated checks and block deployment.

📋 Steps to Reproduce

  1. Go to frontend dir
  2. Rin npm run lint
  3. Observe the ESLint errors listed in the CI log
  4. The build fails and the PR cannot be merged

🎯 Expected Behavior

All components should pass ESLint without errors or warnings. Specifically:
• No unused imports
• No unused variables
• No missing dependencies in useEffect
• Proper error handling variables used correctly

📸 Actual Behavior

ESLint errors currently present in the PR:

SignupForm.jsx
error is assigned a value but never used
err is defined but never used

Navbar.jsx
• React Hook useEffect missing dependency: userId

Achievements.js
• achievements is declared but never used

ProfileMain.jsx
updatedUser is assigned a value but never used
err is defined but never used (multiple occurrences)

AdminPanel.jsx
• useEffect is defined but never used
• getAllQuests is defined but never used
• quests, setQuests, loading, setLoading, error, setError are defined but never used

🌍 Environment

📎 Additional Context

These linting issues block the CI pipeline and prevent the PR from merging. Fixing them will require:
• Removing unused imports and variables
• Updating useEffect dependency arrays
• Using the variables properly or deleting them if unnecessary

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions