chore: remove explicit any and expect-error in platform and app-store…#29547
chore: remove explicit any and expect-error in platform and app-store…#29547gmrnlg1971 wants to merge 2 commits into
Conversation
|
Welcome to Cal.diy, @gmrnlg1971! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR tightens TypeScript types across three areas: it removes an explicit 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/platform/atoms/event-types/hooks/useEventTypeForm.ts`:
- Around line 399-404: getDirtyFields still uses a `@ts-expect-error` while
filteredPayload was refactored to avoid it; update getDirtyFields to follow the
same pattern by replacing the reduce accumulator typing hack with an explicit
accumulator cast (e.g., use {} as Record<string, unknown> in the reduce initial
value and cast the final result to the appropriate dirty-fields type) inside the
getDirtyFields function so the assignment to the typed accumulator no longer
requires `@ts-expect-error` and the code is consistent with filteredPayload.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 234251ac-08fb-4fac-a206-2853d17b3f0b
📒 Files selected for processing (3)
packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.tspackages/platform/atoms/booker/BookerPlatformWrapper.tsxpackages/platform/atoms/event-types/hooks/useEventTypeForm.ts
💤 Files with no reviewable changes (1)
- packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.ts
9e6deb0 to
05d2c87
Compare
| } | ||
| > extends Response { | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| body: any; |
There was a problem hiding this comment.
body is removed entirely. Can u please add it back with proper type
bandhan-majumder
left a comment
There was a problem hiding this comment.
can u run type check locally with type-check and attach a screenshot that everything is fine?
|
|
|
I've added |
… packages
What does this PR do?
This PR removes remaining explicit any and @ts-expect-error declarations in packages/platform and packages/app-store.
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist