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

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 797bf62 commit 80f944f
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
@@ -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
6 changes: 3 additions & 3 deletions lib/internal/per_context/primordials.js
Original file line number Diff line number Diff line change
@@ -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`);

0 comments on commit 80f944f

Please sign in to comment.