[PR #5081] [MERGED] 🔧 (eslint) patch no-restricted-imports rule #5745

Closed
opened 2026-02-28 21:17:48 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5081
Author: @MatissJanis
Created: 6/2/2025
Status: Merged
Merged: 6/5/2025
Merged by: @MatissJanis

Base: masterHead: matiss/eslint-patch


📝 Commits (1)

  • 790d35b 🔧 (eslint) patch no-restriced-imports rule

📊 Changes

11 files changed (+46 additions, -105 deletions)

View changed files

📝 eslint.config.mjs (+31 -105)
📝 packages/desktop-client/src/hooks/useNavigate.ts (+1 -0)
📝 packages/desktop-client/src/redux/index.ts (+1 -0)
📝 packages/desktop-client/src/style/index.ts (+1 -0)
📝 packages/desktop-client/src/style/palette.ts (+1 -0)
📝 packages/desktop-client/src/style/themes/dark.ts (+1 -0)
📝 packages/desktop-client/src/style/themes/development.ts (+1 -0)
📝 packages/desktop-client/src/style/themes/light.ts (+1 -0)
📝 packages/desktop-client/src/style/themes/midnight.ts (+1 -0)
📝 packages/desktop-electron/e2e/onboarding.test.ts (+1 -0)
upcoming-release-notes/5081.md (+6 -0)

📄 Description

This issue has been annoying me for a while now. Let me explain what I'm doing here.

Eslint has a flat configuration object. It does not support partial rule config overrides.

For example: we can globally restrict importing from dependency A. If some file needs to have another different import restriction - there is no way to merge "restrict importing A" + "local restriction". The last applied config always takes priority.

Fortunately we don't have any violations because of the rule conflicts. But better fix this issue now and forget about it..


Alternative solution would be to bring back package-specific eslint runners & config files (& maybe also a shared config package so we could inherit the global config). But that would be a significantly heavier lift with more long-term maintenance costs.


🔄 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/5081 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 6/2/2025 **Status:** ✅ Merged **Merged:** 6/5/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/eslint-patch` --- ### 📝 Commits (1) - [`790d35b`](https://github.com/actualbudget/actual/commit/790d35b5c932a437b766ef2a4d4f9b6b5f729a5b) :wrench: (eslint) patch no-restriced-imports rule ### 📊 Changes **11 files changed** (+46 additions, -105 deletions) <details> <summary>View changed files</summary> 📝 `eslint.config.mjs` (+31 -105) 📝 `packages/desktop-client/src/hooks/useNavigate.ts` (+1 -0) 📝 `packages/desktop-client/src/redux/index.ts` (+1 -0) 📝 `packages/desktop-client/src/style/index.ts` (+1 -0) 📝 `packages/desktop-client/src/style/palette.ts` (+1 -0) 📝 `packages/desktop-client/src/style/themes/dark.ts` (+1 -0) 📝 `packages/desktop-client/src/style/themes/development.ts` (+1 -0) 📝 `packages/desktop-client/src/style/themes/light.ts` (+1 -0) 📝 `packages/desktop-client/src/style/themes/midnight.ts` (+1 -0) 📝 `packages/desktop-electron/e2e/onboarding.test.ts` (+1 -0) ➕ `upcoming-release-notes/5081.md` (+6 -0) </details> ### 📄 Description This issue has been annoying me for a while now. Let me explain what I'm doing here. Eslint has a flat configuration object. It does not support partial rule config overrides. For example: we can globally restrict importing from dependency A. If some file needs to have another different import restriction - there is no way to merge "restrict importing A" + "local restriction". The last applied config always takes priority. Fortunately we don't have any violations because of the rule conflicts. But better fix this issue now and forget about it.. --- Alternative solution would be to bring back package-specific eslint runners & config files (& maybe also a shared config package so we could inherit the global config). But that would be a significantly heavier lift with more long-term maintenance costs. --- <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-02-28 21:17:48 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5745