Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork698
feat: Object.assign detection to mutation rules#2929
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
changeset-botbot commentedSep 5, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🦋 Changeset detectedLatest commit:c943abf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means?Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
FloEdelmann left a comment
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.
Very nice, thanks!
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.
Pull Request Overview
This PR enhances thevue/no-mutating-props andvue/no-side-effects-in-computed-properties rules to detect mutations caused byObject.assign() when the target object (first argument) is a prop or reactive data.
Key changes:
- Added utility function to detect
Object.assigncalls with specific target nodes - Enhanced mutation detection logic to identify
Object.assignas a mutation operation - Added comprehensive test coverage for both valid and invalid
Object.assignusage patterns
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/utils/index.js | AddedisObjectAssignCall utility function and integrated Object.assign detection into mutation analysis |
| tests/lib/rules/no-mutating-props.js | Added test cases for Object.assign prop mutation detection |
| tests/lib/rules/no-side-effects-in-computed-properties.js | Added test cases for Object.assign side effect detection in computed properties |
| .changeset/hot-beers-help.md | Added changelog entry documenting the enhancement |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ota-meshi left a comment
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.
LGTM! Thank you!
7aaba4d intomasterUh oh!
There was an error while loading.Please reload this page.
resolve#2823