Skip to content

Resolve LSP errors: '@/path' alias resolution in feature packages #13

Description

@coderooz

Status: Pending

Problem

All feature packages use @/ path alias (configured in tsconfig.json paths), but LSP fails to resolve them in these files:

  • feature-design-system: ThemeProvider.tsx (@/theme/colors), useTheme.ts (@/context/ThemeProvider), Pressable.tsx/Text.tsx/View.tsx (@/theme/tokens)
  • feature-dynamic-pages: PageEngineProvider.tsx, useVersionCheck.ts, StaleConfigBanner.tsx (@/services/page-engine/*, @/hooks/useTheme)

Note

These resolve correctly in the target Expo project after scaffolding (the tsconfig.json there has proper paths config). The LSP errors exist in the template directory because the standalone package doesn't have its own tsconfig with paths.

Potential Fix

  • Add local tsconfig.json to each feature package with matching @/ path resolution
  • Or use relative imports in template files
  • Or suppress LSP errors since they only appear in template/ context

Known files affected

  • packages/feature-design-system/template/src/context/ThemeProvider.tsx
  • packages/feature-design-system/template/src/hooks/useTheme.ts
  • packages/feature-design-system/template/src/primitives/Pressable.tsx
  • packages/feature-design-system/template/src/primitives/Text.tsx
  • packages/feature-design-system/template/src/primitives/View.tsx
  • packages/feature-dynamic-pages/template/src/context/PageEngineProvider.tsx
  • packages/feature-dynamic-pages/template/src/hooks/useVersionCheck.ts
  • packages/feature-dynamic-pages/template/src/components/dynamic/StaleConfigBanner.tsx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions