Closed
Description
Disallow constant expressions in conditions.
http://eslint.org/docs/rules/no-constant-condition
This rule is overly broad by default, preventing things like while (true)
with a break
inside, which is really common when writing low-level modules like parsers, etc. which is why it was not enabled before now.
However, there is now a checkLoops
option that can be set to false
so that only things like this get checked:
if (false) {
// ...
}
So I propose we enable this now.
Metadata
Assignees
Type
Projects
Status
Done