Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-08-18 18:00:46 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-08-22 21:14:50 +0300
commitbd2ae5d79eb8807bfca6075e98432c545a9ededa (patch)
tree283f8cfd5e989303279331a105adfdd0c024e1be /lib/utils
parentd54f03132a5e8247cdd8a3c165669477e95980fb (diff)
fix: linting
In preparation for @npmcli/eslint-config@3.1.0
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/queryable.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/queryable.js b/lib/utils/queryable.js
index ceb06bdcc..7c5bb7fe8 100644
--- a/lib/utils/queryable.js
+++ b/lib/utils/queryable.js
@@ -148,7 +148,9 @@ const setter = ({ data, key, value, force }) => {
let maybeIndex = Number.NaN
try {
maybeIndex = Number(_key)
- } catch (err) {}
+ } catch {
+ // leave it NaN
+ }
if (!Number.isNaN(maybeIndex)) {
_key = maybeIndex
}