Skip to content

[Tech Debt]: fix ESLint warnings across the monorepo #7111

@denys-kolomiitsev

Description

@denys-kolomiitsev

Summary

There are currently 97 ESLint warnings (0 errors) across the monorepo that should be cleaned up as tech debt. 45 of them are auto-fixable via --fix.

Warning breakdown

Count Rule Notes
61 react-refresh/only-export-components Mixing non-component exports in component files
30 testing-library/render-result-naming-convention Unit test render result naming
21 playwright/no-force-option { force: true } usage in e2e page objects
20 playwright/prefer-hooks-on-top beforeEach/afterEach not at top of describe block
19 playwright/prefer-to-have-length Use .toHaveCount() instead of .length assertions
11 playwright/no-wait-for-timeout page.waitForTimeout() calls in e2e tests
2 playwright/prefer-to-have-count Similar to above
2 testing-library/no-node-access Direct DOM node access in unit tests
2 @typescript-eslint/no-explicit-any Explicit any type usage
1 @next/next/no-document-import-in-page Wrong next/document import location
1 @typescript-eslint/no-empty-function Empty function body

Affected packages

  • apps/chat — react-refresh, testing-library, @typescript-eslint warnings
  • apps/chat-e2e — playwright warnings (majority)
  • apps/overlay-sandbox — react-refresh warning

Steps to fix

  1. Run npm run lint:fix to auto-fix the 45 fixable warnings.
  2. Manually address the remaining warnings:
    • Replace { force: true } with proper Playwright wait strategies.
    • Replace waitForTimeout() with deterministic waits (waitFor, toBeVisible, etc.).
    • Move beforeEach/afterEach hooks to the top of describe blocks.
    • Fix toHaveCount() / toHaveLength() assertion usage.
    • Separate non-component exports from component files.

Acceptance criteria

  • npm run lint reports 0 warnings.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions