Linter Errors Fixed 2025 10 20

Documentation for Developers

Linter Errors Fixed - October 20, 2025

Summary

Fixed all critical linter errors related to import paths and template issues across the monorepo.

Issues Fixed

1. ❌ @ux-icons Module Not Found → ✅ Fixed

Error:

Cannot find module '@ux-icons' or its corresponding type declarations.

Root Cause:
tsconfig.base.json had incorrect path mapping pointing to libs/ux-icons/index.ts instead of libs/ux-icons/src/index.ts

Solution:

// Before (incorrect)
"@ux-icons": ["libs/ux-icons/index.ts"],
"@ux-icons/*": ["libs/ux-icons/*"],

// After (correct)
"@ux-icons": ["libs/ux-icons/src/index.ts"],
"@ux-icons/*": ["libs/ux-icons/src/*"],

Files Modified:

Impact:


2. ❌ SingularityMainComponent Template Error → ✅ Fixed

Error:

Error occurs in the template of component SingularityMainComponent.
Template was expecting observables but component uses signals.

Root Cause:
Template was using isLoading$ | async (Observable pattern) but component was refactored to use autoFlashState (Signal pattern)

Solution:

Template Changes:

<!-- Before (incorrect - Observable pattern) -->
@if(isLoading$ | async) {
  ...
}

<!-- After (correct - Signal pattern) -->
@if(appState().isLoading) {
  <p class="text-caption">{{ appState().statusMessage }}</p>
}

Component Changes:

// Removed AsyncPipe from imports (no longer needed)
imports: [RouterOutlet, RouterLink, RouterLinkActive, NgFor, NgIf]

Files Modified:

Impact:


Remaining Minor Warnings (Non-blocking)

These are code quality warnings that don't block the build:

  1. ux-floating-menu.component.ts:18 - UxFloatingMenuInitialState defined but never used
  2. ux-floating-menu.component.ts:236 - index parameter defined but never used

These can be cleaned up later as they don't affect functionality.


Related Documentation


Lessons Learned

✅ Best Practices Applied

  1. Always check tsconfig.base.json paths match actual file structure

    • Paths should include the src/ folder for library source files
    • Use consistent patterns across all libraries
  2. Keep templates in sync with component refactors

    • When refactoring from Observables to Signals, update templates
    • Remove unused imports like AsyncPipe when no longer needed
  3. Use Angular 20 patterns consistently

    • Prefer Signals over Observables for reactive state
    • Use autoFlashState for persistent state
    • Use @if and @for instead of *ngIf and *ngFor

🎯 Prevention Strategies

  1. Run linter before committing - nx lint <project-name>
  2. Use strict TypeScript - Catches path issues early
  3. Document library structure - Keep LIBRARY_INDEX.md updated
  4. Test imports after path changes - Verify tsconfig changes work

Build Status

✅ All Critical Errors Resolved
⚠️ 2 Minor Warnings (can be ignored for now)
🚀 Dev server compiling successfully


Fixed by: AI Agent
Date: October 20, 2025
Related Issue: Monorepo organization and cleanup