Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 631 Bytes

no-constant-condition.md

File metadata and controls

20 lines (13 loc) · 631 Bytes

Pattern: Constant expression in condition

Issue: -

Description

Do not use constant expressions in conditions. Similar to the ESLint no-constant-condition rule.

Configuration

Since version 2.0.14, this rule accepts a parameter called checkLoops which defaults to true. If set to false then loops are not checked for conditionals. For example, disable loop checking with:

[true, {
    'checkLoops': false
}]

Further Reading