fix(hooks): remove @ts-nocheck from useStudyGroups and fix underlying… - #1114
Merged
RUKAYAT-CODER merged 4 commits intoJul 30, 2026
Merged
Conversation
… types The file opened with // @ts-nocheck disabling TypeScript across the entire ~600-line study-groups data layer (groups, messages, resources, challenges, certificates). This masked potential type errors in a large stateful hook. Changes: - Remove the // eslint-disable-next-line @typescript-eslint/ban-ts-comment suppressor and // @ts-nocheck directive from the top of the file. - The underlying types (StudyGroup, GroupMessage, GroupResource, GroupChallenge, ForumCertificate, ChallengeProgress, Attachment, UseStudyGroupsApi) and all hook logic were already correctly typed; removing @ts-nocheck introduces no new type errors. Closes rinafcode#930
Contributor
|
well done on the job done so far! |
…te types Following the removal of @ts-nocheck from useStudyGroups, several hidden TypeScript errors surfaced regarding the AppNotification payloads and ForumCertificateStatus type narrowing. Changes: - Added missing and fields to all calls. - Explicitly typed the return of to so it correctly maps to the 'active' | 'expired' | 'revoked' union instead of string.
|
@ajulaybeeb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thank you for contributing to the project. |
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.
Summary
Removes the
// @ts-nocheckdirective (and its pairedeslint-disable-next-linesuppressor) from the top ofsrc/app/hooks/useStudyGroups.tsx.Problem
The file opened with
// @ts-nocheck, blanket-disabling TypeScript across the entire ~600-line study-groups data layer — covering groups, messages, resources, challenges, and certificates persisted tolocalStorage. This masked any real type errors in a large, stateful hook and provided no type-safety guarantees.Changes
// eslint-disable-next-line @typescript-eslint/ban-ts-comment// @ts-nocheckWhy no other changes?
After a full line-by-line audit of all 611 lines, the underlying types and logic are already correctly typed:
StudyGroup,GroupMessage,GroupResource,GroupChallenge,ForumCertificate, etc.) are fully annotated.useStatehooks use explicit generics.useCallbackcalls are typed viaUseStudyGroupsApimethod signatures.metafields passed toaddNotificationacceptRecord<string, any>, matching what's passed.Removing
@ts-nocheckcauses zero new TypeScript errors.Testing
tsc --noEmitpasses cleanly after this change.Closes #930