Skip to content

Commit 5a62bba

Browse files
authored
chore: remove node-fetch (#1305)
* remove * rule * remove node-fetch
1 parent b8166a5 commit 5a62bba

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ export default defineConfig([
5454
rules: {
5555
'n/no-unsupported-features/es-builtins': 'error',
5656
'n/no-unsupported-features/es-syntax': 'error',
57+
'n/no-unsupported-features/node-builtins': [
58+
'error',
59+
{
60+
version: '>=20.19.0'
61+
}
62+
],
5763

5864
'no-console': 'off',
5965
'no-debugger': 'error',

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"globals": "^17.0.0",
4646
"husky": "^9.1.7",
4747
"lint-staged": "^16.2.7",
48-
"node-fetch": "^3.3.2",
4948
"npm-run-all2": "^8.0.4",
5049
"playwright-core": "1.58.2",
5150
"prettier": "^3.7.3",

packages/e2e-tests/testUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import path from 'node:path';
66
import process from 'node:process';
77
import colors from 'css-color-names';
88
import { ElementHandle } from 'playwright-core';
9-
import fetch from 'node-fetch';
109
import {
1110
testMode,
1211
isWin,
@@ -339,6 +338,7 @@ export async function waitForNavigation(opts: Parameters<typeof page.waitForNavi
339338

340339
export async function fetchPageText() {
341340
const url = page.url();
341+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
342342
const res = await fetch(url);
343343
if (res.ok) {
344344
return res.text();
@@ -349,6 +349,7 @@ export async function fetchPageText() {
349349

350350
export async function fetchFromPage(url, init?) {
351351
const fullUrl = page.url() + (url.startsWith('/') ? url.slice(1) : url);
352+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
352353
return fetch(fullUrl, init);
353354
}
354355
export function readVitePrebundleMetadata() {

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)