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 <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>
  • Loading branch information
aduh95 authored and danielleadams committed Apr 24, 2022
1 parent 2a1a94b commit 4bba279
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
Expand Up @@ -171,9 +171,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
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 4bba279

Please sign in to comment.