From dddb62d4f1e1ca09bf35b3062a281e3839607fc0 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 13 Mar 2025 14:46:25 +0100 Subject: [PATCH] lint compliance --- eslint.config.js | 1 + www/common/drive-ui.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index eba722d94..535c18440 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -65,6 +65,7 @@ module.exports = [{ "linebreak-style": ["off", "unix"], quotes: ["off", "single"], semi: ["error", "always"], + eqeqeq: ["error", "always"], "no-irregular-whitespace": ["off"], "no-self-assign": ["off"], "no-empty": ["off"], diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 33cd0f4dc..77c2dbc4b 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -3461,11 +3461,11 @@ define([ b = [b]; } - if(a.length == 0 && b.length == 0) { + if(a.length === 0 && b.length === 0) { return 0; - } else if (a.length == 0) { + } else if (a.length === 0) { return -1; - } else if (b.length == 0) { + } else if (b.length === 0) { return 1; } else if(a[0] < b[0]) { return -1; @@ -3494,10 +3494,10 @@ define([ }; var naturalSort = function(a, b) { - if (typeof(a) == "string") { + if (typeof(a) === "string") { a = splitStringToTextAndNumbers(a); } - if (typeof(b) == "string") { + if (typeof(b) === "string") { b = splitStringToTextAndNumbers(b); }