From 1c121f1ba5b0b777c1be6c75133096a0327792be Mon Sep 17 00:00:00 2001 From: valadaptive Date: Sat, 2 Dec 2023 09:19:35 -0500 Subject: [PATCH] Enable use-isnan lint --- .eslintrc.js | 1 - public/scripts/extensions/regex/index.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 334b0fcce..7753defe7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -63,7 +63,6 @@ module.exports = { 'no-extra-boolean-cast': 'off', 'require-yield': 'off', 'no-case-declarations': 'off', - 'use-isnan': 'off', 'no-constant-condition': ['error', {checkLoops: false}] } }; diff --git a/public/scripts/extensions/regex/index.js b/public/scripts/extensions/regex/index.js index bce655efb..97870a158 100644 --- a/public/scripts/extensions/regex/index.js +++ b/public/scripts/extensions/regex/index.js @@ -178,7 +178,7 @@ async function onRegexEditorOpenClick(existingId) { .filter(":checked") .map(function () { return parseInt($(this).val()) }) .get() - .filter((e) => e !== NaN) || [], + .filter((e) => !isNaN(e)) || [], disabled: editorHtml .find(`input[name="disabled"]`)