Skip to content

Remaining TypeScript and Code Quality Improvements #723

@justin808

Description

@justin808

Context

PR #719 successfully fixed all test failures in the main branch. This issue tracks the remaining improvements needed from the original large branch (eslint-fix-package-ignore) that contains ~80 file changes.

Remaining Work

1. ✅ Fix Test Suite (Completed in #719)

  • Added ts-jest configuration
  • Fixed all 177 tests to pass
  • Fixed module import issues

2. 🔧 ESLint Configuration (Next Priority)

Files to add/update:

  • eslint.config.js - Proper ESLint v9 flat config
  • ESLINT_TECHNICAL_DEBT.md - Document known linting issues
  • Update .gitignore if needed

Why important: Sets up proper linting without requiring all issues fixed immediately

3. 🔧 Fix requireOrError Module Export Pattern

Files to update:

  • package/utils/requireOrError.ts
  • All files importing requireOrError (~8 files)

Issue: Currently using export = { requireOrError } but being imported with destructuring, causing runtime errors in some contexts

4. 🔧 Restore Yargs in ConfigExporter

Files to update:

  • package/configExporter/cli.ts
  • package.json (add yargs and @types/yargs)

Issue: Yargs was accidentally removed, replaced with manual argument parsing which is less robust

5. 🔧 Additional TypeScript Improvements

Various files in package/ with TypeScript conversion improvements and type safety enhancements

Recommended Approach

Create small, focused PRs in the order listed above. Each PR should:

  1. Be independently reviewable (< 200 lines changed ideally)
  2. Pass all tests
  3. Not break existing functionality
  4. Have a clear, single purpose

Related PRs

Success Criteria

  • ESLint configuration in place
  • requireOrError exports work correctly
  • Yargs restored in configExporter
  • All TypeScript improvements applied
  • CI remains green throughout

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions