From 24b893742cf88a4e0432810b6a2b7dedfdac695b Mon Sep 17 00:00:00 2001 From: Robin Bolscher Date: Mon, 29 Jan 2024 09:07:27 +0100 Subject: [PATCH] fix: eslint --- .eslintrc.json | 3 +++ lib/OAuth2Fetch.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index fa180c2..f4ce5ab 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,5 +3,8 @@ "env": { "jest/globals": true }, + "globals": { + "fetch": false + }, "plugins": ["jest"] } \ No newline at end of file diff --git a/lib/OAuth2Fetch.js b/lib/OAuth2Fetch.js index 0666573..cf49fbd 100644 --- a/lib/OAuth2Fetch.js +++ b/lib/OAuth2Fetch.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = Number(process.versions.node.split('.')[0]) >= 18 ? fetch // Use native fetch on Node 18 and above : require('node-fetch');