Chore: Update eslint configuration (#224)

- Update missing dev dependencies
- Fix root .eslintrc.json and client and server versions
- Add lint.yaml workflow
- Remove babel settings
- Clean up and fix eslint and ts errors
This commit is contained in:
Elisha Nuchi
2024-06-02 18:01:12 -04:00
committed by GitHub
parent a976451c78
commit 85223ca42a
19 changed files with 1411 additions and 594 deletions
+8 -4
View File
@@ -3,7 +3,6 @@
// This allows using stealth mode.
import fs from 'fs';
const fsPromises = fs.promises;
import os from 'os';
import path from 'path';
import puppeteer from 'puppeteer-extra';
@@ -11,9 +10,11 @@ import puppeteer from 'puppeteer-extra';
// add stealth plugin and use defaults (all evasion techniques)
import StealthPlugin from 'puppeteer-extra-plugin-stealth';
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
import jestPuppeteerConfig from './jest-puppeteer.config.js';
const fsPromises = fs.promises;
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
export default async function globalSetup() {
puppeteer.use(StealthPlugin());
const browser = await puppeteer.launch(jestPuppeteerConfig.launch);
@@ -23,5 +24,8 @@ export default async function globalSetup() {
// use the file system to expose the wsEndpoint for TestEnvironments
await fsPromises.mkdir(DIR, { recursive: true });
await fsPromises.writeFile(path.join(DIR, 'wsEndpoint'), browser.wsEndpoint());
};
await fsPromises.writeFile(
path.join(DIR, 'wsEndpoint'),
browser.wsEndpoint()
);
}