From b753d4915848d772ed7934ae2cde5ec307fb57bc Mon Sep 17 00:00:00 2001 From: Alexandr Garbuzov Date: Fri, 13 Oct 2023 22:21:12 +0300 Subject: [PATCH] infra: enable radix eslint rule (#3261) --- .eslintrc.json | 2 +- src/common/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 2edbe53..92319dc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -99,7 +99,7 @@ "location": "start" }], "no-with": "warn", - // "radix": "warn", + "radix": "warn", // "vars-on-top": "error", // Enforces the style of wrapped functions diff --git a/src/common/utils.js b/src/common/utils.js index 93d60cd..95d683c 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -232,7 +232,7 @@ const parseArray = (str) => { */ const clampValue = (number, min, max) => { // @ts-ignore - if (Number.isNaN(parseInt(number))) { + if (Number.isNaN(parseInt(number, 10))) { return min; } return Math.max(min, Math.min(number, max));