Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

prefer-for-of: identify more array modifications #3044

Merged
merged 4 commits into from Jul 21, 2017
Merged

prefer-for-of: identify more array modifications #3044

merged 4 commits into from Jul 21, 2017

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Jul 14, 2017

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

[bugfix] prefer-for-of fixed false positives when array is modified, e.g. arr[i]++

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

CHANGELOG.md entry:

}

for (let i = 0; i < arr.length; ++i) {
for (arr[i] of otherArr) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't even realize that this would be valid - I hope nobody ever does this in real life :P

@ajafff ajafff merged commit a29ba47 into palantir:master Jul 21, 2017
HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants