Skip to content

chore(lint): enforce forge adapter boundary - #3485

Merged
setchy merged 1 commit into
mainfrom
chore/lint-forge-adapter-boundary
Oct 24, 2026
Merged

setchy merged 1 commit into
mainfrom
chore/lint-forge-adapter-boundary

Conversation

@setchy

@setchy setchy commented Oct 24, 2026

Copy link
Copy Markdown
Member

Summary

ARCHITECTURE.md says shared code must go through the forge adapter (getAdapter / getAccountAdapter) rather than importing a forge-specific module directly. This enforces that.

  • Adds a shared forgeSpecificBoundaryPattern built with rendererBoundaryPattern.
  • Splits the utils override so src/renderer/utils/forges/** implementations remain allowed to import their own forge modules, while the rest of utils is restricted.
  • Composes the forge pattern into stores, hooks, components, the notification UI, icons, and the leaf modules.
  • Adds an override for routes, App.tsx, and index.tsx.
  • Type-only imports remain allowed (allowTypeImports: true), so the existing type-only import of generated GitHub GraphQL types still passes.
  • Tests are excluded, so test-only imports of forge modules are unaffected.

Verification

  • Confirmed shared code importing utils/forges/github/client is reported, while code under utils/forges/github/ may import its own modules.
  • Confirmed a route importing a forge-specific module is reported.
  • Confirmed a type-only import from a forge-specific module is allowed.
  • pnpm check passes.

@setchy
setchy requested a review from afonsojramos as a code owner October 24, 2026 13:16
@github-actions github-actions Bot added the chore Miscellaneous tasks label Oct 24, 2026
@setchy
setchy force-pushed the chore/lint-forge-adapter-boundary branch from 9bab865 to b58b814 Compare October 24, 2026 13:29
@setchy
setchy merged commit 1787cbc into main Oct 24, 2026
10 checks passed
@setchy
setchy deleted the chore/lint-forge-adapter-boundary branch October 24, 2026 13:29
@github-actions github-actions Bot added this to the Release 7.11.0 milestone Oct 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

chore Miscellaneous tasks

Development

Successfully merging this pull request may close these issues.

1 participant