Skip to content

Commit ef74bd9

Browse files
committed
Revert "chore(lint): restore useArrowFunction fixes for bound functions and ignore rule"
This reverts commit b2a8203. Resolved here: #627 (comment)
1 parent 8751b03 commit ef74bd9

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

packages/open-next/src/core/patchAsyncStorage.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ const mod = require("node:module");
33
const resolveFilename = mod._resolveFilename;
44

55
export function patchAsyncStorage() {
6-
// biome-ignore lint/complexity/useArrowFunction: could cause problems with `this` binding
7-
mod._resolveFilename = function (
6+
mod._resolveFilename = ((
87
originalResolveFilename: typeof resolveFilename,
98
request: string,
109
parent: any,
1110
isMain: boolean,
1211
options: any,
13-
) {
12+
) => {
1413
if (
1514
request.endsWith("static-generation-async-storage.external") ||
1615
request.endsWith("static-generation-async-storage.external.js")
@@ -29,5 +28,5 @@ export function patchAsyncStorage() {
2928
return originalResolveFilename.call(mod, request, parent, isMain, options);
3029

3130
// We use `bind` here to avoid referencing outside variables to create potential memory leaks.
32-
}.bind(null, resolveFilename);
31+
}).bind(null, resolveFilename);
3332
}

packages/open-next/src/core/require-hooks.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,15 @@ function isApp() {
129129
}
130130

131131
export function applyOverride() {
132-
// biome-ignore lint/complexity/useArrowFunction: could cause problems with `this` binding
133-
mod._resolveFilename = function (
132+
mod._resolveFilename = ((
134133
originalResolveFilename: typeof resolveFilename,
135134
requestMapApp: Map<string, string>,
136135
requestMapPage: Map<string, string>,
137136
request: string,
138137
parent: any,
139138
isMain: boolean,
140139
options: any,
141-
) {
140+
) => {
142141
const hookResolved = isApp()
143142
? requestMapApp.get(request)
144143
: requestMapPage.get(request);
@@ -147,5 +146,5 @@ export function applyOverride() {
147146
return originalResolveFilename.call(mod, request, parent, isMain, options);
148147

149148
// We use `bind` here to avoid referencing outside variables to create potential memory leaks.
150-
}.bind(null, resolveFilename, hookPropertyMapApp, hookPropertyMapPage);
149+
}).bind(null, resolveFilename, hookPropertyMapApp, hookPropertyMapPage);
151150
}

0 commit comments

Comments
 (0)