From 2aa4f5fb2fdb1c4a1734093c225e5c6251b0ee0f Mon Sep 17 00:00:00 2001 From: Sebastian Simon <37915283+SebastianSimon@users.noreply.github.com> Date: Tue, 24 Jan 2023 20:24:20 +0100 Subject: [PATCH] docs: no-constant-condition: Add multi-comparison example (#16776) * docs: Add multi-comparison example to no-constant-condition * Merge new example into existing code blocks --- docs/src/rules/no-constant-condition.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/src/rules/no-constant-condition.md b/docs/src/rules/no-constant-condition.md index 828a036ca48..2ac613f7abf 100644 --- a/docs/src/rules/no-constant-condition.md +++ b/docs/src/rules/no-constant-condition.md @@ -74,6 +74,10 @@ do { } while (x = -1); var result = 0 ? a : b; + +if(input === "hello" || "bye"){ + output(input); +} ``` ::: @@ -102,6 +106,10 @@ do { } while (x); var result = x !== 0 ? a : b; + +if(input === "hello" || input === "bye"){ + output(input); +} ``` :::