We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 737cba3 commit cb612d1Copy full SHA for cb612d1
docs/rules/strict-logical-expressions.md
@@ -11,11 +11,11 @@ Examples of **incorrect** code for this rule:
11
12
```js
13
// Potentially falsey strings are not allowed
14
-let str;
+let str = '';
15
<App>{str && <Foo />}</App>;
16
17
// Potentially falsey numbers are not allowed
18
-let num;
+let num = 0;
19
<App>{num && <Foo />}</App>;
20
21
// Includes types that may be a string or number
@@ -37,6 +37,10 @@ let str = "Foo";
37
// Constant values are ok
38
const str = "Foo";
39
40
+
41
+// Constant values are ok
42
+const num = 1;
43
+<App>{num && <Foo />}</App>;
44
```
45
46
### Options
0 commit comments