Summary
While issues #723 and #644 have been successfully closed, there remain 381 ESLint errors in the TypeScript codebase that are currently suppressed via the ignore pattern package/**/*.ts in eslint.config.js. These errors are well-documented in ESLINT_TECHNICAL_DEBT.md but require dedicated effort to resolve.
Current State
- ✅ TypeScript compilation: All files compile without errors (
tsc --noEmit passes)
- ✅ ESLint (with ignores): CI passes with 0 errors, 3 acceptable warnings
- ⚠️ ESLint (full check): 381 errors when running
yarn eslint package/**/*.ts --no-ignore
Error Breakdown by Category
When linting is enabled on TypeScript files, the following major categories of errors emerge:
1. Type Safety Issues (~70% of errors)
@typescript-eslint/no-explicit-any (22 instances)
@typescript-eslint/no-unsafe-* violations (85+ instances):
no-unsafe-assignment: 47
no-unsafe-member-access: 20+
no-unsafe-call: 8+
no-unsafe-return: 8+
no-unsafe-argument: 7+
@typescript-eslint/no-base-to-string: Object stringification issues
@typescript-eslint/restrict-template-expressions: Invalid template literal types
2. Module System Issues
@typescript-eslint/no-require-imports: Extensive use of require() instead of ES6 imports
import/order: Import ordering violations
import/newline-after-import: Missing newlines after imports
import/first: Imports not at top of modules
import/no-import-module-exports: Mixed import/export styles
import/prefer-default-export: Single-export modules without defaults
3. Code Quality Issues
@typescript-eslint/no-use-before-define: Functions/variables used before definition (especially in cli.ts)
class-methods-use-this: Instance methods that don't use this
no-shadow: Variable name shadowing
prefer-destructuring: Missing object destructuring
prefer-template: String concatenation instead of template literals
prefer-const: Reassignment-free variables declared with let
4. Style Issues
no-plusplus: Unary increment/decrement operators
no-continue: Use of continue statements
no-restricted-globals: Use of isNaN instead of Number.isNaN
- Unused inline config directives
Most Affected Files
The heaviest concentration of errors appears in:
-
package/configExporter/cli.ts: ~50+ errors
- Extensive
no-use-before-define violations
- Module system issues with
require()
- Type safety problems
-
package/environments/base.ts: ~40+ errors
- Heavy use of
any types
- Unsafe member access on config objects
- Module import ordering issues
-
package/configExporter/buildValidator.ts: ~13 errors
- Class method issues
- Object stringification problems
- Style violations
-
package/configExporter/configFile.ts: Multiple class method and type safety issues
-
All environment files (development.ts, production.ts, test.ts): Module system and type safety violations
Related Documentation
ESLINT_TECHNICAL_DEBT.md contains detailed tracking and prioritization
- Files with remaining errors have explicit rule overrides in
eslint.config.js (lines 170-256)
- The technical debt document estimates ~163 suppressed errors, but the actual count when fully enabled is 381 errors
Recommended Approach
As outlined in ESLINT_TECHNICAL_DEBT.md:
Phase 1: Non-Breaking Fixes (Can be done incrementally)
- Fix style issues:
prefer-const, prefer-template, no-plusplus
- Remove unused directives
- Fix
prefer-destructuring violations
- Address
no-shadow and no-use-before-define by reordering code
Phase 2: Type Safety Improvements (Requires careful refactoring)
- Replace
any with unknown or proper types
- Add explicit type definitions for configuration objects
- Fix unsafe member access by adding proper type guards
- Address
@typescript-eslint/no-base-to-string issues
Phase 3: Module System Modernization (Potentially breaking)
- Convert
require() to ES6 import
- Fix import ordering and organization
- Add default exports where appropriate
- Consider providing codemods for consumers
Success Criteria
Related Issues
Summary
While issues #723 and #644 have been successfully closed, there remain 381 ESLint errors in the TypeScript codebase that are currently suppressed via the ignore pattern
package/**/*.tsineslint.config.js. These errors are well-documented inESLINT_TECHNICAL_DEBT.mdbut require dedicated effort to resolve.Current State
tsc --noEmitpasses)yarn eslint package/**/*.ts --no-ignoreError Breakdown by Category
When linting is enabled on TypeScript files, the following major categories of errors emerge:
1. Type Safety Issues (~70% of errors)
@typescript-eslint/no-explicit-any(22 instances)@typescript-eslint/no-unsafe-*violations (85+ instances):no-unsafe-assignment: 47no-unsafe-member-access: 20+no-unsafe-call: 8+no-unsafe-return: 8+no-unsafe-argument: 7+@typescript-eslint/no-base-to-string: Object stringification issues@typescript-eslint/restrict-template-expressions: Invalid template literal types2. Module System Issues
@typescript-eslint/no-require-imports: Extensive use ofrequire()instead of ES6 importsimport/order: Import ordering violationsimport/newline-after-import: Missing newlines after importsimport/first: Imports not at top of modulesimport/no-import-module-exports: Mixed import/export stylesimport/prefer-default-export: Single-export modules without defaults3. Code Quality Issues
@typescript-eslint/no-use-before-define: Functions/variables used before definition (especially incli.ts)class-methods-use-this: Instance methods that don't usethisno-shadow: Variable name shadowingprefer-destructuring: Missing object destructuringprefer-template: String concatenation instead of template literalsprefer-const: Reassignment-free variables declared withlet4. Style Issues
no-plusplus: Unary increment/decrement operatorsno-continue: Use of continue statementsno-restricted-globals: Use ofisNaNinstead ofNumber.isNaNMost Affected Files
The heaviest concentration of errors appears in:
package/configExporter/cli.ts: ~50+ errorsno-use-before-defineviolationsrequire()package/environments/base.ts: ~40+ errorsanytypespackage/configExporter/buildValidator.ts: ~13 errorspackage/configExporter/configFile.ts: Multiple class method and type safety issuesAll environment files (
development.ts,production.ts,test.ts): Module system and type safety violationsRelated Documentation
ESLINT_TECHNICAL_DEBT.mdcontains detailed tracking and prioritizationeslint.config.js(lines 170-256)Recommended Approach
As outlined in
ESLINT_TECHNICAL_DEBT.md:Phase 1: Non-Breaking Fixes (Can be done incrementally)
prefer-const,prefer-template,no-plusplusprefer-destructuringviolationsno-shadowandno-use-before-defineby reordering codePhase 2: Type Safety Improvements (Requires careful refactoring)
anywithunknownor proper types@typescript-eslint/no-base-to-stringissuesPhase 3: Module System Modernization (Potentially breaking)
require()to ES6importSuccess Criteria
package/**/*.tsignore pattern fromeslint.config.jsline 26eslint.config.js(lines 170-256)yarn eslint package/**/*.tsRelated Issues