question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

for (;;) should count as a constant condition

See original GitHub issue

for (;;) is functionally equivalent to a constant condition so it should be caught by the constant conditon rule.

eslint version: 2.8.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
platinumazurecommented, May 30, 2016

One other possibility I could see is to remove the for (;;) exception by default, making it a flagged constant condition, now that we have the loop exception option. However, that would be a breaking change.

0reactions
albertocommented, Aug 1, 2016

Thanks for your interest in improving eslint. Unfortunately, it looks like consensus couldn’t be reached on this issue and so I’m closing it. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach consensus after 21 days tend never to reach consensus, and as such, we close those issues. This doesn’t mean the idea isn’t interesting, just that it’s not something the team can commit to.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why an expression instead of a constant, in a C for-loop's ...
C has a thing called "the as-if rule" (well - not exactly; C++ has that, and C has equivalent text but doesn't call...
Read more >
Rules - ESLint - Pluggable JavaScript Linter
Disallow constant expressions in conditions. Categories: ... Disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
Read more >
The guide to calculated values and conditions in Justinmind
Constants: these are a set of calculated values that can be used in the ... Count (data count): Returns the number of instances...
Read more >
Chronic obstructive pulmonary disease (COPD)
There is no cure for COPD, but early diagnosis and treatment are important to slow the progression of symptoms and reduce the risk...
Read more >
5 PL/SQL Collections and Records
When declaring an associative array constant, you must create a function that populates the associative array with its initial value and then invoke...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found