[13/44] Enable TS strict mode in sdk-analytics
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Description
Part of the strict-mode rollout epic #35932. Enable TypeScript strict mode for the sdk-analytics project.
- Dependency layer: 2 (0 = leaf library, 10 = top-level app)
- Internal dependents: 0 project(s)
- Rollout order: 13 / 44
- Note: Isolated (0 dependents).
All internal dependencies of sdk-analytics should already be in strict mode before starting (they appear earlier in the rollout order).
Note: the original acceptance criteria referenced
typescript-strict-plugin,npx tsc-strict, and// @ts-strict-ignore. That approach was dropped by the epic — the plugin is not installed anywhere in the repo. The ACs below reflect the approach actually in force, documented incore-web/CLAUDE.md→ TypeScript Strict Mode.
Acceptance Criteria
- The six strict flags are added to
sdk-analytics's owntsconfig.json(nottsconfig.base.json, nottsconfig.spec.json):
forceConsistentCasingInFileNames,strict,noImplicitOverride,noPropertyAccessFromIndexSignature,noImplicitReturns,noFallthroughCasesInSwitch. - All resulting type errors are resolved (no new
any; use explicit types). -
@ts-expect-errorwith a// TODO(#35946):note is used only where unavoidable — never a blanket@ts-ignore. -
pnpm exec tsc -p libs/sdk/analytics/tsconfig.lib.json --noEmitreports 0 errors. -
pnpm exec tsc -p libs/sdk/analytics/tsconfig.spec.json --noEmitreports 0 errors (the spec config extendstsconfig.json, so specs go strict too). -
nx run sdk-analytics:lint,:test,:buildand:build:standalonepass. -
nx affected -t build,lintdoes not break dependents. - The enforcement status is recorded — i.e. whether any CI gate actually verifies the strictness.
Priority
Medium
Additional Context
One project in the bottom-up rollout tracked by epic #35932.
Contributor 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.
Research direction
Start with libs/sdk/analytics/tsconfig.json and review core-web/CLAUDE.md’s TypeScript Strict Mode guidance. Enable the six listed flags, then run the lib and spec tsc commands and the sdk-analytics lint, test, build, and build:standalone targets. Done means all type errors are resolved without new any, affected builds pass, and CI strictness enforcement is recorded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100