diff --git a/docs/rules/strict-logical-expressions.md b/docs/rules/strict-logical-expressions.md index a78cbd0..0a270bc 100644 --- a/docs/rules/strict-logical-expressions.md +++ b/docs/rules/strict-logical-expressions.md @@ -11,11 +11,11 @@ Examples of **incorrect** code for this rule: ```js // Potentially falsey strings are not allowed -let str; +let str = ''; {str && }; // Potentially falsey numbers are not allowed -let num; +let num = 0; {num && }; // Includes types that may be a string or number @@ -37,6 +37,10 @@ let str = "Foo"; // Constant values are ok const str = "Foo"; {str && }; + +// Constant values are ok +const num = 1; +{num && }; ``` ### Options