Skip to content

lint: cleanup pass — disable no-undef for TS, auto-fix, roadmap doc#29

Closed
adm01-debug wants to merge 1 commit into
mainfrom
claude/eslint-cleanup
Closed

lint: cleanup pass — disable no-undef for TS, auto-fix, roadmap doc#29
adm01-debug wants to merge 1 commit into
mainfrom
claude/eslint-cleanup

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

Summary

ESLint cleanup pass — reduces problem count by ~15% (1939 → 1645) and lays out a roadmap for the remaining cleanup.

What changed

eslint.config.js — disable no-undef for TypeScript files

TypeScript's own checker already enforces variable/type definedness with full type information. The plain no-undef rule produces ~280 false positives in this codebase for global types (React when used only as a type annotation, NodeJS, JSX, SpeechRecognition, TechniqueColorConfig, etc.) — none of which are actual bugs.

Disabling no-undef is the canonical typescript-eslint recommendation. The same CI job still runs tsc --noEmit which catches real undefined-symbol bugs.

Auto-fix pass

eslint --fix resolved 12 small consistent-type-imports violations across 9 files (inline type annotations).

docs/ESLINT_CLEANUP_ROADMAP.md

New doc tracking the remaining 1146 errors / 499 warnings, broken down by rule with:

  • Difficulty rating (🟢 mechanical → 🔴 needs comprehension)
  • Recommended fix strategy per category
  • Sequencing guidance: ratchet --max-warnings down progressively rather than aim for a flag-day clean baseline

Top remaining categories (per the roadmap)

Count Rule Difficulty
513 @typescript-eslint/no-unused-vars 🟢
257 @typescript-eslint/no-explicit-any 🟡
222 eqeqeq 🟡
146 react-hooks/exhaustive-deps 🔴
93 no-duplicate-imports 🟢

Validation

  • tsc --noEmit ✅ exit 0
  • npm run test ✅ no new regressions
  • eslint src --max-warnings=500 ✅ 1645 problems (was 1939)

https://claude.ai/code/session_01KWeDG


Generated by Claude Code

Reduces ESLint problem count by ~15% (1939 → 1645) and lays out a
roadmap for the remaining cleanup.

## Changes

### eslint.config.js — disable `no-undef` for TS files in src/

TypeScript's own checker already enforces variable/type definedness
with full type information. The plain `no-undef` rule produces ~280
false positives in this codebase for global types (React when used
only as a type annotation, NodeJS, JSX, SpeechRecognition,
TechniqueColorConfig, etc.) — none of which are actual bugs.

Disabling `no-undef` is the canonical `typescript-eslint` recommendation
(https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors).
TypeScript's `tsc --noEmit` (still run in the same CI job) catches
real undefined-symbol bugs.

### Auto-fix pass

`eslint --fix` resolved 12 small `consistent-type-imports` violations
across 9 files (inline `type` annotations on existing imports).

### docs/ESLINT_CLEANUP_ROADMAP.md

New doc tracking the remaining 1146 errors / 499 warnings, broken
down by rule with difficulty + recommended fix strategy. Includes
sequencing guidance to ratchet `--max-warnings` down rather than
trying for a flag-day clean baseline.

## Validation

- `tsc --noEmit` ✅ exit 0 (no new type issues)
- `npm run test` ✅ no new test regressions (10/48 pre-existing
  failures on main are tracked in PR #28)
- `eslint src --max-warnings=500` ✅ 1645 problems (was 1939)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7de07bbd-e59d-4ea9-af20-1ee5ece91076

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/eslint-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants