fix(types): forbid any — enable noImplicitAny + strictNullChecks (#133)#137
Open
jishanahmed-shaikh wants to merge 2 commits intoebi-webcomponents:mainfrom
Open
fix(types): forbid any — enable noImplicitAny + strictNullChecks (#133)#137jishanahmed-shaikh wants to merge 2 commits intoebi-webcomponents:mainfrom
any — enable noImplicitAny + strictNullChecks (#133)#137jishanahmed-shaikh wants to merge 2 commits intoebi-webcomponents:mainfrom
Conversation
dlrice
requested changes
Apr 21, 2026
Contributor
dlrice
left a comment
There was a problem hiding this comment.
Thanks so much for this PR! There are multiple uses of unknown - do you mind tightening up the types to avoid this?
…lock.json - Revert yarn.lock (should not be modified by this task) - Remove package-lock.json (wrong lockfile for this project) - filter-config.spec.ts: replace 'as unknown as' casts with a makeVariant() helper that builds properly-typed TransformedVariant fixtures — no casts needed at call sites - proteomics-adapter.ts: extend TooltipFeature instead of a loose Record so formatTooltip() accepts ProteomicsFeature directly - protvista-uniprot.ts: introduce TrackPayload union type for data/rawData maps, replacing Record<string,unknown>; tighten dataAsArray cast to use TransformedVariant[] - utils/index.ts: widen begin param to string|number to match TooltipFeature.begin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #133
Eliminates implicit and explicit
anyfromsrc/, enables strictTypeScript defaults, and adds an ESLint rule to prevent
anyfromcreeping back in CI.
Changes
Config
tsconfig.json—noImplicitAny: true,strictNullChecks: trueeslint.config.mjs—@typescript-eslint/no-explicit-any: "error"Adapters
feature-adapter,proteomics-adapter,structure-adapter,variation-adapter,variation-graph-adapteralphafold-confidence-adapter,alphamissense-pathogenicity-adapter,alphamissense-heatmap-adapter— proper return types and null/undefined handlingptm-exchange-adapter— fixed enum indexing and nullconfidenceScoreStructureFeaturetype fromstructure-adapterfor reuseTooltips
feature-tooltip,structure-tooltip,variation-tooltip,ptm-tooltipTooltipFeaturetype fromfeature-tooltipComponents
protvista-uniprot.ts— typeddata/rawDatamaps, adapter dispatch, filter handlersprotvista-uniprot-structure.ts— fixed implicit any bindings andnull/undefinedstrictnessTests
filter-config.spec.tscasts to satisfy strict typesVerification
tsc --noEmit → 0 errors vitest run → 60/60 tests pass
Notes
Done incrementally as recommended in the issue — all
src/files arecovered in this PR. The adapter dispatch map retains a single
intentional cast (documented with a comment) due to TypeScript's
function parameter contravariance on heterogeneous maps.