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
Merged

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

merged 1 commit into from Jul 17, 2019

Conversation

mdjermanovic
Copy link
Member

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-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Jul 4, 2019
Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@platinumazure platinumazure added breaking This change is backwards-incompatible bug ESLint is working incorrectly enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Jul 4, 2019
@platinumazure
Copy link
Member

platinumazure 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
Copy link
Member

Thank you for your contribution.

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

@mysticatea mysticatea added accepted There is consensus among the team that this change meets the criteria for inclusion and removed breaking This change is backwards-incompatible evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jul 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants