Skip to content

[Frontend] Fix 192 ESLint/OxLint errors in autobot-vue #672

@mrveiss

Description

@mrveiss

Summary

The frontend codebase has 192 lint errors that need to be resolved to maintain code quality.

Error Breakdown

By Category

Category Count Severity
Unused variables/imports ~150 Low
Invalid fetch options 1 Medium
Self-assignment 1 Low
Unhandled catch errors ~10 Medium
Other ~30 Low

Specific Issues

1. Unused Variables/Imports:

src/models/controllers/ChatController.ts:5 - ChatMessage imported but never used
src/router/index.ts:2 - Component imported but never used
src/services/__tests__/api.integration.test.ts:6 - NetworkConstants imported but never used
vitest.integration.config.ts:1 - fileURLToPath imported but never used
tests/e2e/workflow-approval.spec.ts:97 - noWorkflowsMessage declared but never used
public/sw-cache-bust.js:4 - CACHE_NAME declared but never used

2. Invalid Fetch Options (Bug Risk):

public/sw-cache-bust.js:91 - "body" is not allowed when method is "GET"

3. Self-Assignment (Potential Bug):

src/components/PlaywrightDesktopViewer.vue:101 - vncFrame.value.src = vncFrame.value.src

4. Unhandled Catch Errors:

src/models/controllers/ChatController.ts:34 - error caught but never used
src/services/GlobalWebSocketService.js:554 - error caught but never used
tests/e2e/chat-workflow.e2e.test.ts:33 - error caught but never used

How to Reproduce

cd autobot-vue
npm run lint
# or directly:
npx oxlint . -D correctness --ignore-path .gitignore

Acceptance Criteria

  • All 192 lint errors resolved
  • npm run lint passes with 0 errors
  • No new lint errors introduced
  • Auto-fixable issues fixed with --fix flag
  • Manual fixes for non-auto-fixable issues

Suggested Approach

  1. Run npx oxlint . --fix -D correctness --ignore-path .gitignore to auto-fix what's possible
  2. Manually fix remaining issues:
    • Remove unused imports/variables
    • Prefix intentionally unused vars with _
    • Fix invalid fetch options in service worker
    • Add proper error handling in catch blocks

Files with Most Issues

  • src/composables/__tests__/useFormValidation.test.ts - Multiple unused vars
  • src/composables/__tests__/useErrorHandler.test.ts - Multiple unused vars
  • public/sw-cache-bust.js - Invalid fetch + unused var
  • src/components/PlaywrightDesktopViewer.vue - Self-assignment

Priority

🟡 Medium - Code quality issue, doesn't block functionality but affects maintainability

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions