lint: cleanup pass — disable no-undef for TS, auto-fix, roadmap doc#29
Closed
adm01-debug wants to merge 1 commit into
Closed
lint: cleanup pass — disable no-undef for TS, auto-fix, roadmap doc#29adm01-debug wants to merge 1 commit into
adm01-debug wants to merge 1 commit into
Conversation
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)
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This was referenced Apr 27, 2026
Closed
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— disableno-undeffor TypeScript filesTypeScript's own checker already enforces variable/type definedness with full type information. The plain
no-undefrule produces ~280 false positives in this codebase for global types (Reactwhen used only as a type annotation,NodeJS,JSX,SpeechRecognition,TechniqueColorConfig, etc.) — none of which are actual bugs.Disabling
no-undefis the canonical typescript-eslint recommendation. The same CI job still runstsc --noEmitwhich catches real undefined-symbol bugs.Auto-fix pass
eslint --fixresolved 12 smallconsistent-type-importsviolations across 9 files (inlinetypeannotations).docs/ESLINT_CLEANUP_ROADMAP.mdNew doc tracking the remaining 1146 errors / 499 warnings, broken down by rule with:
--max-warningsdown progressively rather than aim for a flag-day clean baselineTop remaining categories (per the roadmap)
@typescript-eslint/no-unused-vars@typescript-eslint/no-explicit-anyeqeqeqreact-hooks/exhaustive-depsno-duplicate-importsValidation
tsc --noEmit✅ exit 0npm run test✅ no new regressionseslint src --max-warnings=500✅ 1645 problems (was 1939)https://claude.ai/code/session_01KWeDG
Generated by Claude Code