[PR #7354] [MERGED] remove useless assignments to local variables #56407

Closed
opened 2026-05-01 04:15:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7354
Author: @matt-fidd
Created: 4/1/2026
Status: Merged
Merged: 4/7/2026
Merged by: @matt-fidd

Base: masterHead: quality/useless-assign


📝 Commits (6)

📊 Changes

22 files changed (+30 additions, -46 deletions)

View changed files

📝 .oxlintrc.json (+3 -1)
📝 packages/desktop-client/src/components/FinancesApp.tsx (+0 -2)
📝 packages/desktop-client/src/components/FixedSizeList.tsx (+1 -2)
📝 packages/desktop-client/src/components/accounts/Account.tsx (+0 -5)
📝 packages/desktop-client/src/components/filters/PayeeFilter.tsx (+1 -1)
📝 packages/desktop-client/src/components/manager/BudgetFileSelection.tsx (+1 -2)
📝 packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx (+0 -3)
📝 packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx (+1 -1)
📝 packages/desktop-client/src/components/reports/reports/Sankey.tsx (+0 -5)
📝 packages/desktop-client/src/components/reports/reports/SankeyCard.tsx (+0 -1)
📝 packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts (+2 -2)
📝 packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts (+2 -2)
📝 packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts (+4 -4)
📝 packages/desktop-client/src/components/transactions/TransactionsTable.test.tsx (+4 -4)
📝 packages/desktop-client/src/shared-browser-server-core.test.ts (+1 -1)
📝 packages/loot-core/src/platform/server/fs/index.ts (+1 -1)
📝 packages/loot-core/src/server/budget/category-template-context.ts (+1 -1)
📝 packages/loot-core/src/server/main.test.ts (+1 -2)
📝 packages/loot-core/src/server/transactions/transaction-rules.ts (+1 -2)
📝 packages/loot-core/vitest.config.ts (+0 -2)

...and 2 more files

📄 Description

Description

Fixes issues highlighted in https://github.com/actualbudget/actual/security/quality/rules/js%2Fuseless-assignment-to-local
Not that I've seen this tab before, just wanted to see how it works!

Testing

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 28 12.28 MB → 12.28 MB (-183 B) -0.00%
loot-core 1 4.82 MB → 4.82 MB (-42 B) -0.00%
api 1 3.83 MB → 3.83 MB (-43 B) -0.00%
cli 1 7.88 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
28 12.28 MB → 12.28 MB (-183 B) -0.00%
Changeset
File Δ Size
src/components/manager/BudgetFileSelection.tsx 📈 +4 B (+0.02%) 25.01 kB → 25.02 kB
src/components/reports/spreadsheets/custom-spreadsheet.ts 📉 -8 B (-0.14%) 5.54 kB → 5.53 kB
src/components/FixedSizeList.tsx 📉 -28 B (-0.27%) 10.12 kB → 10.09 kB
src/components/reports/spreadsheets/spending-spreadsheet.ts 📉 -16 B (-0.28%) 5.58 kB → 5.56 kB
src/components/accounts/Account.tsx 📉 -127 B (-0.28%) 43.79 kB → 43.66 kB
src/components/reports/spreadsheets/recalculate.ts 📉 -8 B (-0.40%) 1.98 kB → 1.97 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller

Asset File Size % Changed
static/js/index.js 3.24 MB → 3.24 MB (-123 B) -0.00%
static/js/ReportRouter.js 1.1 MB → 1.1 MB (-32 B) -0.00%
static/js/useTransactionBatchActions.js 4.29 MB → 4.29 MB (-28 B) -0.00%

Unchanged

Asset File Size % Changed
static/js/BackgroundImage.js 119.98 kB 0%
static/js/FormulaEditor.js 846.44 kB 0%
static/js/TransactionList.js 81.29 kB 0%
static/js/ca.js 190.11 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 174.79 kB 0%
static/js/en-GB.js 7.16 kB 0%
static/js/en.js 172.28 kB 0%
static/js/es.js 182.18 kB 0%
static/js/fr.js 177.47 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 166.25 kB 0%
static/js/narrow.js 354.5 kB 0%
static/js/nb-NO.js 152.2 kB 0%
static/js/nl.js 108.93 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 177.84 kB 0%
static/js/resize-observer.js 18.03 kB 0%
static/js/sv.js 80.58 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/wide.js 418 B 0%
static/js/workbox-window.prod.es5.js 7.28 kB 0%
static/js/zh-Hans.js 93.57 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.82 MB → 4.82 MB (-42 B) -0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/index.ts 📈 +1 B (+0.01%) 7.91 kB → 7.91 kB
home/runner/work/actual/actual/packages/loot-core/src/server/budget/category-template-context.ts 📉 -4 B (-0.02%) 17.07 kB → 17.06 kB
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts 📉 -39 B (-0.20%) 19.45 kB → 19.41 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.DHyrsyU4.js 0 B → 4.82 MB (+4.82 MB) -

Removed

Asset File Size % Changed
kcab.worker.ChAr5vIB.js 4.82 MB → 0 B (-4.82 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
1 3.83 MB → 3.83 MB (-43 B) -0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/budget/category-template-context.ts 📉 -4 B (-0.02%) 16.23 kB → 16.23 kB
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts 📉 -39 B (-0.20%) 19.04 kB → 19 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller

Asset File Size % Changed
index.js 3.83 MB → 3.83 MB (-43 B) -0.00%

Unchanged
No assets were unchanged


cli

Total

Files count Total bundle size % Changed
1 7.88 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
cli.js 7.88 MB 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/7354 **Author:** [@matt-fidd](https://github.com/matt-fidd) **Created:** 4/1/2026 **Status:** ✅ Merged **Merged:** 4/7/2026 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `quality/useless-assign` --- ### 📝 Commits (6) - [`37002d2`](https://github.com/actualbudget/actual/commit/37002d2e9f7076961e22c90d92a4faaab5475aed) fixes - [`095eb52`](https://github.com/actualbudget/actual/commit/095eb52121e870538fa09915d0e3bb890f0c8ec7) note - [`b3f9cd6`](https://github.com/actualbudget/actual/commit/b3f9cd62cdb5cb4c2e49fd98a1f5d10fdc086576) enforce with lint - [`ef10032`](https://github.com/actualbudget/actual/commit/ef100322c5d13ff5f7202aad495d2787b7bd06ac) identical operands - [`17351e1`](https://github.com/actualbudget/actual/commit/17351e1afcedad0066c1c081270b2d604da0eff4) unused state - [`15203e3`](https://github.com/actualbudget/actual/commit/15203e368ce3011d86d1fd4ffde2234d29c2c699) fix unused imports in new sankey report ### 📊 Changes **22 files changed** (+30 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `.oxlintrc.json` (+3 -1) 📝 `packages/desktop-client/src/components/FinancesApp.tsx` (+0 -2) 📝 `packages/desktop-client/src/components/FixedSizeList.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+0 -5) 📝 `packages/desktop-client/src/components/filters/PayeeFilter.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/manager/BudgetFileSelection.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx` (+0 -3) 📝 `packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/reports/reports/Sankey.tsx` (+0 -5) 📝 `packages/desktop-client/src/components/reports/reports/SankeyCard.tsx` (+0 -1) 📝 `packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts` (+2 -2) 📝 `packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts` (+2 -2) 📝 `packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts` (+4 -4) 📝 `packages/desktop-client/src/components/transactions/TransactionsTable.test.tsx` (+4 -4) 📝 `packages/desktop-client/src/shared-browser-server-core.test.ts` (+1 -1) 📝 `packages/loot-core/src/platform/server/fs/index.ts` (+1 -1) 📝 `packages/loot-core/src/server/budget/category-template-context.ts` (+1 -1) 📝 `packages/loot-core/src/server/main.test.ts` (+1 -2) 📝 `packages/loot-core/src/server/transactions/transaction-rules.ts` (+1 -2) 📝 `packages/loot-core/vitest.config.ts` (+0 -2) _...and 2 more files_ </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> ## Description <!-- What does this PR do? Why is it needed? Please give context on the "why?": why do we need this change? What problem is it solving for you?--> Fixes issues highlighted in https://github.com/actualbudget/actual/security/quality/rules/js%2Fuseless-assignment-to-local Not that I've seen this tab before, just wanted to see how it works! ## Related issue(s) <!-- e.g. Fixes #123, Relates to #456 --> ## Testing <!-- What did you test? How can we reproduce the issue you are fixing or how can we test the feature you built? --> ## Checklist - [x] Release notes added (see link above) - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 28 | 12.28 MB → 12.28 MB (-183 B) | -0.00% loot-core | 1 | 4.82 MB → 4.82 MB (-42 B) | -0.00% api | 1 | 3.83 MB → 3.83 MB (-43 B) | -0.00% cli | 1 | 7.88 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 28 | 12.28 MB → 12.28 MB (-183 B) | -0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/manager/BudgetFileSelection.tsx` | 📈 +4 B (+0.02%) | 25.01 kB → 25.02 kB `src/components/reports/spreadsheets/custom-spreadsheet.ts` | 📉 -8 B (-0.14%) | 5.54 kB → 5.53 kB `src/components/FixedSizeList.tsx` | 📉 -28 B (-0.27%) | 10.12 kB → 10.09 kB `src/components/reports/spreadsheets/spending-spreadsheet.ts` | 📉 -16 B (-0.28%) | 5.58 kB → 5.56 kB `src/components/accounts/Account.tsx` | 📉 -127 B (-0.28%) | 43.79 kB → 43.66 kB `src/components/reports/spreadsheets/recalculate.ts` | 📉 -8 B (-0.40%) | 1.98 kB → 1.97 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 3.24 MB → 3.24 MB (-123 B) | -0.00% static/js/ReportRouter.js | 1.1 MB → 1.1 MB (-32 B) | -0.00% static/js/useTransactionBatchActions.js | 4.29 MB → 4.29 MB (-28 B) | -0.00% **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/BackgroundImage.js | 119.98 kB | 0% static/js/FormulaEditor.js | 846.44 kB | 0% static/js/TransactionList.js | 81.29 kB | 0% static/js/ca.js | 190.11 kB | 0% static/js/da.js | 104.66 kB | 0% static/js/de.js | 174.79 kB | 0% static/js/en-GB.js | 7.16 kB | 0% static/js/en.js | 172.28 kB | 0% static/js/es.js | 182.18 kB | 0% static/js/fr.js | 177.47 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 166.25 kB | 0% static/js/narrow.js | 354.5 kB | 0% static/js/nb-NO.js | 152.2 kB | 0% static/js/nl.js | 108.93 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 177.84 kB | 0% static/js/resize-observer.js | 18.03 kB | 0% static/js/sv.js | 80.58 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/wide.js | 418 B | 0% static/js/workbox-window.prod.es5.js | 7.28 kB | 0% static/js/zh-Hans.js | 93.57 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.82 MB → 4.82 MB (-42 B) | -0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/index.ts` | 📈 +1 B (+0.01%) | 7.91 kB → 7.91 kB `home/runner/work/actual/actual/packages/loot-core/src/server/budget/category-template-context.ts` | 📉 -4 B (-0.02%) | 17.07 kB → 17.06 kB `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts` | 📉 -39 B (-0.20%) | 19.45 kB → 19.41 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.DHyrsyU4.js | 0 B → 4.82 MB (+4.82 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.ChAr5vIB.js | 4.82 MB → 0 B (-4.82 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 3.83 MB → 3.83 MB (-43 B) | -0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/budget/category-template-context.ts` | 📉 -4 B (-0.02%) | 16.23 kB → 16.23 kB `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts` | 📉 -39 B (-0.20%) | 19.04 kB → 19 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** Asset | File Size | % Changed ----- | --------- | --------- index.js | 3.83 MB → 3.83 MB (-43 B) | -0.00% **Unchanged** No assets were unchanged </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.88 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 ----- | --------- | --------- cli.js | 7.88 MB | 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-05-01 04:15:51 -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#56407