Skip to content

Add minimal lint rules for code quality #6084

Description

@arseniy-gl

Why

The project uses tsc --strict + pnpm guard for validation. This covers types, architecture boundaries, and design-system integrity well. But with active LLM usage in development, there is a gap: LLM-generated code often passes typecheck while containing quality issues that neither tsc nor guard catches.

Data from the codebase

Pattern Count What catches it today
as any / as unknown as 76 nothing
@ts-ignore / @ts-nocheck 26 files guard (import resolution only)
Non-null assertions (!.) 13 nothing
useEffect calls without dep checking 859 nothing
Floating promises (no await/void) present nothing
Unused imports/locals unknown noUnusedLocals not enabled
Inconsistent quote style zh-CN uses double, en uses single nothing

Proposal

Not a full ESLint setup. Just 3-4 targeted rules that catch the most expensive LLM-specific bugs:

  1. noUnusedLocals + noUnusedParameters in tsconfig — free, one line each, catches dead code from LLM refactoring
  2. react-hooks/exhaustive-deps — 859 unchecked useEffect calls is the highest-risk area
  3. @typescript-eslint/no-floating-promises — catches missing await on async calls
  4. @typescript-eslint/no-unsafe-assignment — catches as any escapes

These could be added as a lightweight ESLint config or, for items 1, just a tsconfig change.

What this is not

  • Not a request for Prettier or full code-style enforcement
  • Not a replacement for guard — it covers different ground
  • Not blocking any current work

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededtype/choreCI / build / config / tooling

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions