Browse Source

Add no-constant-binary-expression eslint rule

https://eslint.org/blog/2022/07/interesting-bugs-caught-by-no-constant-binary-expression/
Chocobozzz 4 months ago
parent
commit
c37b19ffa9
2 changed files with 5 additions and 1 deletions
  1. 3 0
      .eslintrc.json
  2. 2 1
      client/.eslintrc.json

+ 3 - 0
.eslintrc.json

@@ -40,6 +40,9 @@
       }
     ],
     "quotes": "off",
+
+    "no-constant-binary-expression": "error",
+
     "@typescript-eslint/indent": [
       "error",
       2,

+ 2 - 1
client/.eslintrc.json

@@ -159,7 +159,8 @@
         "quote-props": [
           "error",
           "consistent-as-needed"
-        ]
+        ],
+        "no-constant-binary-expression": "error"
       }
     },
     {