diff --git a/.forgejo/workflows/.eslintrc.cjs b/.forgejo/workflows/.eslintrc.cjs index bd72d81..bd4f055 100644 --- a/.forgejo/workflows/.eslintrc.cjs +++ b/.forgejo/workflows/.eslintrc.cjs @@ -24,6 +24,7 @@ module.exports = { '@stylistic/js', ], globals: { + screenshot: 'readonly', cfg: 'readonly', URL_CLAIM: 'readonly', COOKIES_PATH: 'readonly', diff --git a/epic-games.js b/epic-games.js index a22a873..beb3cd7 100644 --- a/epic-games.js +++ b/epic-games.js @@ -3,10 +3,10 @@ import { authenticator } from 'otplib'; import chalk from 'chalk'; import path from 'node:path'; import { existsSync, writeFileSync, appendFileSync } from 'node:fs'; -import { resolve, jsonDb, datetime, stealth, filenamify, prompt, notify, html_game_list, handleSIGINT } from './src/util.js'; +import { jsonDb, datetime, stealth, filenamify, prompt, notify, html_game_list, handleSIGINT } from './src/util.js'; import { cfg } from './src/config.js'; -const screenshot = (...a) => resolve(cfg.dir.screenshots, 'epic-games', ...a); +const screenshot = (...a) => path.resolve(cfg.dir.screenshots, 'epic-games', ...a); const URL_CLAIM = 'https://store.epicgames.com/en-US/free-games'; const URL_LOGIN = 'https://www.epicgames.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=' + URL_CLAIM;