🔧 chore(workflows): add screenshot to ESLint globals
- add screenshot as a readonly global variable to ESLint configuration
♻️ refactor(epic-games): improve path resolution for screenshots
- replace resolve with path.resolve for better path management
This commit is contained in:
parent
af90aa7c42
commit
370e3db206
2 changed files with 3 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ module.exports = {
|
||||||
'@stylistic/js',
|
'@stylistic/js',
|
||||||
],
|
],
|
||||||
globals: {
|
globals: {
|
||||||
|
screenshot: 'readonly',
|
||||||
cfg: 'readonly',
|
cfg: 'readonly',
|
||||||
URL_CLAIM: 'readonly',
|
URL_CLAIM: 'readonly',
|
||||||
COOKIES_PATH: 'readonly',
|
COOKIES_PATH: 'readonly',
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@ import { authenticator } from 'otplib';
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { existsSync, writeFileSync, appendFileSync } from 'node:fs';
|
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';
|
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_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;
|
const URL_LOGIN = 'https://www.epicgames.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=' + URL_CLAIM;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue