Skip to content
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

Merged

Conversation

WillieHabi
Copy link
Contributor

@WillieHabi WillieHabi commented Jan 31, 2025

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.

@Copilot Copilot bot review requested due to automatic review settings January 31, 2025 17:26
@github-actions github-actions bot added area: dds Issues related to distributed data structures base: main PRs targeted against main branch labels Jan 31, 2025

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.

@WillieHabi WillieHabi changed the title improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up lint disables improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up 10+ lint disables Jan 31, 2025
@WillieHabi WillieHabi requested a review from jason-ha January 31, 2025 18:40
// 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);
Copy link
Contributor

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 ??

Copy link
Contributor

@jason-ha jason-ha left a 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.

@WillieHabi WillieHabi changed the title improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up 10+ lint disables improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up no-unsafe-any-assignment lint disable Jan 31, 2025
@WillieHabi
Copy link
Contributor Author

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.

@WillieHabi WillieHabi changed the title improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up no-unsafe-any-assignment lint disable improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up no-unsafe-assignment lint disable Jan 31, 2025
@WillieHabi WillieHabi changed the title improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up no-unsafe-assignment lint disable improvement(shared-object-base): use shallowCloneObject helper in FluidSerializer to clean up no-unsafe-assignment lint disable Jan 31, 2025
@WillieHabi WillieHabi merged commit 3459304 into microsoft:main Jan 31, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds Issues related to distributed data structures base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants