diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index e31ba7d01c292e..41c3dd1613bef2 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -175,9 +175,7 @@ rules: - name: WeakSet into: Safe globals: - Intl: false # Parameters passed to internal modules - global: false require: false process: false exports: false diff --git a/lib/internal/per_context/primordials.js b/lib/internal/per_context/primordials.js index 7558fd25bd4984..2c0df17fbe1170 100644 --- a/lib/internal/per_context/primordials.js +++ b/lib/internal/per_context/primordials.js @@ -162,7 +162,7 @@ function copyPrototype(src, dest, prefix) { 'Reflect', ].forEach((name) => { // eslint-disable-next-line no-restricted-globals - copyPropsRenamed(global[name], primordials, name); + copyPropsRenamed(globalThis[name], primordials, name); }); // Create copies of intrinsic objects @@ -206,7 +206,7 @@ function copyPrototype(src, dest, prefix) { 'WeakSet', ].forEach((name) => { // eslint-disable-next-line no-restricted-globals - const original = global[name]; + const original = globalThis[name]; primordials[name] = original; copyPropsRenamed(original, primordials, name); copyPrototype(original.prototype, primordials, `${name}Prototype`); @@ -219,7 +219,7 @@ function copyPrototype(src, dest, prefix) { 'Promise', ].forEach((name) => { // eslint-disable-next-line no-restricted-globals - const original = global[name]; + const original = globalThis[name]; primordials[name] = original; copyPropsRenamedBound(original, primordials, name); copyPrototype(original.prototype, primordials, `${name}Prototype`);