[PR #7233] [CLOSED] [WIP] [AI] Add no-cross-package-imports ESLint rule to enforce package dependency boundaries #126455

Closed
opened 2026-06-14 05:44:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7233
Author: @MatissJanis
Created: 3/17/2026
Status: Closed

Base: masterHead: claude/enforce-package-dependencies-TsIkF


📝 Commits (8)

  • 9d9f76d [AI] Add no-cross-package-imports ESLint rule to enforce package dependency boundaries
  • 8eb0969 [AI] Restore @actual-app/web no-restricted-imports rule and fix stacked disable comments
  • d059d57 [AI] Detect relative imports that cross package boundaries
  • fc622c2 [AI] Replace custom ESLint rule with no-restricted-imports overrides
  • 554da80 [AI] Revert verbose no-restricted-imports overrides, restore custom rule
  • 8876299 Add release notes for PR #7233
  • e30225e Enhance no-cross-package-imports rule to support hard-banned imports and relative path resolution. Introduce checks for exports from undeclared dependencies and add tests for new behaviors, including hard bans on specific package imports.
  • f79560c Refactor no-cross-package-imports rule to remove hard-banned imports and streamline relative path resolution. Update tests to reflect changes in error messaging for imports not declared in dependencies.

📊 Changes

6 files changed (+448 additions, -1 deletions)

View changed files

📝 packages/component-library/.storybook/preview.tsx (+2 -0)
📝 packages/desktop-electron/e2e/onboarding.test.ts (+1 -1)
📝 packages/eslint-plugin-actual/lib/index.js (+1 -0)
packages/eslint-plugin-actual/lib/rules/__tests__/no-cross-package-imports.test.js (+201 -0)
packages/eslint-plugin-actual/lib/rules/no-cross-package-imports.js (+237 -0)
upcoming-release-notes/7233.md (+6 -0)

📄 Description

Add a custom ESLint rule that validates @actual-app/* imports are declared
as dependencies in the importing package's package.json. This replaces the
manual no-restricted-imports pattern for @actual-app/web in loot-core with
an automatic, self-maintaining rule that covers all packages.

https://claude.ai/code/session_01XjmtRs1P9Rg7FNJAYVcaZJ


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 26 11.84 MB 0%
loot-core 1 4.83 MB 0%
api 4 4.05 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
26 11.84 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 3.22 MB 0%
static/js/BackgroundImage.js 119.98 kB 0%
static/js/FormulaEditor.js 720.12 kB 0%
static/js/ReportRouter.js 1021.25 kB 0%
static/js/TransactionList.js 81.29 kB 0%
static/js/ca.js 185.62 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 177.63 kB 0%
static/js/en-GB.js 7.16 kB 0%
static/js/en.js 169.27 kB 0%
static/js/es.js 172.13 kB 0%
static/js/fr.js 177.63 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 168.97 kB 0%
static/js/narrow.js 353.47 kB 0%
static/js/nb-NO.js 154.72 kB 0%
static/js/nl.js 111.58 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 180.55 kB 0%
static/js/resize-observer.js 18.03 kB 0%
static/js/th.js 179.94 kB 0%
static/js/theme.js 30.68 kB 0%
static/js/uk.js 213.14 kB 0%
static/js/useTransactionBatchActions.js 4.27 MB 0%
static/js/wide.js 418 B 0%
static/js/workbox-window.prod.es5.js 7.28 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.83 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.BN7f5Rmg.js 4.83 MB 0%

api

Total

Files count Total bundle size % Changed
4 4.05 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 3.84 MB 0%
from-Bl-Hslp4.js 167.73 kB 0%
multipart-parser-BnDysoMr.js 8.1 kB 0%
src-iMkUmuwR.js 43.64 kB 0%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7233 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 3/17/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `claude/enforce-package-dependencies-TsIkF` --- ### 📝 Commits (8) - [`9d9f76d`](https://github.com/actualbudget/actual/commit/9d9f76d7df6bc5257c40b67ee00b74c7d477ef8a) [AI] Add no-cross-package-imports ESLint rule to enforce package dependency boundaries - [`8eb0969`](https://github.com/actualbudget/actual/commit/8eb096957ef8f0c8e066d2f3f88d10ef6e664512) [AI] Restore @actual-app/web no-restricted-imports rule and fix stacked disable comments - [`d059d57`](https://github.com/actualbudget/actual/commit/d059d57cc76dd8ff786380194a32e35510c0768f) [AI] Detect relative imports that cross package boundaries - [`fc622c2`](https://github.com/actualbudget/actual/commit/fc622c200b9d3a9fb18356ef0a1e295e05137b59) [AI] Replace custom ESLint rule with no-restricted-imports overrides - [`554da80`](https://github.com/actualbudget/actual/commit/554da806ce840aa6f0d5d9fb38cf77bf368cce11) [AI] Revert verbose no-restricted-imports overrides, restore custom rule - [`8876299`](https://github.com/actualbudget/actual/commit/8876299f713cc4243df388a75eddca49e926fd9c) Add release notes for PR #7233 - [`e30225e`](https://github.com/actualbudget/actual/commit/e30225ed426f75471af9e575383947ff398a9555) Enhance no-cross-package-imports rule to support hard-banned imports and relative path resolution. Introduce checks for exports from undeclared dependencies and add tests for new behaviors, including hard bans on specific package imports. - [`f79560c`](https://github.com/actualbudget/actual/commit/f79560c57cfd66b168eb50e578623823863cab99) Refactor no-cross-package-imports rule to remove hard-banned imports and streamline relative path resolution. Update tests to reflect changes in error messaging for imports not declared in dependencies. ### 📊 Changes **6 files changed** (+448 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/component-library/.storybook/preview.tsx` (+2 -0) 📝 `packages/desktop-electron/e2e/onboarding.test.ts` (+1 -1) 📝 `packages/eslint-plugin-actual/lib/index.js` (+1 -0) ➕ `packages/eslint-plugin-actual/lib/rules/__tests__/no-cross-package-imports.test.js` (+201 -0) ➕ `packages/eslint-plugin-actual/lib/rules/no-cross-package-imports.js` (+237 -0) ➕ `upcoming-release-notes/7233.md` (+6 -0) </details> ### 📄 Description Add a custom ESLint rule that validates @actual-app/* imports are declared as dependencies in the importing package's package.json. This replaces the manual no-restricted-imports pattern for @actual-app/web in loot-core with an automatic, self-maintaining rule that covers all packages. https://claude.ai/code/session_01XjmtRs1P9Rg7FNJAYVcaZJ <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 26 | 11.84 MB | 0% loot-core | 1 | 4.83 MB | 0% api | 4 | 4.05 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 26 | 11.84 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 3.22 MB | 0% static/js/BackgroundImage.js | 119.98 kB | 0% static/js/FormulaEditor.js | 720.12 kB | 0% static/js/ReportRouter.js | 1021.25 kB | 0% static/js/TransactionList.js | 81.29 kB | 0% static/js/ca.js | 185.62 kB | 0% static/js/da.js | 104.66 kB | 0% static/js/de.js | 177.63 kB | 0% static/js/en-GB.js | 7.16 kB | 0% static/js/en.js | 169.27 kB | 0% static/js/es.js | 172.13 kB | 0% static/js/fr.js | 177.63 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 168.97 kB | 0% static/js/narrow.js | 353.47 kB | 0% static/js/nb-NO.js | 154.72 kB | 0% static/js/nl.js | 111.58 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 180.55 kB | 0% static/js/resize-observer.js | 18.03 kB | 0% static/js/th.js | 179.94 kB | 0% static/js/theme.js | 30.68 kB | 0% static/js/uk.js | 213.14 kB | 0% static/js/useTransactionBatchActions.js | 4.27 MB | 0% static/js/wide.js | 418 B | 0% static/js/workbox-window.prod.es5.js | 7.28 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.83 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BN7f5Rmg.js | 4.83 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 4 | 4.05 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index.js | 3.84 MB | 0% from-Bl-Hslp4.js | 167.73 kB | 0% multipart-parser-BnDysoMr.js | 8.1 kB | 0% src-iMkUmuwR.js | 43.64 kB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-14 05:44:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#126455