Skip to content

Commit 39ec744

Browse files
committed
chore: lint
1 parent d3cb870 commit 39ec744

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ You can simply import `{ fetch }` from `node-fetch-native/proxy` with a preconfi
128128
```ts
129129
import { fetch } from "node-fetch-native/proxy";
130130

131-
console.log(await fetch("https://icanhazip.com").then((r) => r.text());
131+
console.log(await fetch("https://icanhazip.com").then((r) => r.text()));
132132
```
133133

134134
### `createFetch` utility
@@ -140,7 +140,7 @@ import { createFetch } from "node-fetch-native/proxy";
140140

141141
const fetch = createFetch({ url: "http://localhost:9080" });
142142

143-
console.log(await fetch("https://icanhazip.com").then((r) => r.text());
143+
console.log(await fetch("https://icanhazip.com").then((r) => r.text()));
144144
```
145145

146146
### `createProxy` utility
@@ -154,7 +154,9 @@ import { createProxy } from "node-fetch-native/proxy";
154154
const proxy = createProxy();
155155
// const proxy = createProxy({ url: "http://localhost:8080" });
156156

157-
console.log(await fetch("https://icanhazip.com", { ...proxy }).then((r) => r.text());
157+
console.log(
158+
await fetch("https://icanhazip.com", { ...proxy }).then((r) => r.text()),
159+
);
158160
```
159161

160162
## Alias to `node-fetch`
@@ -169,8 +171,8 @@ Using npm [overrides](https://docs.npmjs.com/cli/v8/configuring-npm/package-json
169171
// package.json
170172
{
171173
"overrides": {
172-
"node-fetch": "npm:node-fetch-native@latest"
173-
}
174+
"node-fetch": "npm:node-fetch-native@latest",
175+
},
174176
}
175177
```
176178

@@ -182,8 +184,8 @@ Using yarn [selective dependency resolutions](https://classic.yarnpkg.com/lang/e
182184
// package.json
183185
{
184186
"resolutions": {
185-
"node-fetch": "npm:node-fetch-native@latest"
186-
}
187+
"node-fetch": "npm:node-fetch-native@latest",
188+
},
187189
}
188190
```
189191

@@ -196,9 +198,9 @@ Using [pnpm.overrides](https://pnpm.io/package_json#pnpmoverrides):
196198
{
197199
"pnpm": {
198200
"overrides": {
199-
"node-fetch": "npm:node-fetch-native@latest"
200-
}
201-
}
201+
"node-fetch": "npm:node-fetch-native@latest",
202+
},
203+
},
202204
}
203205
```
204206

src/polyfill.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ function polyfill(name: string, impl: any) {
1313
if (!(name in globalThis)) {
1414
try {
1515
globalThis[name] = impl;
16-
} catch {}
16+
} catch {
17+
// Ignore
18+
}
1719
}
1820
}
1921

0 commit comments

Comments
 (0)