Category: Testing & Quality
Difficulty: Medium
Description:
After the two largest offenders are dealt with separately, roughly 30 @typescript-eslint/no-explicit-any occurrences remain, spread thinly across about fifteen test files. Individually each is trivial; collectively they are why the codebase does not meet the specification's no-any requirement. Because the rule is a warning, nothing stops the number climbing again after it is cleared.
Location:
src/vendor/analytics/analytics.service.spec.ts
src/common/validators/stellar-address.validator.spec.ts
src/notifications/notifications.service.spec.ts
src/escrow/escrow.service.sync-state.spec.ts
test/unit/tracking-poll.worker.spec.ts
test/unit/escrow.service.spec.ts
test/unit/notifications.service.spec.ts
test/unit/escrow-tracking-cache.spec.ts
test/unit/admin.guard.spec.ts
test/unit/stellar-webhook.service.spec.ts
test/unit/escrow-tracking.spec.ts
test/unit/dlq.service.spec.ts
test/unit/blockchain-listener.service.spec.ts
test/unit/auto-release.worker.spec.ts
test/integration/vendor-analytics.integration-spec.ts
test/integration/escrow.integration-spec.ts
test/integration/escrow-cancellation.integration-spec.ts
Example commits:
refactor(tests): remove remaining explicit any from unit specs
refactor(tests): remove remaining explicit any from integration specs
Acceptance Criteria:
Technical Notes:
This can be split across several PRs by directory if that is easier to review, but say which files a PR covers. Do not change the eslint configuration here, promoting the rule to an error is a separate issue that depends on this one.
Before you start
- Setup: CONTRIBUTING.md → Development Setup. Use Node 22 (
nvm use), run npm ci rather than npm install, and run npx prisma generate after installing. Skipping that last step makes npm run typecheck fail with Module '"@prisma/client"' has no exported member — a missing step, not a broken checkout.
- Tests that authenticate: use
bearer() from test/auth-helper.ts. Sending a bare Stellar address as a bearer token returns 401. See Writing Tests That Need Authentication.
- Branch from the latest
dev and open your pull request against dev, not main. dev is the default branch; main is the released baseline. If you branched earlier, rebase onto dev.
Category: Testing & Quality
Difficulty: Medium
Description:
After the two largest offenders are dealt with separately, roughly 30
@typescript-eslint/no-explicit-anyoccurrences remain, spread thinly across about fifteen test files. Individually each is trivial; collectively they are why the codebase does not meet the specification's no-anyrequirement. Because the rule is a warning, nothing stops the number climbing again after it is cleared.Location:
src/vendor/analytics/analytics.service.spec.tssrc/common/validators/stellar-address.validator.spec.tssrc/notifications/notifications.service.spec.tssrc/escrow/escrow.service.sync-state.spec.tstest/unit/tracking-poll.worker.spec.tstest/unit/escrow.service.spec.tstest/unit/notifications.service.spec.tstest/unit/escrow-tracking-cache.spec.tstest/unit/admin.guard.spec.tstest/unit/stellar-webhook.service.spec.tstest/unit/escrow-tracking.spec.tstest/unit/dlq.service.spec.tstest/unit/blockchain-listener.service.spec.tstest/unit/auto-release.worker.spec.tstest/integration/vendor-analytics.integration-spec.tstest/integration/escrow.integration-spec.tstest/integration/escrow-cancellation.integration-spec.tsExample commits:
Acceptance Criteria:
no-explicit-anywarnings across every file listedas unknown as Xchains or eslint disable comments introducedjest.Mocked<T>is used for service mocks rather than untyped literalsnpm run lint:checkreports zerono-explicit-anywarnings once this and the two related issues have mergedTechnical Notes:
This can be split across several PRs by directory if that is easier to review, but say which files a PR covers. Do not change the eslint configuration here, promoting the rule to an error is a separate issue that depends on this one.
Before you start
nvm use), runnpm cirather thannpm install, and runnpx prisma generateafter installing. Skipping that last step makesnpm run typecheckfail withModule '"@prisma/client"' has no exported member— a missing step, not a broken checkout.bearer()fromtest/auth-helper.ts. Sending a bare Stellar address as a bearer token returns 401. See Writing Tests That Need Authentication.devand open your pull request againstdev, notmain.devis the default branch;mainis the released baseline. If you branched earlier, rebase ontodev.