[PR #238] [MERGED] Sort import in alphabetical order #33272

Closed
opened 2026-04-20 20:40:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/238
Author: @TomAFrench
Created: 9/2/2022
Status: Merged
Merged: 9/2/2022
Merged by: @TomAFrench

Base: masterHead: sort-import-alphabetical


📝 Commits (4)

  • de5b929 style: enforce sorting of imports
  • 6d1a414 style: alphabetize imports
  • dcf539f style: merge duplicated imports
  • 7bbda6a style: linter fixes

📊 Changes

194 files changed (+721 additions, -718 deletions)

View changed files

📝 .eslintrc.js (+4 -0)
📝 packages/desktop-client/src/components/App.js (+3 -3)
📝 packages/desktop-client/src/components/AppBackground.js (+1 -1)
📝 packages/desktop-client/src/components/Debugger.js (+1 -1)
📝 packages/desktop-client/src/components/FinancesApp.js (+17 -18)
📝 packages/desktop-client/src/components/Modals.js (+11 -11)
📝 packages/desktop-client/src/components/Notifications.js (+1 -1)
📝 packages/desktop-client/src/components/Settings.js (+4 -4)
📝 packages/desktop-client/src/components/SidebarWithData.js (+3 -3)
📝 packages/desktop-client/src/components/SpreadsheetInterface.js (+1 -1)
📝 packages/desktop-client/src/components/Titlebar.js (+7 -7)
📝 packages/desktop-client/src/components/Tutorial.js (+6 -6)
📝 packages/desktop-client/src/components/accounts/Account.js (+32 -32)
📝 packages/desktop-client/src/components/accounts/AccountSyncCheck.js (+1 -1)
📝 packages/desktop-client/src/components/accounts/Filters.js (+13 -13)
📝 packages/desktop-client/src/components/accounts/SimpleTransactionsTable.js (+6 -6)
📝 packages/desktop-client/src/components/accounts/TransactionList.js (+1 -1)
📝 packages/desktop-client/src/components/accounts/TransactionsTable.js (+21 -21)
📝 packages/desktop-client/src/components/accounts/TransactionsTable.test.js (+3 -3)
📝 packages/desktop-client/src/components/budget/MonthCountSelector.js (+2 -2)

...and 80 more files

📄 Description

This PR re-adds the alphabetize rule from #221. The benefits I see from this are:

  • loot-core imports are always placed before loot-design which creates a nice division between importing implementation vs display
  • Sorting according the the path results in commonly used imports which sit at the top of the directory structure sitting above more specialised imports which sit close to where they are used.
  • A number of cases where we have multiple separate imports from the same file were found as these imports were sorted to be next to each other.

🔄 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/238 **Author:** [@TomAFrench](https://github.com/TomAFrench) **Created:** 9/2/2022 **Status:** ✅ Merged **Merged:** 9/2/2022 **Merged by:** [@TomAFrench](https://github.com/TomAFrench) **Base:** `master` ← **Head:** `sort-import-alphabetical` --- ### 📝 Commits (4) - [`de5b929`](https://github.com/actualbudget/actual/commit/de5b929c14676f7c3741a93349f577912d6d3ff3) style: enforce sorting of imports - [`6d1a414`](https://github.com/actualbudget/actual/commit/6d1a414bdd305251d62d573b7958d489249a0e14) style: alphabetize imports - [`dcf539f`](https://github.com/actualbudget/actual/commit/dcf539f72ba047af31bd3618b72b8a0a6cd2ab1f) style: merge duplicated imports - [`7bbda6a`](https://github.com/actualbudget/actual/commit/7bbda6a4e1adde29dc1199740102a465408f8a1a) style: linter fixes ### 📊 Changes **194 files changed** (+721 additions, -718 deletions) <details> <summary>View changed files</summary> 📝 `.eslintrc.js` (+4 -0) 📝 `packages/desktop-client/src/components/App.js` (+3 -3) 📝 `packages/desktop-client/src/components/AppBackground.js` (+1 -1) 📝 `packages/desktop-client/src/components/Debugger.js` (+1 -1) 📝 `packages/desktop-client/src/components/FinancesApp.js` (+17 -18) 📝 `packages/desktop-client/src/components/Modals.js` (+11 -11) 📝 `packages/desktop-client/src/components/Notifications.js` (+1 -1) 📝 `packages/desktop-client/src/components/Settings.js` (+4 -4) 📝 `packages/desktop-client/src/components/SidebarWithData.js` (+3 -3) 📝 `packages/desktop-client/src/components/SpreadsheetInterface.js` (+1 -1) 📝 `packages/desktop-client/src/components/Titlebar.js` (+7 -7) 📝 `packages/desktop-client/src/components/Tutorial.js` (+6 -6) 📝 `packages/desktop-client/src/components/accounts/Account.js` (+32 -32) 📝 `packages/desktop-client/src/components/accounts/AccountSyncCheck.js` (+1 -1) 📝 `packages/desktop-client/src/components/accounts/Filters.js` (+13 -13) 📝 `packages/desktop-client/src/components/accounts/SimpleTransactionsTable.js` (+6 -6) 📝 `packages/desktop-client/src/components/accounts/TransactionList.js` (+1 -1) 📝 `packages/desktop-client/src/components/accounts/TransactionsTable.js` (+21 -21) 📝 `packages/desktop-client/src/components/accounts/TransactionsTable.test.js` (+3 -3) 📝 `packages/desktop-client/src/components/budget/MonthCountSelector.js` (+2 -2) _...and 80 more files_ </details> ### 📄 Description This PR re-adds the `alphabetize` rule from #221. The benefits I see from this are: - `loot-core` imports are always placed before `loot-design` which creates a nice division between importing implementation vs display - Sorting according the the path results in commonly used imports which sit at the top of the directory structure sitting above more specialised imports which sit close to where they are used. - A number of cases where we have multiple separate imports from the same file were found as these imports were sorted to be next to each other. --- <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-04-20 20:40:28 -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#33272