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

Update: Add for-in and for-of checks for props in no-param-reassign #11941

Merged
merged 1 commit into from Jul 17, 2019

Conversation

@mdjermanovic
Copy link
Member

commented Jul 4, 2019

What is the purpose of this pull request? (put an "X" next to item)

[X] Changes an existing rule

What rule do you want to change?

no-param-reassign

Does this change cause the rule to produce more or fewer warnings?

more

How will the change be implemented? (New option, new default behavior, etc.)?

new default behavior

Please provide some example code that this change will affect:

/* eslint no-param-reassign: ["error", { "props": true }] */

function foo(a) {

  for (a.prop in obj);

  for (a.prop of arr);

}

What does the rule currently do for this code?

No warnings

What will the rule do after it's changed?

2 warnings

What changes did you make? (Give an overview)

Added ForInStatement.left and ForOfStatement.left checks.

Is there anything you'd like reviewers to focus on?

@eslint eslint bot added the triage label Jul 4, 2019

@platinumazure
Copy link
Member

left a comment

LGTM, thanks!

@platinumazure

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

Not sure if this should be regarded as a bug fix (resulting in more warnings, thus semver-minor) or a breaking change. I am okay with thinking of it as a bug but would like to see what others think.

@mysticatea

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

Thank you for your contribution.

I'm fine that it's handled as a bug (= a minor version fix).

@mysticatea mysticatea merged commit 222d27c into eslint:master Jul 17, 2019

9 checks passed

commit-message Commit message follows guidelines
Details
continuous-integration Build #20190704.1 succeeded
Details
continuous-integration (Test on Node.js 10 (Linux)) Test on Node.js 10 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Linux)) Test on Node.js 12 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Windows)) Test on Node.js 12 (Windows) succeeded
Details
continuous-integration (Test on Node.js 12 (macOS)) Test on Node.js 12 (macOS) succeeded
Details
continuous-integration (Test on Node.js 8 (Linux)) Test on Node.js 8 (Linux) succeeded
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.