You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/isolated-functions.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
Some functions need to be isolated from their surrounding scope due to execution context constraints. For example, functions passed to `makeSynchronous()` are executed in a subprocess and cannot access variables from outside their scope. This rule helps identify when functions are using external variables that may cause runtime errors.
9
9
10
10
Common scenarios where functions must be isolated:
11
+
11
12
- Functions passed to `makeSynchronous()` (executed in subprocess)
12
13
- Functions that will be serialized via `Function.prototype.toString()`
13
14
- Server actions or other remote execution contexts
@@ -213,4 +214,4 @@ makeSynchronous(async () => {
213
214
consturl=newURL(response.url); // ✅ Allowed global
0 commit comments