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:
tsconfig.base.json
Impact:
- Fixed imports in
ux-menu/ux-floating-menucomponent - Fixed imports in
gograb-space/icons-showcasecomponents - Resolved blocking build errors in multiple libraries
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:
libs/singularity-lib/src/lib/components/singularity-main/singularity-main.component.htmllibs/singularity-lib/src/lib/components/singularity-main/singularity-main.component.ts
Impact:
- Fixed template rendering errors
- Aligned with Angular 20 signals best practices
- Improved reactivity using flash persistence
Remaining Minor Warnings (Non-blocking)
These are code quality warnings that don't block the build:
- ux-floating-menu.component.ts:18 -
UxFloatingMenuInitialStatedefined but never used - ux-floating-menu.component.ts:236 -
indexparameter defined but never used
These can be cleaned up later as they don't affect functionality.
Related Documentation
Lessons Learned
✅ Best Practices Applied
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
- Paths should include the
Keep templates in sync with component refactors
- When refactoring from Observables to Signals, update templates
- Remove unused imports like
AsyncPipewhen no longer needed
Use Angular 20 patterns consistently
- Prefer Signals over Observables for reactive state
- Use
autoFlashStatefor persistent state - Use
@ifand@forinstead of*ngIfand*ngFor
🎯 Prevention Strategies
- Run linter before committing -
nx lint <project-name> - Use strict TypeScript - Catches path issues early
- Document library structure - Keep LIBRARY_INDEX.md updated
- 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