---
name: TypeScript Configuration Fixes
status: closed
created: 2025-10-13T11:02:21Z
updated: 2025-10-13T13:44:21Z
last_sync: 2025-10-13T13:42:16Z
github: https://github.com/BuzzTrail/video-extension/issues/130
depends_on: [001]
parallel: true
conflicts_with: []
---

# Task: TypeScript Configuration Fixes

## Description

Fix TypeScript configuration issues across the monorepo including tsconfig.base.json, project-specific tsconfig.json files, file lists, path mappings, and ESLint configuration. Enable type-aware ESLint rules to catch additional issues.

## Acceptance Criteria

- [ ] `tsconfig.base.json` file lists and path mappings corrected
- [ ] All project-specific `tsconfig.json` files validated
- [ ] Path aliases (`@buzztrail/*`) resolve correctly
- [ ] Include/exclude patterns updated to cover all source files
- [ ] Type-aware ESLint rules enabled in `.eslintrc.json`
- [ ] TypeScript compilation succeeds for all projects
- [ ] All builds complete successfully: `pnpm nx run-many -t build --all`

## Technical Details

**Files to Review/Modify**:
- `tsconfig.base.json` - Base configuration
- `apps/*/tsconfig.json` - App-specific configs
- `libs/*/tsconfig.json` - Library-specific configs
- `.eslintrc.json` or `.eslintrc.js` - ESLint configuration

**Configuration Issues to Fix**:
1. **Path Mappings**: Ensure `paths` in tsconfig.base.json match library structure
   ```json
   {
     "compilerOptions": {
       "paths": {
         "@buzztrail/shared/utils": ["libs/shared/utils/src/index.ts"],
         "@buzztrail/shared/components": ["libs/shared/components/src/index.ts"]
       }
     }
   }
   ```

2. **File Lists**: Update `include`/`exclude` patterns
   ```json
   {
     "include": ["src/**/*"],
     "exclude": ["node_modules", "dist", "**/*.spec.ts"]
   }
   ```

3. **Project References**: Validate composite project setup if used

**ESLint Type-Aware Rules to Enable**:
```json
{
  "extends": [
    "@typescript-eslint/recommended-requiring-type-checking"
  ],
  "parserOptions": {
    "project": "./tsconfig.base.json"
  },
  "rules": {
    "@typescript-eslint/no-floating-promises": "error",
    "@typescript-eslint/no-misused-promises": "error",
    "@typescript-eslint/strict-boolean-expressions": "warn"
  }
}
```

**Validation Commands**:
```bash
# Verify path resolution
pnpm nx graph

# Check all configs
pnpm nx run-many -t typecheck --all

# Verify builds
pnpm nx run-many -t build --all
```

## Dependencies

- [ ] Task 001 completed (error inventory available)
- [ ] Can run in parallel with Task 002

## Effort Estimate

- **Size**: S
- **Hours**: 3 hours
- **Parallel**: true (independent of OpenTelemetry fixes)

## Definition of Done

- [ ] All tsconfig files validated and corrected
- [ ] Path mappings resolve correctly
- [ ] Type-aware ESLint rules enabled
- [ ] TypeScript compilation succeeds
- [ ] All builds succeed
- [ ] No configuration-related errors remain
- [ ] Documentation updated with any significant config changes
