Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix(npm): resolve ESLint v8 compatibility issues

Marioc83be41f9f36
diff --git a/npm/.eslintrc.json b/npm/.eslintrc.json
index add8073e..4dccdce2 100644
--- a/npm/.eslintrc.json
+++ b/npm/.eslintrc.json
@@ -18,7 +18,8 @@
"@typescript-eslint/no-unused-vars": [
"error",
{
- "argsIgnorePattern": "^_"
+ "argsIgnorePattern": "^_",
+ "caughtErrorsIgnorePattern": "^_"
}
],
"no-console": [
@@ -35,7 +36,8 @@
{
"files": ["scripts/**/*.js", "tests/**/*.js"],
"rules": {
- "@typescript-eslint/no-var-requires": "off"
+ "@typescript-eslint/no-var-requires": "off",
+ "@typescript-eslint/no-require-imports": "off"
}
}
]
diff --git a/npm/scripts/postinstall.js b/npm/scripts/postinstall.js
index 0ff04948..bac8d42c 100644
--- a/npm/scripts/postinstall.js
+++ b/npm/scripts/postinstall.js
@@ -81,7 +81,7 @@ function fetchUrl(url, maxRedirects = 5) {
port: proxy.port,
keepAlive: true,
});
- } catch (err) {
+ } catch (_err) {
console.warn(`Warning: Invalid proxy URL ${proxyUrl}, ignoring`);
}
}
@@ -104,7 +104,7 @@ function fetchUrl(url, maxRedirects = 5) {
// Resolve relative URLs
try {
redirectUrl = new URL(redirectUrl, currentUrl).toString();
- } catch (err) {
+ } catch (_err) {
reject(new Error(`Invalid redirect URL from ${currentUrl}: ${redirectUrl}`));
return;
}
@@ -195,7 +195,7 @@ async function downloadBinary(platform, version) {
fs.unlinkSync(binaryPath);
}
}
- } catch (err) {
+ } catch (_err) {
console.warn(`⚠ Could not verify existing binary, re-downloading...`);
try {
fs.unlinkSync(binaryPath);
@@ -257,7 +257,7 @@ async function downloadBinary(platform, version) {
// Resolve relative URLs
try {
redirectUrl = new URL(redirectUrl, url).toString();
- } catch (err) {
+ } catch (_err) {
fs.unlink(tempPath, () => {});
reject(new Error(`Invalid redirect URL from ${url}: ${redirectUrl}`));
return;
diff --git a/npm/src/download.ts b/npm/src/download.ts
index 65e7fa70..8ab5abc8 100644
--- a/npm/src/download.ts
+++ b/npm/src/download.ts
@@ -29,7 +29,7 @@ function fetchUrl(url: string, maxRedirects = 5): Promise<Buffer> {
port: proxyPort,
keepAlive: true,
});
- } catch (err) {
+ } catch (_err) {
console.warn(`Warning: Invalid proxy URL ${proxyUrl}, ignoring`);
}
}
@@ -51,7 +51,7 @@ function fetchUrl(url: string, maxRedirects = 5): Promise<Buffer> {
// Resolve relative URLs
try {
redirectUrl = new URL(redirectUrl, currentUrl).toString();
- } catch (err) {
+ } catch (_err) {
reject(new Error(`Invalid redirect URL from ${currentUrl}: ${redirectUrl}`));
return;
}
@@ -142,7 +142,7 @@ async function downloadBinary(
fs.unlinkSync(binaryPath);
}
}
- } catch (err) {
+ } catch (_err) {
console.warn(`⚠ Could not verify existing binary, re-downloading...`);
try {
fs.unlinkSync(binaryPath);
@@ -204,7 +204,7 @@ async function downloadBinary(
// Resolve relative URLs
try {
redirectUrl = new URL(redirectUrl, url).toString();
- } catch (err) {
+ } catch (_err) {
fs.unlink(tempPath, () => {});
reject(new Error(`Invalid redirect URL from ${url}: ${redirectUrl}`));
return;
diff --git a/npm/tests/integration.test.js b/npm/tests/integration.test.js
index 5257e2f9..e04f4e74 100644
--- a/npm/tests/integration.test.js
+++ b/npm/tests/integration.test.js
@@ -85,7 +85,7 @@ const os = __importStar(require('os'));
// Clean up: stop server if running
try {
await pinch.stop();
- } catch (e) {
+ } catch (_e) {
// Ignore
}
});
diff --git a/npm/tests/integration.test.ts b/npm/tests/integration.test.ts
index d3f07cb8..d1dc07f5 100644
--- a/npm/tests/integration.test.ts
+++ b/npm/tests/integration.test.ts
@@ -31,7 +31,7 @@ describe('Pinchtab npm Integration Tests', () => {
// Clean up: stop server if running
try {
await pinch.stop();
- } catch (e) {
+ } catch (_e) {
// Ignore
}
});