Replace the 98 explicit `: any` annotations with concrete types, starting with the auth and payments modules
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- eslint, node.js, typescript
Research direction
Start with .eslintrc.js and tsconfig.json, then inspect the : any sites in src/core/auth/ and src/payments/, using existing DTOs and entities as the issue suggests. Record the baseline with the provided grep command; finish when the lint rule is set to warn, both modules contain no any, the count is recorded and reduced, and npx tsc --noEmit and npm test pass.
Written by the indexing model from the issue text.
Description
Problem
src/ contains ~98 explicit : any annotations. ESLint cannot flag them because .eslintrc.js:38 sets:
'@typescript-eslint/no-explicit-any': 'off',
and tsconfig.json sets "noImplicitAny": false, so implicit any is invisible too.
Concrete examples already seen: audit-log.service.ts:17 (async recordVerification(result: any)), file-upload.controller.ts:126 (category: category as any), and src/common/ pagination and interceptor code.
Why it matters
any disables the compiler exactly where it is most useful. In recordVerification(result: any), a change to the verification result shape will compile cleanly and fail at runtime. This compounds the strictness issue in tsconfig.json — with no-explicit-any off and strict off, the type system is effectively advisory across the whole codebase.
It also directly contradicts the project's own stated goal in README.md line 266:
Write DTOs for all controller inputs and use class-validation for strict contracts.
Suggested Direction
Incremental, module by module — do not attempt all 98 at once.
- Tighten the linter first so the count cannot grow:
Warnings, not errors, so nothing breaks on day one. Change'@typescript-eslint/no-explicit-any': 'warn',off→warnin a standalone PR. - Then work down the list, highest-risk first:
src/core/auth/— token and credential pathssrc/payments/— money movementsrc/blockchain/oracle/— on-chain submissionsrc/infrastructure/audit/— the audit trail
- Ban new ones in touched files via
// eslint-disable-next-line @typescript-eslint/no-explicit-anywith a reason, so the reduction is enforceable. - Use existing DTOs and entities rather than inventing types — most
: anysites look like a missing DTO annotation.
Get the current count with grep -rn ': any' src/ --include='*.ts' | wc -l and record it, so progress is measurable.
Constraints
strictNullChecksis off, so replacinganywith a specific type can surface null errors that did not exist before. Expect churn in DTO-to-entity boundaries.- Do not introduce
unknownas a cop-out without adding a type guard — that just relocates the problem. - Do not change runtime behaviour.
Acceptance Criteria
-
no-explicit-anyis set towarnin.eslintrc.js. - The baseline count is recorded in the issue.
- The count has decreased, with the auth and payments modules fully addressed.
- No
anyremains insrc/core/auth/orsrc/payments/. -
npx tsc --noEmitandnpm testpass.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 55
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SourceXXL/alian_structure-api
-
good first issue help wanted security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#266 ·
-
Parallelize the cache-warming loop in `cache-warming.service.ts` — warmers run strictly sequentiallyPossibly taken @syntaxsuuvam-spec claimed this 3 days ago. Opengood first issue performance
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#240 ·
-
documentation help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
SourceXXL/alian_structure-api#215 ·
-
good first issue refactor tooling
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
SourceXXL/alian_structure-api#199 ·
-
help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SourceXXL/alian_structure-api#196 ·
All issues in SourceXXL/alian_structure-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
status:approved type:bug
Difficulty 1/5 Under an hour Newbie friendliness 70/100
egdev6/quorb#109 · 1 comment ·
Maintainers usually reply within 1 day
-
stage:4
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ilan-pinto/roaring-lions#598 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Frontmatter next to `src:` is applied to every imported slide, not only the first (undocumented)Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day