Skip to content

Commit 4bba279

Browse files
aduh95danielleadams
authored andcommitted
tools,lib: remove global and Intl from the list of globals
Refs: #38230 Refs: #38419 PR-URL: #42014 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 2a1a94b commit 4bba279

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/.eslintrc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ rules:
171171
- name: WeakSet
172172
into: Safe
173173
globals:
174-
Intl: false
175174
# Parameters passed to internal modules
176-
global: false
177175
require: false
178176
process: false
179177
exports: false

lib/internal/per_context/primordials.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function copyPrototype(src, dest, prefix) {
162162
'Reflect',
163163
].forEach((name) => {
164164
// eslint-disable-next-line no-restricted-globals
165-
copyPropsRenamed(global[name], primordials, name);
165+
copyPropsRenamed(globalThis[name], primordials, name);
166166
});
167167

168168
// Create copies of intrinsic objects
@@ -206,7 +206,7 @@ function copyPrototype(src, dest, prefix) {
206206
'WeakSet',
207207
].forEach((name) => {
208208
// eslint-disable-next-line no-restricted-globals
209-
const original = global[name];
209+
const original = globalThis[name];
210210
primordials[name] = original;
211211
copyPropsRenamed(original, primordials, name);
212212
copyPrototype(original.prototype, primordials, `${name}Prototype`);
@@ -219,7 +219,7 @@ function copyPrototype(src, dest, prefix) {
219219
'Promise',
220220
].forEach((name) => {
221221
// eslint-disable-next-line no-restricted-globals
222-
const original = global[name];
222+
const original = globalThis[name];
223223
primordials[name] = original;
224224
copyPropsRenamedBound(original, primordials, name);
225225
copyPrototype(original.prototype, primordials, `${name}Prototype`);

0 commit comments

Comments
 (0)