[38/44] Enable TS strict mode in edit-ema-ui
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 edit-ema-ui.
Acceptance Criteria
- The six strict flags are in the project's own
tsconfig.json— nottsconfig.spec.json, nottsconfig.base.json(which stays"strict": false). -
tsc -p <root>/tsconfig.lib.json --noEmitreports 0 errors. -
tsc -p <root>/tsconfig.spec.json --noEmitreports 0 errors. - No new
any, and no non-null assertions left in production code — nullability is handled with guards. -
nx run <project>:lintback at its baseline. -
nx run <project>:testunchanged.
[!IMPORTANT]
typescript-strict-plugin/npx tsc-strict/@ts-strict-ignoreare not used — that approach was dropped early in the epic. Seecore-web/CLAUDE.md→ TypeScript Strict Mode. The original ACs have been corrected.
Measurement caveats
Six ways to get a green signal that verified nothing, all hit during this epic:
nx run <project>:testnever type-checks — ts-jest runs transpile-only because everytsconfig.spec.jsonsetsisolatedModules: true.TS2688(atypesentry that is not installed) aborts before semantic checking.TS6053(afilesentry pointing at a missing file) aborts the same way.TS5101/TS5107(deprecatedbaseUrl/moduleResolution: node10) also abort.tsc -pdoes not check templates. Only a build does.- Check
moduleResolution:node10cannot resolve the@dotcms/*subpath exports.
The rule: any TS5xxx, TS6xxx or TS2688 error is a configuration error — tsc never reached the code, so the count after it is meaningless.
Neither project has a build target, so tsc -p on both configs is the acceptance test.
Priority
Medium
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 the edit-ema-ui project's own tsconfig.json, along with its tsconfig.lib.json and tsconfig.spec.json, and review the TypeScript Strict Mode guidance in core-web/CLAUDE.md. Run tsc -p against both project configs with --noEmit, then inspect the reported production nullability issues. Done means strict mode is configured in the project config, both checks report zero errors, lint returns to baseline, and tests remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100