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 bengl committed Feb 22, 2022
1 parent bcf53a8 commit cfafb45
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 cfafb45

Please sign in to comment.