From a7d1ccb72b1204daeb5bdb68a8e06cd85a8b06d1 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Tue, 16 Aug 2022 23:58:14 +0800 Subject: [PATCH] Enable `no-unused-expressions` rule (#13290) --- .eslintrc.cjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 8972b2871..6dc7aad50 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -43,6 +43,13 @@ module.exports = { "no-return-await": "error", "no-unneeded-ternary": "error", "no-useless-return": "error", + "no-unused-expressions": [ + "error", + { + allowShortCircuit: true, + allowTernary: true, + }, + ], "no-unused-vars": [ "error", {