-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
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 .gitignoreAcceptance Criteria
- All 192 lint errors resolved
-
npm run lintpasses with 0 errors - No new lint errors introduced
- Auto-fixable issues fixed with
--fixflag - Manual fixes for non-auto-fixable issues
Suggested Approach
- Run
npx oxlint . --fix -D correctness --ignore-path .gitignoreto auto-fix what's possible - 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 varssrc/composables/__tests__/useErrorHandler.test.ts- Multiple unused varspublic/sw-cache-bust.js- Invalid fetch + unused varsrc/components/PlaywrightDesktopViewer.vue- Self-assignment
Priority
🟡 Medium - Code quality issue, doesn't block functionality but affects maintainability
Reactions are currently unavailable