[33/44] Enable TS strict mode in portlets-dot-plugins-portlet
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 portlets-dot-plugins-portlet project.
- Internal dependents: 1 · Rollout order: 33 / 44
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 was never installed. The ACs below reflect the approach in force, documented incore-web/CLAUDE.md→ TypeScript Strict Mode.
Acceptance Criteria
- The six strict flags are present in the project's own
tsconfig.json:
forceConsistentCasingInFileNames,strict,noImplicitOverride,noPropertyAccessFromIndexSignature,noImplicitReturns,noFallthroughCasesInSwitch. -
tsc -p <projectRoot>/tsconfig.lib.json --noEmitreports 0 errors (tsconfig.app.jsonfor apps). -
tsc -p <projectRoot>/tsconfig.spec.json --noEmitreports 0 errors. - All errors resolved with explicit types — no new
any. -
nx run <project>:lintand:testpass, with the test count unchanged. -
nx affected -t build,lintdoes not break dependents. - The enforcement status is recorded — i.e. whether any CI gate actually verifies the strictness.
⚠️ Four things established earlier in this rollout that make error counts untrustworthy:
:testdoes not type-check.isolatedModules: trueputs ts-jest in transpile-only mode (#35948), so passing tests say nothing about types.tsc -pis the acceptance test — but run the tests anyway, since they catch behaviour changestsccannot.- A
filesentry pointing at a missing file (TS6053, #35947) or an uninstalledtypesentry (TS2688, #35944) abortstscbefore semantic checking.tscdoes not check templates. Only a build does, and most projects here have nobuildtarget (#35970).- Check
moduleResolution.node10cannot resolve the@dotcms/*subpath exports, which inflateddot-pluginsfrom 63 real errors to 733 (#35966). Matchdot-tags:bundler+module: "preserve".
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
Read core-web/CLAUDE.md at the TypeScript Strict Mode section, then inspect the portlets-dot-plugins-portlet tsconfig.json, tsconfig.lib.json, and tsconfig.spec.json files. Run the two stated tsc commands first, then nx lint and test; done means zero type errors, unchanged test count, passing affected build and lint checks, and recorded CI enforcement status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, testing-qa, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100