-
Notifications
You must be signed in to change notification settings - Fork 536
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
improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up no-unsafe-assignment
lint disable
#23717
improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up no-unsafe-assignment
lint disable
#23717
Conversation
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TODO: not sure if there's a good solution | ||
clone = clone ?? (Array.isArray(input) ? [...input] : { ...input }); | ||
clone = clone ?? shallowCloneObject(input); |
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.
nit: we now prefer: clone ??=
over clone = clone ??
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.
Use of shallowCloneObject doesn't actually fix the test lint disables, right? Those were just warning debt. I'd remove that part from the title. Can add a note in the description that also cleaning up some pre-existing unused lint disables.
Thanks my mistake. wrongly assumed those became unused after the change. |
no-unsafe-assignment
lint disable
Description
Follow up to #23662: #23662 (comment)
Reason for
shallowCloneObject
: #23662 (comment)This PR also removes several unused
no-unsafe-assignment
lint disables in test file serializer.spec.ts.