for (;;) should count as a constant condition
See original GitHub issuefor (;;)
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:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.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.