chore(strict): enable exactOptionalPropertyTypes and no-non-null-assertion - #68
Merged
Merged
Conversation
…rtion Continues the ultra-strict TypeScript hardening: adds exactOptionalPropertyTypes to tsconfig.json and typescript/no-non-null- assertion to .oxlintrc.json. noUncheckedIndexedAccess was already present. No fallout — both flags pass clean against the existing codebase. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZiaeDvfVP6fgSM6hhg2bc
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated Oxlint to report TypeScript non-null assertions as errors. Enabled TypeScript’s ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
edhor1608
added a commit
that referenced
this pull request
Aug 2, 2026
main enabled `exactOptionalPropertyTypes` (#68) plus `typescript/strict-boolean-expressions` and `typescript/no-non-null-assertion` (#69) while this PR was open. Both sides had rewritten `src/cli/prepare_image.ts`, but not as competing implementations: main adapted the old architecture's expressions to the new rules, while this branch had already moved directory enumeration and output allocation into the domain behind `prepareImages()`. The resolution keeps this branch's thin CLI and takes only main's strict idioms. The new rules also reach code outside the conflict: - `image_engine.ts`: three truthiness checks made explicit. All are equivalent -- `getSupportedString` returns an allowlisted value or null and never "", and `sourceCrop` is an object or undefined. - `prepare_image.ts`: `?.isDirectory()` / `?.isFile()` compared against `true`, since optional chaining yields `boolean | undefined`. - `tests/helpers/cli.ts`: `env: undefined` is no longer assignable to an optional property, so the key is now omitted entirely when no override is passed. No behavior change; all 26 acceptance tests pass unmodified. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BFTLY9M1HfSALwHBMTEyPi Entire-Checkpoint: 4448d79cc6d0
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.
Stage 1 of the TypeScript ultra-strict hardening rolled out across all active repos: adds
exactOptionalPropertyTypesto tsconfig.json (noUncheckedIndexedAccess was already enabled) andtypescript/no-non-null-assertion: errorto .oxlintrc.json. Zero fallout — the codebase was already clean. Verified: typecheck, lint, 20 tests green.🤖 Generated with Claude Code
https://claude.ai/code/session_01WZiaeDvfVP6fgSM6hhg2bc
Summary by CodeRabbit
Note
Enable
exactOptionalPropertyTypesandno-non-null-assertionstrict TypeScript checksAdds
exactOptionalPropertyTypes: trueto tsconfig.json and thetypescript/no-non-null-assertionrule (as error) to .oxlintrc.json. Risk: these are stricter type checks that may surface new type errors in existing code.Macroscope summarized 9c93e45.