-
-
Notifications
You must be signed in to change notification settings - Fork 5
Enable promise linting in RealtimeServer #3414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3414 +/- ##
==========================================
- Coverage 82.22% 82.21% -0.01%
==========================================
Files 608 608
Lines 36199 36196 -3
Branches 5930 5911 -19
==========================================
- Hits 29764 29759 -5
- Misses 5562 5580 +18
+ Partials 873 857 -16 ☔ View full report in Codecov by Sentry. |
@marksvc This may be of interest to you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this by removing a chapter that contains notes (which will delete those from Mongo), and the references in sf_project_user_configs
were updated correctly.
In my testing I did notice a bug (not caused by your code) where the questionRefsRead
was not updated when questions were deleted, nor were the answerRefsRead and commentRefsRead arrays updated sf_project_user_configs
.
@pmachapman reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Nateowami)
src/RealtimeServer/scriptureforge/services/question-service.ts
line 250 at r1 (raw file):
await this.removeEntityReadRefs(userId, docId, projectDomain, entity); } return Promise.resolve();
You can remove this line, as the async
keyword will take care of this for you.
Code quote:
return Promise.resolve();
src/RealtimeServer/scriptureforge/services/note-thread-service.ts
line 229 at r1 (raw file):
await this.removeEntityHaveReadRefs(userId, docId, projectDomain, entity); } return Promise.resolve();
You can remove this line, as the async
keyword will take care of this for you.
Code quote:
return Promise.resolve();
src/RealtimeServer/scriptureforge/services/note-thread-service.ts
line 242 at r1 (raw file):
await this.removeEntityHaveReadRefs(userId, docId, projectDomain, entity); } return Promise.resolve();
You can remove this line, as the async
keyword will take care of this for you.
Code quote:
return Promise.resolve();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have logged the bug I found as SF-3546.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Nateowami)
3749fc0
to
87019bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 4 files reviewed, 3 unresolved discussions (waiting on @pmachapman)
src/RealtimeServer/scriptureforge/services/note-thread-service.ts
line 229 at r1 (raw file):
Previously, pmachapman (Peter Chapman) wrote…
You can remove this line, as the
async
keyword will take care of this for you.
Good point. Done.
src/RealtimeServer/scriptureforge/services/note-thread-service.ts
line 242 at r1 (raw file):
Previously, pmachapman (Peter Chapman) wrote…
You can remove this line, as the
async
keyword will take care of this for you.
Done.
src/RealtimeServer/scriptureforge/services/question-service.ts
line 250 at r1 (raw file):
Previously, pmachapman (Peter Chapman) wrote…
You can remove this line, as the
async
keyword will take care of this for you.
Done.
Co-authored-by: marksvc <[email protected]>
87019bd
to
a718c81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmachapman reviewed 2 of 2 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Nateowami)
The change to the lint rule is copied from #3391. I then fixed the lint issues, and made them be considered errors.
This change is