Tracking issue for #38.
| Rule |
Count |
Description |
| typescript:S3776 |
237 |
Cognitive Complexity of functions should not be too high |
| go:S3776 |
13 |
(Go) Cognitive Complexity of functions should not be too high |
| typescript:S3358 |
59 |
Ternary operators should not be nested |
| typescript:S1121 |
13 |
Assignments should not be made from within sub-expressions |
| typescript:S4138 |
37 |
for-of should be used over for loop on arrays |
| typescript:S4144 |
10 |
Functions should not have identical implementations |
These require human judgment to refactor — extract helpers, flatten conditionals, replace nested ternaries with if-else or lookup tables.
Hot files (issues per file)
packages/sdk/src/primitives/Hash.ts — 114 issues
packages/wallet/wallet-toolbox/src/WalletPermissionsManager.ts — 84 issues
packages/sdk/src/wallet/substrates/WalletWireTransceiver.ts — 60 issues
packages/wallet/wallet-toolbox/src/storage/StorageIdb.ts — 50 issues
packages/wallet/wallet-toolbox/src/monitor/Monitor.ts — 49 issues
packages/sdk/src/primitives/BigNumber.ts — 43 issues
packages/sdk/src/transaction/Transaction.ts — 35 issues
packages/overlays/overlay-express/src/OverlayExpress.ts — 35 issues
Suggested approach
Pick one hot file at a time. Add unit tests first if missing, then refactor.
Refs: #38
Tracking issue for #38.
These require human judgment to refactor — extract helpers, flatten conditionals, replace nested ternaries with if-else or lookup tables.
Hot files (issues per file)
packages/sdk/src/primitives/Hash.ts— 114 issuespackages/wallet/wallet-toolbox/src/WalletPermissionsManager.ts— 84 issuespackages/sdk/src/wallet/substrates/WalletWireTransceiver.ts— 60 issuespackages/wallet/wallet-toolbox/src/storage/StorageIdb.ts— 50 issuespackages/wallet/wallet-toolbox/src/monitor/Monitor.ts— 49 issuespackages/sdk/src/primitives/BigNumber.ts— 43 issuespackages/sdk/src/transaction/Transaction.ts— 35 issuespackages/overlays/overlay-express/src/OverlayExpress.ts— 35 issuesSuggested approach
Pick one hot file at a time. Add unit tests first if missing, then refactor.
Refs: #38