Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upNew rule: no-constant-condition #563
Comments
feross
added
the
enhancement
label
Jul 12, 2016
feross
modified the milestone:
v8
Jul 12, 2016
This comment has been minimized.
This comment has been minimized.
|
Ah, sometimes I use this to "trick" standard ( |
This comment has been minimized.
This comment has been minimized.
|
Aye, works for me |
feross
closed this
in
standard/eslint-config-standard@52c1874
Jul 12, 2016
This comment has been minimized.
This comment has been minimized.
|
This rule will be included in standard v8 |
Merged
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
feross commentedJul 12, 2016
•
edited
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 abreakinside, 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
checkLoopsoption that can be set tofalseso that only things like this get checked:So I propose we enable this now.