From c37b19ffa97554990bd4485678dd563e24278a7e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Dec 2023 10:59:31 +0100 Subject: [PATCH] Add no-constant-binary-expression eslint rule https://eslint.org/blog/2022/07/interesting-bugs-caught-by-no-constant-binary-expression/ --- .eslintrc.json | 3 +++ client/.eslintrc.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3bfdee6eb..9545fe142 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -40,6 +40,9 @@ } ], "quotes": "off", + + "no-constant-binary-expression": "error", + "@typescript-eslint/indent": [ "error", 2, diff --git a/client/.eslintrc.json b/client/.eslintrc.json index e4c8d901b..e292617dd 100644 --- a/client/.eslintrc.json +++ b/client/.eslintrc.json @@ -159,7 +159,8 @@ "quote-props": [ "error", "consistent-as-needed" - ] + ], + "no-constant-binary-expression": "error" } }, {