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');