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
no-unmodified-loop-condition false positive #5445
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
rule
Relates to ESLint's core rules
Comments
alberto
added
bug
ESLint is working incorrectly
rule
Relates to ESLint's core rules
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
accepted
There is consensus among the team that this change meets the criteria for inclusion
and removed
triage
An ESLint team member will look at this issue soon
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
labels
Mar 1, 2016
Confirmed |
mysticatea
added a commit
that referenced
this issue
Mar 3, 2016
Previously, this rule has been checking whether every BinaryExpression was modified or not. But this way has been reporting wrong warnings in chaining binary expression (e.g. `foo + bar < 1`). Now, this rule came to check whether the top of BinaryExpressions was modified or not.
mysticatea
added a commit
that referenced
this issue
Mar 5, 2016
Previously, this rule has been checking whether every BinaryExpression was modified or not. But this way has been reporting wrong warnings in chaining binary expression (e.g. `foo + bar < 1`). Now, this rule came to check whether the top of BinaryExpressions was modified or not.
nzakas
added a commit
that referenced
this issue
Mar 7, 2016
…-false-positive Fix: `no-unmodified-loop-condition` false positive (fixes #5445)
@mysticatea thank you for fixing this so quickly! |
craigmichaelmartin
pushed a commit
to craigmichaelmartin/eslint
that referenced
this issue
Mar 9, 2016
Previously, this rule has been checking whether every BinaryExpression was modified or not. But this way has been reporting wrong warnings in chaining binary expression (e.g. `foo + bar < 1`). Now, this rule came to check whether the top of BinaryExpressions was modified or not.
eslint-deprecated
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Feb 6, 2018
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
rule
Relates to ESLint's core rules
Using ESLint 2.2.0, the following code causes a false positive:
This is a false positive because
i
is modified in the loop condition. If you replacelen - 1
withlen
, the error disappears.Reproducible in the ESLint demo too. The issue is similar to #5166, but not the same. cc @feross @mysticatea
The text was updated successfully, but these errors were encountered: