Skip to content

Commit

Permalink
tools,lib: remove global and Intl from the list of globals
Browse files Browse the repository at this point in the history
Refs: #38230
Refs: #38419

PR-URL: #42014
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Shingo Inoue <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
aduh95 authored and bengl committed Feb 21, 2022
1 parent 22f2d97 commit 1ea4726
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ rules:
- name: WeakSet
into: Safe
globals:
Intl: false
# Parameters passed to internal modules
global: false
require: false
process: false
exports: false
Expand Down
6 changes: 3 additions & 3 deletions lib/internal/per_context/primordials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`);
Expand All @@ -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`);
Expand Down

0 comments on commit 1ea4726

Please sign in to comment.