Context
After the TypeScript 6 upgrade, we unblocked the build pragmatically by disabling noImplicitAny and strictNullChecks in tsconfig.json, and by typing the adapter dispatch map in src/protvista-uniprot.ts as Record<string, (...args: any[]) => any>. This pushed ~99 latent type errors out of the way but did not fix them. any now hides real mismatches (for example, the adapter map previously masked a genuine signature mismatch between variation-adapter and the ProteomicsPtm-typed dispatch entry).
Task
Eliminate both implicit and explicit any from src/, then re-enable strict defaults and lint for any going forward.
Scope:
- Enable
"noImplicitAny": true and "strictNullChecks": true in tsconfig.json (or flip "strict": true).
- Add
@typescript-eslint/no-explicit-any: "error" to the ESLint config so new any uses fail CI.
Notes:
Consider doing this incrementally — fix one directory at a time (adapters → tooltips → top-level components), merging as each lands green. Flipping strict on globally in one PR would touch ~100 errors and invite mistakes. The two genuine bugs surfaced during the earlier triage (adapter-map signature mismatch at protvista-uniprot.ts:182 / :221) should be re-validated after the adapter map is properly typed, rather than left behind the any[] cast.
Context
After the TypeScript 6 upgrade, we unblocked the build pragmatically by disabling
noImplicitAnyandstrictNullChecksintsconfig.json, and by typing the adapter dispatch map insrc/protvista-uniprot.tsasRecord<string, (...args: any[]) => any>. This pushed ~99 latent type errors out of the way but did not fix them.anynow hides real mismatches (for example, the adapter map previously masked a genuine signature mismatch betweenvariation-adapterand theProteomicsPtm-typed dispatch entry).Task
Eliminate both implicit and explicit
anyfromsrc/, then re-enable strict defaults and lint foranygoing forward.Scope:
"noImplicitAny": trueand"strictNullChecks": trueintsconfig.json(or flip"strict": true).@typescript-eslint/no-explicit-any: "error"to the ESLint config so newanyuses fail CI.Notes:
Consider doing this incrementally — fix one directory at a time (adapters → tooltips → top-level components), merging as each lands green. Flipping strict on globally in one PR would touch ~100 errors and invite mistakes. The two genuine bugs surfaced during the earlier triage (adapter-map signature mismatch at
protvista-uniprot.ts:182/:221) should be re-validated after the adapter map is properly typed, rather than left behind theany[]cast.