Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
ota-meshi merged 3 commits intomasterfromdetect-object-assign
Sep 22, 2025

Conversation

@waynzh
Copy link
Member

resolve#2823

@changeset-bot
Copy link

changeset-botbot commentedSep 5, 2025
edited
Loading

🦋 Changeset detected

Latest commit:c943abf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
eslint-plugin-vueMinor

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

Copy link
Member

@FloEdelmannFloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Very nice, thanks!

Copy link
Contributor

CopilotAI left a 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 detectObject.assign calls with specific target nodes
  • Enhanced mutation detection logic to identifyObject.assign as a mutation operation
  • Added comprehensive test coverage for both valid and invalidObject.assign usage patterns

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

FileDescription
lib/utils/index.jsAddedisObjectAssignCall utility function and integrated Object.assign detection into mutation analysis
tests/lib/rules/no-mutating-props.jsAdded test cases for Object.assign prop mutation detection
tests/lib/rules/no-side-effects-in-computed-properties.jsAdded test cases for Object.assign side effect detection in computed properties
.changeset/hot-beers-help.mdAdded changelog entry documenting the enhancement

Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@ota-meshiota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM! Thank you!

@ota-meshiota-meshi merged commit7aaba4d intomasterSep 22, 2025
24 of 26 checks passed
@ota-meshiota-meshi deleted the detect-object-assign branchSeptember 22, 2025 01:27
@github-actionsgithub-actionsbot mentioned this pull requestSep 22, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@FloEdelmannFloEdelmannFloEdelmann approved these changes

@ota-meshiota-meshiota-meshi approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

vue/no-mutating-props should warn on Object.assign with prop as first argument

4 participants

@waynzh@FloEdelmann@ota-meshi

[8]ページ先頭

©2009-2025 Movatter.jp